Skip to content
Snippets Groups Projects
  1. Oct 27, 2020
  2. Oct 26, 2020
  3. Oct 27, 2020
    • Nicolas Martinelli's avatar
      [FIX] account, purchase, sale: portal access error · 54ef98c6
      Nicolas Martinelli authored
      
      - Install account / purchase / sale
      - Ceate an internal user without any access rights
      - Go to `/my`
      
      A 500 error is raised because of an AccessError.
      
      When the user has no access rights to any of the mentioned applications,
      the `search` call returns an AccessError.
      
      We prevent the access error and return 0 as a fallback.
      
      opw-2367559
      
      closes odoo/odoo#60824
      
      X-original-commit: e2d1688a47e01ac55f95beb8c69bb9bec9a13b32
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      54ef98c6
    • Raphael Collet's avatar
      [FIX] core: reinstall hooks after setting up models in registry · 67152bf8
      Raphael Collet authored
      
      Before this patch, adding a field on a custom model discards all
      automated actions on that model.  The explanation is relatively simple.
      When models are set up in the registry, the classes of custom models are
      dropped then recreated.  Given that automated actions are implemented as
      monkey-patches on model classes, the setup of models simply loses those
      monkey-patches, which explains why they stop working on custom models.
      
      The fix introduces an `_unregister_hook()` method, that is expected to
      clean up what has been done in `_register_hook()`.  When the registry is
      ready (i.e., not being loaded), the setup of models first invokes
      `_unregister_hook()` on models, proceeds with the setup, and finally
      invokes `_register_hook()` to reinstall the hooks.
      
      OPW 2362308
      
      closes odoo/odoo#60818
      
      X-original-commit: ac970380deaafb8542670951ed63dc11ffaf6b6c
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      67152bf8
    • Nicolas Martinelli's avatar
      [FIX] base_setup: Default Access Rights · 7342cadc
      Nicolas Martinelli authored
      
      Prevent crash in case `base.default_user` has been deleted.
      
      Note that the user shouldn't be deleted in a first place, but that's
      another discussion...
      
      opw-2360615
      
      closes odoo/odoo#60783
      
      X-original-commit: 0c9c849e
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      7342cadc
    • qsm-odoo's avatar
      [FIX] web_editor: properly allow to select a bg color for badges · 34238b77
      qsm-odoo authored
      Before this commit, the badges' background color was not possible to
      edit: the previews were done correctly but the background color was
      removed after final selection.
      
      This was because the background color property is animated on badges,
      messing with the related edition function.
      
      Closes https://github.com/odoo/odoo/issues/59337
      
      
      
      closes odoo/odoo#60742
      
      X-original-commit: 0b0f3a9c6d60cd9883628d83b6893efd24556aa3
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      34238b77
    • Nicolas Martinelli's avatar
      [FIX] sale: group SO with section in single invoice · c64b3c22
      Nicolas Martinelli authored
      
      - Create SO 1:
        - Section A, sequence 10
        - Product A, sequence 11
      - Create SO 2:
        - Section B, sequence 10
        - Product B, sequence 11
      - Select both SO
      - Create the invoice
      
      The resulting invoice lines are organized as follow:
      - Section A, sequence 10
      - Section B, sequence 10
      - Product A, sequence 11
      - Product B, sequence 11
      
      This is obviously not expected as it messes up the organization of the
      lines.
      
      This happens because the sequences of the SO lines are kept at invoice
      creation, while it is necessary to resequence the invoice lines to keep
      them organized.
      
      To do so, we loop on the invoice lines before their creation in order to
      assign a sequence corresponding to the order in which they have been
      added in the list. Since the invoice lines are added one SO after the
      other, this allows us to keep the appropriate ordering.
      
      Note that we only resequence if there are less invoices to create than
      SO, meaning that several SO have been merged. Indeed, in case a single
      invoice is created from a single SO, there is no need to resequence.
      
      This assumption is not completely true: if not all selected SO were
      invoiceable, the number of invoices created is also smaller than the
      number of SO. However, resequencing should be safe so in the worst case
      we might resequence an invoice while it was not necessary.
      
      We also leave the possibility for third-party addons to alter the
      resequencing thanks to the `_get_invoice_line_sequence` method.
      
      opw-2363443
      
      closes odoo/odoo#60785
      
      X-original-commit: 97c2f5ea51a669830b3e6d6d2d7d857742a41481
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      c64b3c22
    • Joseph Caburnay's avatar
      [FIX] l10n_in_pos: receipt rendering error when company has no country · 86423e2d
      Joseph Caburnay authored
      
      To reproduce:
      
      1. Start with empty instance with point_of_sale (no demo).
      2. Install Indian localization from Invoicing.
      3. Start a pos session with that config.
      4. Sell a product.
      5. Assign a customer to the order.
      6. Invoice the order during payment.
      7. Validate. [BUG] Empty receipt is shown in the receipt screen.
      
      This is because of empty country field of the pos.config's company.
      We modify the check for country code in the receipt template to
      account for empty country as fix.
      
      closes odoo/odoo#60801
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      86423e2d
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: empty name check when editing customer info · 025d2c96
      Joseph Caburnay authored
      
      User is not allowed to save an empty name for the customer details.
      If tried, an error message is shown. This feature has been accidentally
      dropped after the pos-owl-refactoring. We are restoring this behavior
      in this commit.
      
      closes odoo/odoo#60793
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      025d2c96
  4. Oct 26, 2020
  5. Oct 27, 2020
  6. Oct 26, 2020
  7. Oct 16, 2020
  8. Oct 26, 2020
  9. Oct 23, 2020
  10. Oct 26, 2020
  11. Oct 23, 2020
    • Swapnesh Shah's avatar
      [FIX] purchase: confirm receipt date if needed · 6f37f489
      Swapnesh Shah authored
      
      Before this commit, There would be Traceback (AttributeError: 'bool' object has no attribute 'date')
      on `Confirm Receipt Date` If order has no `Receipt Date`.
      
      Now, Button `Confirm Receipt Date` will be hidden if there is not `Receipt Date` to confirm.
      
      Closed #60222
      
      closes odoo/odoo#60659
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      6f37f489
    • qsm-odoo's avatar
      [FIX] web: preload font awesome font for frontend layouts · 60c78767
      qsm-odoo authored
      
      This commit adds an easy improvement fixing a page speed warning: the
      font awesome font (declared in a font-face in assets_common) can be
      preloaded.
      
      The only problematic point was that font-awesome defines the font by
      a series of URL using different font formats. Only one can be
      preloaded (otherwise you would load files for no reason). As all Odoo
      supported browsers use the woff2 format, we only preload that one. At
      the cost of a warning for other browsers which use a different format.
      
      task-2350647
      
      closes odoo/odoo#60588
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      60c78767
    • Jeremy Kersten's avatar
      [FIX] base, website_sale: vietnam zip not required · 2d318920
      Jeremy Kersten authored
      
      Zip cannot be required if not in format address.
      It will break ecommerce, because the customer cannot
      validate the adress because zip code is not displayed but required.
      
      Fix case in JS where field is not display to avoid traceback.
      
      This commit closes #58950
      
      closes odoo/odoo#60694
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      2d318920
  12. Oct 22, 2020
  13. Oct 23, 2020
    • Anh Thao Pham (pta)'s avatar
      [FIX] website_sale: fix fiscal position update in eCommerce cart · d89fa970
      Anh Thao Pham (pta) authored
      
      - Install website_sale
      - Go to Website > Products > Products and create a Product with "Tax 15.00%" (i.e. Product X)
      - Publish the Product on Website
      - Go to Invoicing > Configuration > Fiscal Positions
      - Create a first Fiscal Position:
        * Fiscal Position (Name): Fiscal Position A
        * Tax Mapping: Tax 15.00% => Tax 15.00%
      - Create a second Fiscal Position:
        * Fiscal Position (Name): Fiscal Position B
        * Tax Mapping: Tax 15.00% => Tax 0.00%
      - Create a Portal User (i.e. User X)
      - Go to Contacts and edit User X to set his Fiscal Position to Fiscal Position A
      - Connect with User X
      - Go to online Shop and add Product X in the cart
      - Open "My Cart" => Taxes are displayed correctly
      - Process checkout and enter an address, but do not pay
      - Disconnect
      - Change Fiscal Position of User X to Fiscal Position B
      - Reconnect with User X and open "My cart"
      - Open "My Cart" => Taxes are displayed as if the Fiscal Position has not been changed
      The prices and taxes in the cart are still based on the previous fiscale position.
      
      To fix that, fiscale position of SO will be compared to fiscale position of user,
      even if user has not changed.
      Howerver, as it is a specific use case, it will only be done if "sale_order_id" is not
      in session anymore.
      Also the cart from user's last visit will not be reloaded, but a new one will be created,
      as it is done when used pricelist is not available anymore.
      
      opw-2300330
      
      closes odoo/odoo#60585
      
      X-original-commit: bd77d0ca35a0ab724d235aca989b9c2357a25caf
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      d89fa970
    • Achraf (abz)'s avatar
      [FIX] l10n_latam_invoice_document: Add credit note to invoice · 4058b200
      Achraf (abz) authored
      
      Issue
      
          - Install "l10n_latam_invoice_document"
          - Try to add a credit note to any invoice
      
      Cause
      
          "l10n_latam_manual_document_number" is unitialized when
          "l10n_latam_use_documents" is equal to False
      
      Solution
      
          Init "l10n_latam_manual_document_number" to False
      
      opw-2366298
      
      closes odoo/odoo#60653
      
      X-original-commit: 6b5f40f4310f02204d98c58d45f92a27c7fad7c1
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      4058b200
    • fw-bot's avatar
      [FIX] website_mail_channel: fix load more replies · 1108d991
      fw-bot authored
      
      On a thread with at least 21 replies, click on "show N more replies".
      The first time, it does the last 10 replies.
      Click again: it appends the same batch of 10 replies to the thread.
      The button loads the replies starting from the last reply id,
      but this id is not updated after load.
      
      This is because the code searches for a `p.well` in the DOM
      assumed to be the `o_mg_read_more` parent (see c40f1841).
      However, commit 59237ea8 removed the `.well` class of the parent.
      The new button is not found, the old button is not removed, and so it goes.
      
      Forward-Port of 4536764a
      
      closes odoo/odoo#60643
      
      X-original-commit: 69dd830a15da2d7e43e6040e26d960d2e941002e
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      1108d991
    • Nasreddin (bon)'s avatar
      [FIX] account, l10n_ar, l10n_cl: web_studio broken due to dynamic view call · ee1580a8
      Nasreddin (bon) authored
      Issue
      
      	- Install "Accounting" & "Studio" modules
      	- Go to "Accounting" and switch studio editor
      	- Go to "Reports" tab and select "Invoices" report
      	- Click on any block to edit.
      
      	Not possible to edit document.
      
      Cause
      
      	Studio cannot parse dynamic `t-call` and therefore not able
      	to render the corrects hooks to edit the report.
      	The issue has been introduced by this commit: https://github.com/odoo/odoo/commit/5c5710ae8ea045569fd94504f9d8dd5209f7b662
      
      
      
      Solution
      
      	In the corresponding localization report template,
      	add an 'Inheritance Specs' (position="after") that will add a condition
      	where it will retrieve the rigth report name
      	in case localization enabled.
      
      opw-2362257
      
      closes odoo/odoo#60609
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      ee1580a8
    • Nicolas Galler's avatar
      [FIX] product: archiving last variant must archive product template · c51867b7
      Nicolas Galler authored
      
      Behavior prior to this fix:
      
      When archiving the last variant on a template, the product template
      stays active (contrary to the comment indicating that `toggle_active`
      will archive the related product.template if there is only one active
      `product.product`).
      
      Behavior after the fix:
      
      When archiving the last variant on a template, the product template is
      archived.  When un-archiving that variant, the product template is
      unarchived as well, without un-archiving the other variants.
      
      Note: this is a remake of a fix implemented in 77e5472c, as that fix
      did not correctly count the inactive variants.
      
      opw-2349862
      
      closes odoo/odoo#60635
      
      X-original-commit: 01160ee5
      Signed-off-by: default avatarNicolas Galler <nicocrm@users.noreply.github.com>
      c51867b7
    • qsm-odoo's avatar
      [FIX] web_editor: do not show overlay for invisible elements · 8a949019
      qsm-odoo authored
      
      When a snippet is out of the viewport or hidden, the overlay should
      not be visible. Two distinct cases we had:
      
      - When the page is scrolled, the header is sometimes hidden thanks to
        tranform: translate(0, -100%); for some kind of effect -> the header
        is thus still visible but out of the viewport, any selected snippet
        inside that header would still have this overlay enabled so we would
        see the move and delete button on the top of the screen.
      
      - When the page is scrolled, with the vertical header, some part of the
        header are hidden for the affixed version. If any snippet in those
        hidden elements was selected, the overlay is still visible floating.
      
      task-2312878
      
      closes odoo/odoo#58383
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Co-authored-by: default avatarBenjamin Vray <bvr@odoo.com>
      Co-authored-by: default avatarThanh Dodeur <tso@odoo.com>
      8a949019
Loading