Skip to content
Snippets Groups Projects
  1. Dec 28, 2020
    • qsm-odoo's avatar
      [FIX] web_editor: stop suggesting shapes for model-related images · d624a4f4
      qsm-odoo authored
      
      Those kind of images use a specific route (/web_editor/shape/...) to
      be fetched. While waiting for a more complete solution to maybe handle
      them for model-related images, this commit only allows their use for
      images in views and HTML fields.
      
      closes odoo/odoo#63825
      
      X-original-commit: dca6d738
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      d624a4f4
    • Wolfgang Taferner's avatar
      [FIX] account: onchange of product and uom should not use currency rounding · 1e6dce9d
      Wolfgang Taferner authored
      
      As the price_unit and the uom rounding can be more detailed than the currency/accounting rounding (2 decimals as a standard) to cut the number before subtotal is wrong.
      
      closes odoo/odoo#63817
      
      X-original-commit: 1b4005f5
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      1e6dce9d
    • nie's avatar
      [FIX] coupon: public user cannot use promo code with edited rule · a47143ed
      nie authored
      
      Steps:
      - Install eCommerce
      - Go to Website > Products > Promotion Programs
      - Create a promotion program with a filter Based on Customers and a promotion code
      - Save
      - Edit the new program and clear the filter Based on Customers
      - Save again
      - Log out and go to the shop
      - Add an article to your cart and click "View Cart"
      - Click "I have a promo code"
      - Apply the promo code you created earlier
      
      Bug:
      The promo code is not accepted.
      
      Explanation:
      When the filter Based on Customers is cleared, `[]` is written on the program rule. This makes the app search for a partner with id = 4 (Public User). Since this user is not active, the search returns no results and, therefore, forbids the user from using the promo code.
      This works flawlessly when you create a promotion program with no filters as they are initialized with `NULL` and a `NULL` filter always returns `True`.
      
      opw:2419796
      
      closes odoo/odoo#63822
      
      X-original-commit: d31a86ce
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      a47143ed
  2. Dec 21, 2020
  3. Dec 24, 2020
    • qsm-odoo's avatar
      [REV] web_editor, *: remove Jabberwock · e5572c31
      qsm-odoo authored
      *: barcodes, mail, mass_mailing, note, test_website, web, web_tour,
         website, website_blog, website_event, website_form, website_forum,
         website_mail_channel, website_mass_mailing, website_profile,
         website_sale, website_twitter, doc
      
      New solutions are being investigated in master. For the moment, it seems
      better to remove Jabberwock to unlock difficult forward-port between
      14.0 and 14.1/master, until we decide what to do once and for all in
      a later master. We may un-revert this later but that would be way easier
      than reverting Jabberwock in a few months.
      
      This was done as safely as possible by removing any commit related to
      Jabberwock, then resolving conflicts, then reforcing commits from 14.0
      that were hugely adapted for 14.1/master, then forcing the whole diff
      over a rebased 14.1/master. The only possible miss (other than me making
      a mistake) would be commits that were not forward-ported to 14.1 thanks
      to Jabberwock handling the issue on its own (I know we had such commits
      in website, which I manually included in this revert, see below).
      
      For reference:
      
      Commits which were reforced to their 14.0 version:
      - https://github.com/odoo/odoo/commit/1a916fc2362c0b006460d94a219366ade1cce058
      - https://github.com/odoo/odoo/commit/fd9e58a675bb7ec1bf97cb77b21b3c65369d51fe
      - https://github.com/odoo/odoo/commit/bdfddace29b16404c06a7ebfc0cc242463a0e768
      - https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
      - https://github.com/odoo/odoo/commit/710784da1f02d45cbe898da426ba7e2ac63dc711
      - https://github.com/odoo/odoo/commit/597585c9b8b1350bcfd84e8433ea6c82060bcc3d
      - https://github.com/odoo/odoo/commit/333a9124608ff655bd9ad5e63044a5cb7ef9c636
      
      Commits that were not forward-ported to 14.1/master and now are:
      - https://github.com/odoo/odoo/commit/55ff2d971b672dec5f103215be39101c88856b6c
      - https://github.com/odoo/odoo/commit/ebbb3de1e5f363689a5ba1647bb4c26416e42d5b
      
      + Adapt this forward-port: https://github.com/odoo/odoo/pull/60976 (as
        it was simplified for non-stable master version relying to the
        Jabberwock implementation and now needed to be adapted to the
        summernote implementation).
        See `!$el.data('oe-expression') && $el.data('oe-xpath')`
      
      + Revert https://github.com/odoo/odoo/pull/60477 and reforce original
        14.0 fix https://github.com/odoo/odoo/commit/746bf53b4aecfc601f0581a948d7cb7153812c82
      
      
      
      Note: this also means that any good refactoring that was done by the
      Jabberwock-related commits is lost for now. Once the revert reaches
      master, I'll try and restore what we want from those commits. Here
      are their references (but obviously they have the opposite conflicts
      than those resolved during this revert):
      
      e766842a92b6 [REM] web_editor,website: empty summernote files
      08c94c986e09 [REF] web_editor,web: adapt to new jabberwock editor
      1546c1b74713 [REF] mass_mailing: adapt to new jabberwock editor
      fd0b963c6028 [REF] website: adapt to new jabberwock editor
      0113d05c6c94 [ADD] web_editor: add new Jabberwock editor lib
      d0c88a396493 [FIX] web_editor: don't change background color out of the website editor
      d52d3d67d4e1 [FIX] web_editor : better icon in text style dropdown
      61cb2f0d21da [FIX] web_editor: should not ask if want to leave the page twice
      c42012b863b5 [FIX] web_editor: trigger a resize when use the mobile preview
      d934d05d6e39 [FIX] web_editor: need to build the snippet before commit it into vDom
      495bea924745 [FIX] web_editor: remove box shadow on the #wrap container
      bffb5612e689 [ADD] field_html: add resizer in most field_html
      f3c94e40cccf [IMP] web_editor: update Jabberwock library to commit 41e4063
      cc87dea3ef32 [FIX] web_editor: update header change position to work with JW
      5d9b25f66704 [FIX] web_editor: do not insert chars around step icon on click
      70d3f0e4630c [IMP] web_editor: update Jabberwock library to commit 0bd94881
      a57f13891f82 [FIX] web_editor: open media modal in appropriate tab on dblclick media
      5b7537397e08 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
      a8d7ec235eeb [FIX] web_editor: adapt iframe Qunit test to new editor
      5f794eac7209 [FIX] mass_mailing: hide all panels on show themes
      551d45641d19 [IMP] website: remove unused reference
      10580e1c102f [IMP] wesbite: add comment in tour
      c17049f6b764 [FIX] web_editor: Fix description toggle in pricelist snippet
      18a428e854b1 [IMP] web_editor: update Jabberwock library to commit 43a10003
      58a161c645a5 [REF] web_editor, website: use editor helper setClass
      62dd0bd3bc66 [FIX] web_editor: properly deactivate snippets and reactivate the last
      99eebcaa34cb [FIX] web_editor: disable snippet in preview mode on mouse leave options
      a84216932958 [FIX] web_editor: fix the image gallery snippet
      f8dd4ea3e7d5 [FIX] web_editor: fix shadow selector for Safari
      e50a4f3a16de [IMP] web_editor: update Jabberwock library to commit de13ed7e
      4a2718f7a5ba [FIX] web_editor: ensure dom is properly cleaned at end of save test
      03684c004a4e [FIX] website: ensure reset of bg-image on add bg-video
      d63397159708 [FIX] web_editor: fix image remove from images wall
      82fa5142f1a5 [IMP] note: restyle note without sheet or resizer
      8b9f1ce603d5 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
      fc2183b66305 [FIX] web_editor: image overlay did not update with changes
      cd0d2f5791cd [FIX] web_editor: add color preview to color picker
      28a168172454 [FIX] web_editor: restore removal of spinner
      67c90dd3b946 [FIX] website_forum: properly initialize editor
      920dfe2a430a [FIX] website_forum: better css in the JW toolbar
      43f33fd651af [IMP] web_editor: update Jabberwock library to commit 6853b60
      71246c92f8de [FIX] Web_editor: table options button should be inside the toolbar
      12b9e5916692 [FIX] web_editor: properly update the image options on replace image
      e889cf8583da [FIX] website, website_sale: properly save filter id of dynamic snippets
      e0fd11e36e45 [IMP] web_editor: update Jabberwock library to commit 4b2c903b
      8f2b7ba35614 [FIX] web_editor: properly stop snippet option changed event propagation
      a30c2c4105c7 [FIX] website: fix megamenu snippet editor behavior
      312091cf822b [FIX] web_editor: fix overlay that is not reappearing
      9f1d03dda613 [FIX] web_editor: table picker not fully displayed
      814ddada6124 [IMP] web_editor: remove message before leaving page if editor is destro
      4f38e26af7da [FIX] web: allow saving copyright footer
      01e947b6123b [FIX] web_editor: only save translations that changed
      103676072c50 [FIX] web_editor: prevent traceback on open crop dialog
      5844ff66d4a0 [FIX] web_editor: apply image crop in jw on save dialog
      1b435652e4a0 [FIX] website_forum: ensure media modal opens on click button
      4f4a6ca0b8ac [FIX] web_editor: ensure valid default html value
      51e22026ac7b [IMP] web_editor: update Jabberwock library to commit ab1184f8
      2413fa19be0e [FIX] web_editor: Qunit test properly wait for editor stop
      aa89e1ea3e97 [FIX] web_editor: properly save view blocks with an id
      e2e90b53992e [FIX] web_editor: ensure language selector is non editable
      0efd72089d5c [IMP] web_editor: clean useless lines
      f54dfc7631f9 [IMP] web_editor: remove useless comment
      3995ab1b84f2 [IMP] web_editor: update Jabberwock library to commit b8d73691
      0834b1e5740a [IMP] web_editor: withDomMutations
      f1459fb7b45c [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
      6e8acc6c8cc7 [IMP] web_editor: update Jabberwock library to commit 3bbb175c
      18a0c95d51cb [FIX] website, web_editor: #wrapwrap in body
      4686a92e742c [FIX] website_form: allow edition of success message
      78cc4da075cc [FIX] web_editor: allow edition of branded nodes only
      bcffa7353448 [FIX] web: dialog should not use field value footer items
      67ff56e14746 [FIX] web_editor,website_mass_mailing: display the popup preview
      3cb9bea50c20 [IMP] web_editor: update Jabberwock library to commit a20492ea
      518f03e6f1c9 [FIX] web_editor: use withIntangibles to find ZoneNode
      d0ad6a568f49 [FIX] website: move sidebar out of theme
      d690f5da13ea [FIX] website: properly save popup id
      43b3433df3e6 [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
      4ee8f4dedc30 [FIX] web_editor: prevent deadlock when removing child snippet of popup
      850be198ef6d [FIX] web_editor: prevent traceback on reposition background image
      4c3eaba41f5d [FIX] mass_mailing: adapt tour to the new editor design.
      496d3ea272ed [FIX] web_editor: properly position sidebar scrollbar
      5be4de703074 [FIX] web_editor: Show the toolbar when select the text in forum edition
      
      closes odoo/odoo#63768
      
      Related: odoo/enterprise#15458
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      e5572c31
    • Adrien Widart's avatar
      [FIX] account: list all credit note methods · d4eeb233
      Adrien Widart authored
      When adding a credit note, the user can only select the "Partial
      Refund" credit method.
      
      To reproduce the error:
      1. Go to Invoicing
      2. Create a new one
      	- Add at least one invoice line
      3. Save, Confirm
      4. Click on "Add Credit Note"
      
      => You can not change the credit method.
      
      The method field is editable only when the residual amount is different
      from 0. Here is the issue: when clicking on "Add Credit Note", it
      actually triggers some `onchange` methods. The latter uses a new record
      to compute the values:
      https://github.com/odoo/odoo/blob/45422d56bce413b8577f1784e10dd22ede93c751/odoo/models.py#L6147-L6148
      
      
      Then, some `_compute` methods are also triggered. Among them, the amount
      residual computation of the associated `account_move_line`. However,
      `_compute_amount_residual` will skip the not-yet-created objects and set
      the amount residual to 0. This is the reason why the residual amount of
      the account move is zero and therefore, the user can't change the credit
      method.
      
      OPW-2418582
      
      closes odoo/odoo#63780
      
      X-original-commit: 13e33fdd
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      d4eeb233
    • Pierre Paridans's avatar
      [FIX] web: prevent crash on image resize/crop · ad74a829
      Pierre Paridans authored
      
      When attempting to resize or crop an attachment through the '/web/image'
      route, if the attachment isn't actually an image (even if the record's
      mimetype says so) or doesn't match one of the format supported by PIL
      (Python Imaging Library) - like Apple's HEIF -  the request crashes with
      a "500 Internal Error".
      
      Although it makes sense to return a response with an HTTP error code, a
      more sensible approach would be to return a "404 Not Found" response
      instead.
      
      The point by handling the Exception thrown by PIL and returning a 404
      status code is to more closely match the semantic of this HTTP status
      code. Getting a resized version of a non-image doesn't really make sense
      as this resource doesn't exist at all ; hence the "404 Not Found"
      response. On the other hand returning a "500 Internal Error" would
      denote that a legitimate request failed on the server side, which is not
      the case here.
      
      Note: this difference of semantic, even if only visible in a regular
      browser, has its importance in the mobile apps because we use it to
      given a meaningful feedback to the user in case if failed HTTP requests.
      
      Note: the mimetype detection could be improved to ease the handling of
      this kind of errors but would require too much changes to be done in
      stable branch.
      
      Steps to reproduce in Discuss:
      - rename an HEIF file with a ".jpeg" extension
      - upload it in a chat window
      => the thumbnail in the chat window throws an HTTP error 500
      
      opw-2417172
      
      closes odoo/odoo#63772
      
      X-original-commit: 873bc2aa
      Related: odoo/enterprise#15462
      Signed-off-by: default avatarPierre Paridans <pparidans@users.noreply.github.com>
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      ad74a829
  4. Dec 23, 2020
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: improve perf of `_compute_has_packages` of `stock.picking` · cdf2d544
      Rémy Voet (ryv) authored
      
      Use read_group instead of search count to batch the compute.
      
      opw-2371161
      
      closes odoo/odoo#63754
      
      X-original-commit: b82d8a8456085ab700ef1ce1df4052fa6cefd7e0
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      cdf2d544
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: avoid flush all env in quants update · c5886590
      Rémy Voet (ryv) authored
      About this commit 8e7c0e544a8d3d18c57634750ee7ea03052c84b1
      
      We need to manually invalidate the cache (of the quant) if a error
      (other than concurrent ones) is raise from the write. Because
      we can't know what the `write` has already put in the cache (e.g.
      `write_uid`), we need invalidate it.
      
      opw-2371161
      
      X-original-commit: 7d75745267dada371d421ec93d50fb10b0006457
      c5886590
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: add index on `lot_id` of `stock.quant` · d5ea45c0
      Rémy Voet (ryv) authored
      For validate 5K stock move line with SN:
      Without index: 200 sec of SQL execution
      With index: 15 of SQL execution
      
      opw-2374846
      
      X-original-commit: 21d7afca292f4c213d1fcfb4a31e0b7157eb941c
      d5ea45c0
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: `_action_done` with OrderedSet for scalability · f21362ff
      Rémy Voet (ryv) authored
      Make more scalable the `_action_done` by replacing
      recordset/union by OrderedSet/add.
      Also add `limit=1` in the lot search.
      
      opw-2374846
      
      X-original-commit: ffe9f204474de832514ab6464947c607a4c92282
      f21362ff
    • Rémy Voet (ryv)'s avatar
      [FIX] stock_account: fix performance of `_get_in_move_lines` · 55bf8288
      Rémy Voet (ryv) authored
      A `stock.move` can contain thousands of `move_line_ids` (when tracked
      by SN). The union of recordset (`|=`) doesn't scale well due
      to the N² complexity (for 10000 SML to validate,
      ). Replace recordset union
      by `OrderedSet` of ids + browse (linear complexity).
      
      Before for 10000 SML to validate:
      - the `_get_in_move_lines` take 14% time in the pyflame
      After in the same condition:
      - the `_get_in_move_lines` isn't present anymore in the pyflame
      
      opw-2347525
      
      X-original-commit: 0acbf6f961e4e946c9e487343ad2cc0129400b7f
      55bf8288
    • Daniel Blanco's avatar
      [FIX] l10n_cl: exclude vendor bills from last sequence domain · 08a7e0f3
      Daniel Blanco authored
      
      closes odoo/odoo#63758
      
      X-original-commit: 13b65506
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      08a7e0f3
    • ijas ahammed's avatar
      [IMP] website_slides: separate backend tags from frontend tags · 5e59ced9
      ijas ahammed authored
      
      Backend tags are generally used internally for classification or daily
      process. Frontend tags are used for filtering and menu definitions. These
      two type of tags are not managed separately in eLearning channels right now.
      
      This commit separates backend and frontend tags using the color field.
      Along with that, it improves the following :
      
      Frontend
      
       - only displays channel tags that has color set;
       - avoids showing void tag group / menu (without any frontend tags);
      
      Backend
      
       - prevents access of the backend tags for portal/public users with a
         record rule (similar to online events);
       - adds 'Tags (tag_ids)' field in the list view of 'Course Groups' that
         shows all the tags (frontend as well as backend);
       - hides the colorless tags in slide channel kanban;
       - improves the form view for course channel tags;
      
      Frontend and Backend
      
       - adds a default color value while creating a new channel tag
      
      Task ID-2357942
      PR odoo/odoo#62138
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      5e59ced9
    • Odoo's Mergebot's avatar
      [FW][MERGE] mail: forward port various leftover fixes and improve tests · 877d1ab2
      Odoo's Mergebot authored
      
      PURPOSE
      
      All fixes and last improvements are not correctly forward ported in 14.1 and master.
      Let us clean and forward everything.
      
      Channel tests are partially cleaned and improved, notably to add test users and
      improve code readability.
      
      Manual forward port of odoo/odoo@eda542
      Manual forward port of odoo/odoo@340f6ba
      Contain some additional fixes.
      
      See sub commits for more details.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      closes odoo/odoo#63747
      
      Forward-port-of: odoo/odoo#63677
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Unverified
      877d1ab2
    • Debauche Stéphane's avatar
      [FIX] mail: make the current user member of the created channel · c7be144d
      Debauche Stéphane authored
      Forward port fixes done in stable versions and not correclty forward ported
      into master at merge time.
      
      ORIGINAL COMMIT
      
      Purpose
      =======
      Before, by default, if a user create a channel, he will not be member
      of this channel.
      
      After, the current user will always be member of the new channel.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      X-Original-commit odoo/odoo@eda542c82f84d7b5589846691b9cb6b7f1021947
      X-Original-Task ID-1963414
      
      X-original-commit: 1d5d7871d72c8b747ab2e1b3597f6b8b8e371b26
      c7be144d
    • Thibault Delavallée's avatar
      [FIX] mail: fix is_chat compute method and triggers · c4879edb
      Thibault Delavallée authored
      SPECIFICATIONS
      
      is_chat triggers are missing and default value should not be defined on a
      computed field.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      X-original-commit: ff4a0ec9042ad43bb8781ed60b880d3c53f5063d
      c4879edb
    • Thibault Delavallée's avatar
      [IMP] mail: rewrite channel tests · e9571a40
      Thibault Delavallée authored
      Improve channel related test content, notably
      
        * use more often real users to avoid doing all tests as admin;
        * remove unnecessary variables creation, use content created during
          setUp;
        * improve overall code;
        * remove join/leave channel custom tool method and add real methods on
          channel model;
      
      Moderation tests are left untouched because... well.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      X-original-commit: 19de1303d015613973115cc01941ae8ca0e82cec
      e9571a40
    • Thibault Delavallée's avatar
      [MOV] (test_)mail: move channel tests into mail · 620b9e24
      Thibault Delavallée authored
      SPECIFICATIONS
      
      Move channel tests from test_mail directly into mail module. Those tests do
      not use models specifically introduced in test_mail. As those tests do not
      target mail.thread features but rather mail models they can be moved into mail
      directly.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      X-original-commit: 8c044735e8e30a80f85bd670eb61daba7645f62c
      620b9e24
    • Xavier Morel's avatar
      [FIX] mail: don't self-notify · b25b89b1
      Xavier Morel authored
      Forward port fixes done in stable versions and not correclty forward ported
      into master at merge time.
      
      LINKS
      
      Task ID-2421795
      PR odoo/odoo#63677
      
      X-Original-commit odoo/odoo@340f6baf61d7d91c0a97e7f9f900884a65b9077c
      X-Original-Task ID-2348333
      
      X-original-commit: 6c1ed107d9d4144ba078ae0216cf8dcdf02d8a7f
      b25b89b1
    • Thibault Delavallée's avatar
      [FIX][IMP] test: improve usage of new_test_user tool · 42b8a15e
      Thibault Delavallée authored
      Allow a False email as valid valid. Generate an email only if not given but
      keep void values.
      
      Ensure company_id / company_ids match, notably to ease creation of users
      in a multi company test environment.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      X-original-commit: 21999058800957a08c5e129c527afe6b84812a8a
      42b8a15e
    • Thibault Delavallée's avatar
      [IMP] base: add details when failing to validate user company at creation · b6008e7c
      Thibault Delavallée authored
      Display names of user, company_id and company_ids in order to better
      understand what is failing. Otherwise a generic message does not really
      help understanding the actual issue.
      
      Add translation of new constraint. Also add translations of new modules
      added recently.
      
      LINKS
      
      Task ID-2421795
      COM PR odoo/odoo#63677
      
      X-original-commit: 15d47bec4a6316dd6a873973572273c913801330
      b6008e7c
    • Thanh Dodeur's avatar
      [FIX] mail: adapt mail notification · 418934c4
      Thanh Dodeur authored
      
      Before this commit, some notifications in mail were not following the
      changes made in odoo/odoo#52826 .
      
      task-2278579
      
      closes odoo/odoo#63741
      
      X-original-commit: eabab5f2
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      418934c4
    • Goffin Simon's avatar
      [FIX] sale_timesheet: Record rule not updated · 86df36ae
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Install Accounting, Sales, Project and Timesheet apps
      - Enable Analytic accounting in Accounting settings
      - Uninstall Timesheet app
      
      Bug:
      
      The domain_force of was account.analytic.line.billing.user still equal to
      [('project_id', '=', False)] but the field project_id didn't exist
      on model account_analytic_line.
      
      opw:2420177
      
      closes odoo/odoo#63734
      
      X-original-commit: 8d658abc
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      86df36ae
    • Thibault Delavallée's avatar
      [FW][FIX] mail: warn about invalid invite instead of crashing … · d7714a75
      Thibault Delavallée authored
      
      When inviting people to a group-based channel an error may be raised if
      invite target users not having the right group. Indeed they do not have
      access to the channel as read access it not given if not belonging to
      the channel group.
      
      We add an UserError so that wrong invites are now pompted to the user
      instead of crashing.
      
      Task ID-2411038
      
      X-Original-Commit e4889fb (12)
      X-Original-Commit 0c6abe3 (12.3)
      Forward port of #63676
      Forward port of #63680
      
      closes odoo/odoo#63726
      
      X-original-commit: 57d2af357178e27da30bccebb93d36ecb70854c5
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d7714a75
  5. Dec 22, 2020
    • Mohammed Shekha's avatar
      [IMP] web: close confirm dialog if unlink raises error · a58699cb
      Mohammed Shekha authored
      
      before this commit: deleting records from listview shows confirm dialog, if unlink
      method throws UserError then there will be two dialog, closing UserError dialog and
      clicking on OK button in confirm dialog will again call unlink method which will
      open UserError dialog again, when error thwon from unlink error then confirm dialog
      should close.
      
      after this commit: if error is thrown from unlink and confirm dialog is opened then
      cofirm dialog will close first and then error dialog will be shown, this is done to
      avoid situation explained above.
      
      task-2221075
      
      closes odoo/odoo#60265
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      a58699cb
    • nie's avatar
      [FIX] website: gallery cover img inside anchor is not well placed · de0d05b6
      nie authored
      
      Steps:
      - Go to "Website" > "Go to Website"
      - Click Edit
      - Add an image gallery
      - Add an image to the gallery
      - Add the same image to the gallery
      - Click the first image
      - Click "Image Cover" in the side panel
      - Click on the Link button in the bottom-right of the side panel
      - Add a link and save
      
      Bug:
      The first image is not displayed in the same way as the second one.
      
      Explanation:
      The layout is not carried over to `img` when it's nested into an `a` tag. Redefining the layout on the `a` tag fixes the issue.
      
      opw:2394953
      
      closes odoo/odoo#63699
      
      X-original-commit: b34d2744
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      de0d05b6
    • fw-bot's avatar
      Purpose · 0a8f4b6c
      fw-bot authored
      =======
      
      This PR is in the continuity of odoo#62360.
      
      - Display remaining hours in task sales_line_id (name_get + task form view)
      - Remove internal reference from services demo data
      - Display sol in project timesheets list if project is billable
      - Remove use of non_allow_billable in timesheets as it has been removed from project and task in previous PR (see above)
      - Only recompute planned_hours for service product
      - Determine the correct SOL for timesheet
      - Set the last SOL of customer on timesheet if none is set on task or project
      - Allow edition of so_line in timesheet
      - Restrict SOL on project to sale lines with a service product
      - Use same widget on partner_id many2One than in sale.order (using ranking)
      - Remove timesheets table in SO and invoice portal.They were added in previous PR (see above). This introduces the use of links to /my/timesheets/.
      - Review portal timesheets (my/timesheets/ and link from orders and invoices)
      - Activate group_uom "Units of Measure" on sale_timesheet install
      - Hide partner phone number in task form view
      - Only determine SOL of task and timesheet if allow_billable=True
      - Filter SOL in task so that it matches the SOL of the project SO
      - Display red label if remaining hours is negative
      - Change SO compute behavior
      - Only open SO for salesman on project overview
      
      task-2409761
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#63695
      
      Forward-port-of: #62900
      X-original-commit: b1985773f3a67e28049f9e2bb635bcab059ad9c0
      Related: odoo/enterprise#15427
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      0a8f4b6c
  6. Dec 15, 2020
    • Nicolas Lempereur's avatar
      [FIX] web: show warning on create onchange · fef9634d
      Nicolas Lempereur authored
      
      When you create a new record, you will have in this order:
      
      - default_get
      - onchange (can trigger a warning)
      - _pushController => close all dialogs since ea2207af
      
      This is an issue since the possible warning is directly hidden to the
      user.
      
      Without the change, the added test failed with:
      
       Warning modal should be opened
       "executing a window action with onchange warning do not hide it":
       Found 0 elements to click on, instead of 1
      
      opw-2342273
      opw-2374051
      closes #61732
      
      closes odoo/odoo#63415
      
      X-original-commit: ff61ab12
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      fef9634d
  7. Dec 22, 2020
  8. Dec 21, 2020
    • Aurélien Warnon's avatar
      [FIX] website_crm_partner_assign: fix opportunities portal page without currency · 2a27fb5a
      Aurélien Warnon authored
      
      When you remove the 'company_id' on a crm.lead, you also remove the computed
      'company_currency'.
      When trying to view this kind of leads in the website_crm_partner_assign portal
      page, it would raise an error while trying to display the planned_revenue in
      the missing currency.
      
      Now, we display the number without any currency sign, which is a "best effort"
      solution, just the same as on the crm.lead form view.
      So it will look like "9000 at 47%" instead of "$9000 at 47%".
      
      Task 2416841
      
      closes odoo/odoo#63657
      
      X-original-commit: aafbde0b
      Signed-off-by: default avatarawa-odoo <awa-odoo@users.noreply.github.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      2a27fb5a
    • Adrien Widart's avatar
      [FIX] stock: no backorder if added on delivery page · 41613de6
      Adrien Widart authored
      
      In the Barcode app, if the user is on a delivery order, adds a product
      and then decreases the product's quantity, when validating the order,
      the backorder window is displayed.
      
      To reproduce the error:
      (Need sale_management,stock_barcode)
      1. Go to Sales
      2. Create a SO
      	- Add one Product P
      3. Save, Confirm
      4. Check the generated delivery reference R
      4. Go to Barcode > Operations > Delivery Orders > R
      5. Complete the P's quantity
      6. Add Product
      	- Select a Product P_extra
      	- Set a quantity (e.g., 1)
      7. Confirm
      8. Edit the P_extra's line
      	- Decrease the quantity (e.g., 0)
      9. Confirm
      10. Validate
      
      => A window is displayed so the user can create a backorder for the
      missing P_extra. Since the SO does not contains any P_extra, proposing
      to create a backorder does not make sense.
      
      When adding an extra product to the delivery, it creates a stock move
      line with the `product_uom_qty` set to 0. Since there isn't any stock
      move associated, it also creates a new one. Here is the issue: the
      `product_uom_qty` of the stock move is defined thanks to the `qty_done`
      of the extra product. Later, when validating the delivery, the server
      uses the `product_uom_qty` of the stock move to check if a backorder is
      needed. This the reason why, if the user decreased the quantity, the
      backorder proposition is displayed: the `qty_done` is less than the
      `product_uom_qty`.
      
      OPW-2411461
      
      closes odoo/odoo#63664
      
      X-original-commit: f5c0990c
      Signed-off-by: default avataradwid <adwid@users.noreply.github.com>
      41613de6
    • Adrien Widart's avatar
      [FIX] account: cascade delete of reconcile lines · 2f934356
      Adrien Widart authored
      
      When deleting an `account_reconcile_model`, it does not delete the
      corresponding `account_reconcile_model_line`. Moreover, this may prevent
      the user from using the l10n_de_skr04 module.
      
      To reproduce the error:
      (Use demo data)
      1. Go to Apps
      2. Install "Germany SKR04 - Accounting"
      3. Change the company
      	- Select "DE03 Company"
      4. Go to Settings > Invoicing > Fiscal Localization
      5. Change the package
      	- Select "Deutscher Kontenplan SKR04"
      6. Save
      
      => A validation error is displayed: "The operation cannot be completed:
      another model requires the record being deleted[...]".
      
      When changing for SKR04, the module's installation first deletes some
      models, among them: `account_reconcile_model` and later `account_tax`. The
      validation error appears on `account_tax` deletion. Since version 14, an
      `account_reconcile_model` is composed of `account_reconcile_model_line`
      and the latter is linked to `account_tax` (with `ondelete='restrict'`).
      Here is the issue: when deleting the `account_reconcile_model` model,
      the corresponding lines are not deleted. As a result: later, when trying
      to delete all the `account_tax`, since some `account_reconcile_model_line`
      are still present in database, it triggers the `ondelete='restrict'`
      constraint.
      
      OPW-2416066
      
      closes odoo/odoo#63649
      
      X-original-commit: 8c9a038c
      Signed-off-by: default avataradwid <adwid@users.noreply.github.com>
      2f934356
    • Raphael Collet's avatar
      [FIX] core: first onchange should always compute fields · dcc2a7e3
      Raphael Collet authored
      
      When a form view is opened, the first call to `onchange` should always
      compute fields, even if their dependencies have no default value.  Make
      sure it is the case for main records, and for records inside one2many
      fields.  The latter case was actually not working as expected.
      
      closes odoo/odoo#63646
      
      X-original-commit: 45422d56
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      dcc2a7e3
    • Mohammed Shekha's avatar
      [FIX] web: SampleServer: round float values · 81f2bc7b
      Mohammed Shekha authored
      
      before this commit: when field is float type it display too much decimal
      precision value, it should be fixed to 2 precision for sample data.
      
      after this commit: float field will display 2 decimal precision value.
      
      task-2318503
      
      closes odoo/odoo#63643
      
      X-original-commit: 61f8ced6
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarKamesh Patel <kat@odoo.com>
      81f2bc7b
    • Prakash Prajapati's avatar
      [FIX] web: kanban: reload kanban image · b9c5ae27
      Prakash Prajapati authored
      
      Before this commit, if the image changed from the form view, it
      wasn't updated when coming back to the kanban view (one must
      refresh the page).
      
      This commit makes this work by automatically adding the field
      '__last_update' to the list of fields to read when there is an
      image with kanban_image src in the template.
      
      closes odoo/odoo#58313
      
      Taskid: 2341493
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarAaron Bohy <aab@odoo.com>
      b9c5ae27
    • Ivan Yelizariev's avatar
      [FIX] portal: show default lang in selector when lang is not found · 7411403f
      Ivan Yelizariev authored
      
      STEPS:
      * install project, website
      * install translation, but don't apply to website
      * create a task with Customer that has that language
      * close the task
      * open rating request message in ``Settings >> Technical >> Messages``
      * click any of the smiles
      
      BEFORE:
      
      Error to render compiling AST
      IndexError: list index out of range
      Template: portal.language_selector
      Path: /t/t[1]
      Node: <t t-set="active_lang" t-value="list(filter(lambda lg : lg[0] == lang,
      languages))[0]"/>
      
      AFTER:
      no errors, page is translated to customer's language, though language selector
      shows default website's language
      
      ---
      
      opw-2416586
      
      closes odoo/odoo#63640
      
      X-original-commit: e9ef9841
      Signed-off-by: default avatarIvan Yelizariev // IEL <yelizariev@users.noreply.github.com>
      7411403f
Loading