Skip to content
Snippets Groups Projects
  1. Dec 31, 2021
    • Olivier Dony's avatar
      [FIX] mail, mass_mailing: fix attachment ownership · 1bcbd640
      Olivier Dony authored
      
      Attachments that are uploaded on a record that isn't saved yet are
      created with res_id set to 0. In the case of attachments linked through
      a m2m rather than the usual (res_model, res_id), it means they may not
      be readable afer the creation of the record, except by their creator.
      
      Re-attaching them to the mailing / template at the end of the create()
      call fixes the ownership.
      
      Fixes #81935
      
      closes odoo/odoo#82106
      
      X-original-commit: 3857629a
      Signed-off-by: default avatarOlivier Dony <odo@odoo.com>
      1bcbd640
    • David (dafr)'s avatar
      [FIX] stock_inventory: Fix Memory Error · a48e3820
      David (dafr) authored
      
      read_group on "stock.inventory.line" could result in a memory error when the database possess to many stock.inventory.line
      Those filters were removed on commit ba92e1da by AVD to prevent a test error where those fields were False. On his advices, I re-added them with the '|' comparator handle the False cases.
      
      OPW-2714644
      
      closes odoo/odoo#81998
      
      X-original-commit: 7e13cc7a
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      a48e3820
  2. Dec 30, 2021
    • Martin Trigaux's avatar
      [FIX] web: add record id when uploading · 6b4b68a2
      Martin Trigaux authored
      
      Before that, uploading a file from a kanban was adding res_id=0
      Was missing from 5e81850e
      
      closes odoo/odoo#82089
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      6b4b68a2
    • Habib (ayh)'s avatar
      [IMP] stock: include UOM object in aggregated product quantities · 0594c045
      Habib (ayh) authored
      
      with l10n_mx_edi_stock being introduced in enterprise - we require the unit of measure object in the aggregated lines so that it can be used on the delivery report.
      
      odoo/enterprise#21591
      Task-2585661
      
      closes odoo/odoo#82086
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      0594c045
    • qsm-odoo's avatar
      [FIX] web, *: fix the grab cursor not working on all browsers · 23ebcca9
      qsm-odoo authored
      
      *: web_editor, point_of_sale, pos_restaurant
      
      The grab cursor is currently not working on all browsers (at least
      Chrome Linux). The fallback rule does not even work, meaning that if
      you type:
      
      ```
      cursor: move;
      cursor: grab;
      ```
      
      Those browsers does not even use "move" as they see "grab" as valid but
      use the "default" cursor.
      
      This commit replaces our "grab" uses with a local cursor ensuring it
      works.
      
      Related to task-2431469
      
      closes odoo/odoo#82071
      
      X-original-commit: c8e4e1e9
      Related: odoo/enterprise#23182
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      23ebcca9
    • roen-odoo's avatar
      [FIX] sale: Payment had wrong sales team · 26e035d4
      roen-odoo authored
      
      Current behavior :
      When creating payment from invoice, the payment had the wrong sales team id
      
      Steps to reproduce :
      - Create atleast 2 invoices with different sales team and same partner
      - Register payments for every invoice
      - Go in payments list view
      - Filter on partner and group by sales team
      - All the payments are grouped in the same sales team
      
      opw-2681041
      
      closes odoo/odoo#81593
      
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      26e035d4
    • Yannick Tivisse's avatar
      [FIX] web: Fix access right issues on external layout prining · 96e4f84d
      Yannick Tivisse authored
      
      Backport of 3891ab34 to 14.0 following f2c1ee5a
      It was not possible to print payslip report
      
      Purpose
      =======
      
      If the user doesn't have access to ir.ui.view (aka no admin or
      website access rights), printing a report with a configured
      external layout will lead to a traceback, as it's forbidden
      for the use to read on the field "key" on the related ir.ui.view.
      
      As we only want to retrieve the view key, this is safe to use
      sudo at that point.
      
      Fixes odoo/odoo#81960
      
      closes odoo/odoo#82050
      
      Related: odoo/enterprise#23159
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      96e4f84d
    • Merlin (megu)'s avatar
      [FIX] stock: display forecasted quantity with correct precision · 1388a753
      Merlin (megu) authored
      
      The quantity of the forecasted report was displayed without any precision specified
      
      Steps to reproduce:
      1. Install the Stock and Sales apps
      2. Create a storable product
      3. Create a quotation for this product with a quantity of 1.63
      4. Confirm the quotation
      5. Go to the product and open the forecasted report
      6. The 'Not Available' quantity is -1.6300000000000001 instead of -1.63
      
      Solution:
      Specify the widget and decimal precision used for the quantity
      
      OPW-2713548
      
      closes odoo/odoo#81992
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      1388a753
    • Romain Derie's avatar
      [FIX] test_website: add test for 308 redirect and qs · 3e81c2e5
      Romain Derie authored
      
      With a 308 redirection from `/url` to `/new_url`:
      Links like `/url?a=a` should be rewritten to `/new_url?a=a` and not
      `/new_url?a=a&a=a`.
      
      closes odoo/odoo#81685
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3e81c2e5
    • Nicolas Lempereur's avatar
      [FIX] http_routing: redirect no double query_string · 86974f91
      Nicolas Lempereur authored
      Reproduction:
      
      - have 308 redirection from /shop to /boutique and refresh routes
      - go in incognito on /boutique?order=name+asc (don't go on
        /boutique first, or restart odoo to clear ORM cache)
      - select a sorting option eg. price
      
      => we are redirected to /boutique?order=name+asc?order=list_price+asc
      and this error is shown:
      
      Invalid "order" specified (is_published desc, name asc?order=list_price
       asc, id desc).
      
      This is happening because url_rewrite is keeping current query string
      (see ir.http()._slug_matching) and caching it. So if the first call
      caches:
      
        url_rewrite('/boutique') => /boutique?order=name+asc
      
      all other url_rewrite('/boutique') calls will give you
      /boutique?order=name+asc even if the query string has changed.
      
      In addition to that, url_for may append query_string to url_rewrite
      return value, so you may get a double query_string such as:
      
      ?order=name+asc?order=list_price+asc
      
      which causes the error.
      
      In this fix, we restore the removal of query string that was removed in
      3beb4545.
      
      opw-2702036
      
      Part-of: odoo/odoo#81685
      86974f91
  3. Dec 29, 2021
  4. Dec 28, 2021
  5. Dec 27, 2021
    • qsm-odoo's avatar
      [FIX] website: do not lose the shadow configuration on option hover · e2a1c683
      qsm-odoo authored
      
      Hovering the shadow mode option reset the entire shadow instead of just
      previewing the mode change.
      
      Related to opw-2701512
      
      closes odoo/odoo#81038
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      e2a1c683
    • Nasreddin Boulif (bon)'s avatar
      [FIX] website: allow to remove shadow on all cards · 2eb70a47
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install `website_hr_recruiment` module
        - Go to `your_website.com/jobs`
        - Activate Edit mode and add a "3 Columns" block
        - Select one of the columns and set the shadow to `None`
      
      Issue:
      
        Shadow is not removed, and by default the "outset" mode is selected.
      
      Cause:
      
        When we check the state of the shadow with `css('box-shadow')`, it
        will always be set because a custom css 'box-shadow' is set by the
        module website_hr_recruitment on card element, and therefore the value
        will always be either 'inset' or 'outset'.
      
      Solution:
      
        If widget value is set to '', replace `box-shadow` style to 'none'
        (only if needed) so it will override the style from css file.
      
      opw-2701512
      
      Part-of: odoo/odoo#81038
      Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
      2eb70a47
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] sale_timesheet: Use invisible=1 on the non_allow_billable field · de969a63
      Hubert Van de Walle (huvw) authored
      
      Steps to follow
      
       -  Go to project
       -  Select a project task with timesheet
       -  Edit the view with studio
       -  Edit the timesheet list view
       -  Enable 'Show Invisible Elements'
       -  Select 'Non-Billable'
       -  Uncheck 'Invisible'
       -> An exception is thrown
      
      Cause of the issue
      
        attrs.column_invisible was used with invisible
      
      Solution
      
        remove attrs.column_invisible
      
      opw-2706370
      
      closes odoo/odoo#81751
      
      Signed-off-by: default avatarHubert Van De Walle <huvw@odoo.com>
      de969a63
    • Josse Colpaert's avatar
      [FIX] l10n_es_edi_sii: partners without vat should work as well · 2b164b8e
      Josse Colpaert authored
      
      Before, the system required a vat number on every partner, but that
      is not required.  We need to send it as some other kind of ID however.
      
      To clarify, a partner without vat is not for the simplified case only.
      
      closes odoo/odoo#81906
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      2b164b8e
    • Sébastien Theys's avatar
      [FIX] mail, im_livechat, *: restore usage of livechat user name · c4b50b18
      Sébastien Theys authored
      
      * = website_livechat
      
      Prevents from leaking unnecessary information to livechat clients.
      
      opw-2453956
      
      closes odoo/odoo#68946
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      c4b50b18
    • Nasreddin Boulif (bon)'s avatar
      [FIX] sale,website_sale: Display extra prices with taxes included · d3eac801
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce the issue:
      
        - Install eCommerce and Inventory module
        - Go to Settings
        - Ensure `Product Prices` is set to 'Tax included'
        - Ensure `Variant Grid Entry` is activated
        - Create a new Product as storable
        - Set `Sales Price` to $1.0
        - Set `Customer Taxes` to 10.00 %
        - Under `Variants` tab, set 'Sales Variant Selection' to 'Order Grid Entry'
        - Under `Variants` tab add an Attribute with 2 values
        - Set "Price Extra" to $2.0 to one of the variants
        - Go to the Shop and select the product
      
      Issue:
      
        The extra price badge does not include the taxes
        ($2.0 instead of $2.2), however the final price does.
      
      Cause:
      
        The price_extra field from ptav (used in the badge) does not include
        the taxes.
        However, when calculating the final price, we do first the sum of all
        prices (including the extra prices) and then apply the taxes.
      
      Solution:
      
        In the template, for each 'variants', we call `_get_combination_info`
        to get the variant.price_extra with taxes included/excluded
        depending the `Product Prices` setting.
      
      opw-2669871
      
      closes odoo/odoo#81858
      
      X-original-commit: 83c927f3
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
      d3eac801
  6. Dec 26, 2021
  7. Dec 24, 2021
    • Josse Colpaert's avatar
      [FIX] l10n_es_edi_sii: do not change the success · 853ff30b
      Josse Colpaert authored
      
      Before, the 'success' key was removed from the results
      of the invoice processing and as such the invoice
      was never put as successfully sent, but you sent it
      again and again.
      
      closes odoo/odoo#81902
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      853ff30b
    • Josse Colpaert's avatar
      [FIX] l10n_es_edi_sii: certificate problems with newer libraries · f908171f
      Josse Colpaert authored
      In urllib3 1.25, an _is_key_file_encrypted method was added
      where urllib3 checks if the keyfile is encrypted or not, but
      urllib3 uses filenames, while we want to use the contents of cert.
      So, in our case, this gave a traceback because it could not open
      the file.
      
      The final simple solution for now is to keep keyfile empty as
      we store our info in certfile anyways already.
      
      Part-of: odoo/odoo#81902
      f908171f
    • Bruno-brsy's avatar
      [FIX] account: Validate invoice with archived bank account · 8b9ff034
      Bruno-brsy authored
      
      It's possible to confirm an invoice with an archived bank account of
      the recipient. But it's not making any sense, since the bank account
      is archived.
      
      It's why we need to raise an error if the user want to confirm an
      invoice with an archived bank account.
      
      opw-2704605
      
      closes odoo/odoo#81287
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      8b9ff034
  8. Dec 23, 2021
    • Florian Damhaut's avatar
      [FIX] hr_fleet: no duplicate contract renewal activity reminder · 3610069e
      Florian Damhaut authored
      
      Step to reproduce:
      - Have a fleet contract that need renewal
      
      Current Behaviour:
      - A new activity is created everytime the scheduler is called
      
      Behaviour after PR:
      - A new activity is only created if there is no current renewal activity present when the scheduler is called
      
      opw-2713537
      
      closes odoo/odoo#81671
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3610069e
    • Merlin (megu)'s avatar
      [FIX] point_of_sale: session's cash journal entries correctly computed · 0e723c6c
      Merlin (megu) authored
      
      Journal entries related to a POS session without cash are wrong
      
      Steps to reproduce:
      1. Install the Point of Sale and Accounting apps
      2. Go to Point of Sale -> Configuration -> Point of Sale and create a new one
      3. Remove the payment method 'Cash' for this POS and save
      4. Open a session in this POS, sell something and then close and post journal entries
      5. Open the Journal Items related to the session
      
      Solution:
      Fix the account_move_line query to match the statement_id with the session's statement_ids
      
      OPW-2684748
      
      closes odoo/odoo#81790
      
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      0e723c6c
    • Nicolas (vin)'s avatar
      [FIX] [base, account_edi_facturx]: Fix pdf export · b3a748a8
      Nicolas (vin) authored
      
      There is an issue when exporting pdf using edi documents created before
      the PDF/A commit. With the subtype now included, the system would try
      to use the subtype given by the ir.attachment which would not be formated
      as expected by the pdf file format.
      
      The attachment may get neutered by the ORM, so we may have to force
      the mimetype when embedding it.
      
      This fix in two parts will allow to force a subtype when adding an
      attachment into a pdf, as well as parse the subtype of ir.attachment
      to give them the right format.
      
      xxx/xxx should become /xxx#2Fxxx
      
      opw-2714040
      
      closes odoo/odoo#81709
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      b3a748a8
    • Stéphane Bidoul's avatar
      [IMP] account: avoid join when filtering on journal · 2741f245
      Stéphane Bidoul authored
      
      account.move.line has a journal_id field that is related on move_id.journal_id.
      By searching on journal_id we avoid a useless join,
      offering more room for database query optimizations.
      
      closes odoo/odoo#81797
      
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      2741f245
    • Stéphane Bidoul's avatar
      [IMP] account: search on parent_state instead of move_id.state · e67fe3d1
      Stéphane Bidoul authored
      
      By searching on account.move.line parent_state instead
      of move_id.state, we avoid a join in many circumstances
      and allow the database to benefit on an index on
      company_id+parent_state to optimize several
      queries, such as the default filter on the Journal Items
      menu which shows posted items.
      
      closes odoo/odoo#81793
      
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      e67fe3d1
  9. Dec 22, 2021
  10. Dec 21, 2021
    • Arnold Moyaux's avatar
      [FIX] sale_mrp: quantity invoiced in cogs is different than qty delivered · 1a56d664
      Arnold Moyaux authored
      
      When a kit is exploded to `stock.move` the quantity is rounded half-up
      for every move. But during the invoice. The quantity to invoice on
      kit is rounded up so it could result in differences between the
      inventory valuation and the cost of the product
      
      closes odoo/odoo#81588
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      1a56d664
    • nni-odoo's avatar
      [FIX] sale_mrp: unit price calculation BoM in different UoM · d7c2f59d
      nni-odoo authored
      Fix for task 2620026.
      
      _get_bom_component_qty function is only referred to once in the whole odoo app,
      which is on addons/sale_mrp/models/account_move.py#22.
      
      The result returned from this function is used as a multiplier to quantity
      to convert into the expected UoM. However, the quantity being referred to on
      _stock_account_get_anglo_saxon_price_unit (qty_invoiced, qty_to_invoice), are
      already converted into the SO Line's product's default UoM. In this function,
      it however tries to convert 1 from SO Line's UoM to BoM's UOM.
      
      With this, if Product UoM=x, SO Line UoM=y, BOM UoM=x, in the function _stock_account_get_anglo_saxon_price_unit,
      the quantities will be multiplied by the same factor twice, resulting to the incorrect computation of price_unit to follow.
      
      Part-of: odoo/odoo#81588
      d7c2f59d
Loading