Skip to content
Snippets Groups Projects
  1. Sep 12, 2021
  2. Sep 10, 2021
    • Denis Ledoux's avatar
      [FIX] mrp: qty for bom kits with multiple boms with same sequence · 355056e8
      Denis Ledoux authored
      
      When a product is configured with 2 different boms kit
      using the same sequence,
      the bom chosen could change randomly, therefore randomly
      changing the available quantity.
      
      This has been detected during an upgrade,
      With the unit test checking the quantities
      of the products doesn't change before and after the upgrade,
      and in this case, the bom chosen before upgrade
      was different than the bom chosen after upgrade,
      therefore changing the available quantity of this product
      before and after upgrade.
      
      ```
      Traceback (most recent call last):
        File "/tmp/tmp659zn85u/migrations/testing.py", line 208, in test_check
          self.check(value)
        File "/tmp/tmp659zn85u/migrations/stock/tests/test_on_hand_quantity.py", line 20, in check
          self.assertEqual(before_results, self.convert_check(after_results), self.message)
      AssertionError: Lists differ: [[262[3108 chars], '-107'], [3879, '-36'], [3983, '-39'], [3984[5666 chars]14']] != [[262[3108 chars], '-150'], [3879, '-36'], [3983, '-39'], [3984[5666 chars]14']]
      
      First differing element 209:
      [3878, '-107']
      [3878, '-150']
      
      Diff is 10670 characters long. Set self.maxDiff to None to see it. : Invariant check fail
      ```
      
      upg-27353
      
      closes odoo/odoo#76363
      
      X-original-commit: 9e7d7fe8
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      355056e8
    • Josse Colpaert's avatar
      [ADD] l10n_es_edi_sii: send invoices to sii for G417 Llevanza de los libros · ff306425
      Josse Colpaert authored
      
      This module sends the taxes information (mostly VAT) of the
      vendor bills and customer invoices to the SII.  It is called
      Procedimiento G417 - IVA. Llevanza de libros registro.  It is
      required for every company with a turnover of +6M€ and others can
      already make use of it.  The invoices are automatically
      sent after validation.
      
      How the information is sent to the SII depends on the
      configuration that is put in the taxes.  The taxes
      that were in the chart template (l10n_es) are automatically
      configured to have the right type.  It is possible however
      that extra taxes need to be created for certain exempt/no sujeta reasons.
      
      You need to configure your certificate and the tax agency.
      
      closes odoo/odoo#70302
      
      Task: 2492978
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      ff306425
    • Josse Colpaert's avatar
      [IMP] account_edi: Backport of the method to retrieve tax details per line · a2df68f3
      Josse Colpaert authored
      Task: 2492978
      Part-of: odoo/odoo#70302
      a2df68f3
    • Xavier ALT's avatar
      [FIX] cloc: also exclude module's "upgrades" folder by default · 985f3f70
      Xavier ALT authored
      
      Since commit bbb1a8f1, module's upgrade script can also be added
      into special 'upgrades' folder as an alternative to the old 'migrations'
      folder.
      
        As those upgrade scripts are not maintained from version to version, we
      should not count them as maintenance.
      
      OPW-2536046
      
      closes odoo/odoo#76315
      
      X-original-commit: 28a303a6
      Signed-off-by: default avatarXavier Alt (xal) <xal@odoo.com>
      985f3f70
    • Arnaud (arg)'s avatar
      [IMP] auth_totp: add 2FA Trusted Devices · 4736344a
      Arnaud (arg) authored
      
      + Added the 'Trusted Devices' feature
      + Added 'Remember this Device' checkbox on /web/login/totp
      + Added trusted device's OS / browser on Profile > Account Security
      
      Added '2FA Trusted Devices' feature to allow users to remember their
      device to bypass the 2FA for the next connections. The trusted devices
      are displayed in a 'Trusted Devices' One2Many under the 'Developer API
      Keys'. It is possible to revoke all the trusted devices at once with a
      special button. It is also possible to revoke one at a time on the
      desired one.
      
      Add tour
      Remove the "new Promise()" that makes the logout step fail (and seems
      unnecessary).
      
      closes odoo/odoo#69608
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      4736344a
    • Anh Thao Pham (pta)'s avatar
      [FIX] web: fix data in view graph for concurrent groupby · ee84815f
      Anh Thao Pham (pta) authored
      
      - Go to any graph view (i.e. in CRM)
      - Change "Group By" 2 times very very quickly
      (In Chrome, you can set Throttling to "Slow 3G" in Network tab of devtools)
      Data from first groupby will be mixed with data from the second one.
      
      A graph reload is performing the following steps:
        * clean previous data
        * fetch data
        * set data
      The issue happens when a second reload is performed while the previous one
      has not set its data yet and the cleaning step of the second one is performed
      before the setting step of the first one.
      
      The solution will be to ignore the setting step of all previous reloads if
      there is a more recent one.
      
      opw-2460145
      
      closes odoo/odoo#76269
      
      X-original-commit: 1cda59cf
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      ee84815f
    • Anh Thao Pham (pta)'s avatar
      [FIX] stock_account: fix access error when computing average price · f70e0d59
      Anh Thao Pham (pta) authored
      
      - Create a product with Category configured with:
        * Costing Method: First In First Out (FIFO)
        * Inventory Valuation: Automated
      - Create a PO to buy 1 unit and receive the product
      - Create a SO to sell 1 unit and deliver the product
      - Return the product
      - Re-deliver the product
      - Create invoice for SO but don't post it
      - Connect with an user with "Accounting: Accountant" rights only
      - Post the invoice
      An access error will be triggered when trying to access stock valuation layer.
      
      opw-2623376
      
      closes odoo/odoo#76270
      
      X-original-commit: cc76e76e
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      f70e0d59
  3. Sep 09, 2021
    • Roy Le's avatar
      [FIX] payment: fix some warning in console log · f2d3b385
      Roy Le authored
      
      The method '_company_default_get' on res.company is deprecated and
      shouldn't be used anymore.
      
      closes odoo/odoo#76284
      
      X-original-commit: 2842a3c3
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      f2d3b385
    • Goffin Simon's avatar
      [FIX] sale: Partial payment link with invoice policy based on deliverd qty · dee53d8a
      Goffin Simon authored
      
      - Configure payment stripe to be available on the web shop
      - Let's consider a product with P (sales price = 100€) invoice policy based on delivered qty
      - Set in the config parameter sale.automatic_invoice to True
      - Create a SO with P and generate a payment link PL for 50€
      - Go to PL and pay it
      
      Bug:
      
      An error was raised because there was no invoicable line when computing the
      invoice of SO
      
      opw:2635175
      
      closes odoo/odoo#75892
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      dee53d8a
    • Aurélien Warnon's avatar
      [FIX] website_event_track_live: fix widescreen detection for YouTube tracks · bfb692dd
      Aurélien Warnon authored
      
      Currently, when there is a YouTube URL configured on the track, we
      automatically set the layout of the track page as "widescreen".
      
      This implies that we hide some menus and adapt the layout to display the full
      video player.
      
      However, in the XML template of the track view, we only display the video
      player if there is a YouTube URL configured AND one or more of those conditions
      is respected:
      - The track is configured as a "YouTube Replay"
      - The track is "coming soon" (< 30 minutes)
      - The track is live
      - The track is done
      
      This is done to match the two behaviors and get a consistent display.
      
      Task-2643147
      
      closes odoo/odoo#76248
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      bfb692dd
    • Martin Trigaux's avatar
      [I18N] l10n_ch: translate the CoA in en_GB · 4fe49475
      Martin Trigaux authored
      
      opw-2640962
      
      closes odoo/odoo#76239
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      4fe49475
    • Lucas Perais (lpe)'s avatar
      [FIX] web: owl_compatibility: don't call mounted when a rendering is being done · 7ca2adb1
      Lucas Perais (lpe) authored
      
      Following commit 637684fb which improved
      the conditions under which the ComponentWrapper compatibility layer
      should trigger owl's `__callMounted` on all the owl children of a Legacy Widget.
      
      One case was forgotten though: when the current component (wherever it is in the hierarchy)
      is rendered BUT another rendering has been initiated meanwhile.
      
      In that case, we shouldn't mark the component as mounted. The owl's fiber.complete algorithm
      will take care of calling __callMounted when it finishes.
      
      closes odoo/odoo#75950
      
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      7ca2adb1
    • alt-odoo's avatar
      [FIX] crm: prevent division by zero in lead probability computation · 53edff79
      alt-odoo authored
      If for some reason we cannot compute lead probability, we should simply
      continue to the next value without causing a division by zero.
      
      For example, this can happen if all stages are team specific, as there is
      a current limitation regarding the first stage (used to know how many lost
      and won there is) that requires to have no team assigned to it. This is a
      side effect of the commit https://github.com/odoo/odoo/commit/cd291b79eb2d2df80899867263ec71438ab8fe87
      
       introduced in V14, and we should add
      a test to ensure we do not crash in that case.
      
      closes odoo/odoo#76110
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      53edff79
    • Swapnesh Shah's avatar
      [FIX] stock: allow to create new picking type to non-admin users · c5de1231
      Swapnesh Shah authored
      
      Before this commit, Inventory Admin was not able to create new /edit picking type
      as Non-admin users doesn't have rights to create/edit sequence.
      
      With this commit, we are creating/editing `sequence_id` with sudo
      
      closes odoo/odoo#75606
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      c5de1231
    • Ivan Yelizariev's avatar
      [FIX] mrp: fix uom conversion in bom kit · 26b28408
      Ivan Yelizariev authored
      
      no need to make rounding during computing qty_available
      
      STEPS (see the test):
      
      * create product with uom dozens
      * create product with uom units
      * create bom kit to convert one to another
      * set qty on hand to 1 for product dozens
      * check qty for product units
      
      BEFORE: qty=11
      AFTER:  qty=12
      
      ---
      
      opw-2632782
      
      closes odoo/odoo#76145
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      26b28408
    • Swapnesh Shah's avatar
      [FIX] gamification: use context_today instead of today · addd4ae7
      Swapnesh Shah authored
      
      `fields.Date.today` doesn't give date based on TZ which might be wrong
      in some cases as it doesn't respect TZ.
      
      With this commit, we are using `fields.Date.context_today` as default date.
      
      closes odoo/odoo#75600
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      addd4ae7
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: ensure safe UoM change for done smls · b115f606
      Tiffany Chang (tic) authored
      
      We fix 2 related UoM issues:
      
      1. Fix quant inconsistency from changing the UoM of Done
         stock.move.lines
      
      Steps to reproduce:
      - Enable "Storage Locations" setting
      - Create a new "Storable Product" and create a receipt for 1 unit of it
      - Validate the 1 unit receieved
      - Open "Detailed Operations" of the move and change the stock.move.line
        UoM to dozen.
      
      Expected result: 13 on hand
      Actual result: 1 on hand
      
      To fix this:
      - prevent users from editing the UoM after the picking is
        done (i.e. unless adding a new stock.move.line and not saving).
      - update the write on done logic so stock.move.line UoM changes are
        considering and will update the quant correctly (in case of RPC or
        direct write).
      
      2. Prevent changing UoM of Done stock.move to prevent inconsistent field
      values within stock.move and confusion for users
      
      Steps to reproduce:
      - Complete a picking (incoming is easiest to see) with a new product
        (i.e. 0 qty) having 1 unit done.
      - Unlock picking and add a new stock.move with 1 unit done and save.
      - Edit the just added stock.move's UoM from Units to Dozen.
      - Check the quantity on hand / Done qty of stock.move after leaving and
        returning to form.
      
      Expected result: 13 On Hand
      Actual Result: 2 On Hand and the "Done" qty in the picking is 0.0083
        (i.e. 1/12 of a dozen)
      
      To fix this:
      - prevent users from editing the UoM after the picking is done (unless
        adding a new stock.move and not saving)
      - if a Done stock.move UoM is uodated, a UserError occurs because there
        is no straightforward way to ensure the quant is updated correctly
        since is handled within the move.line (i.e. has no visibility to its
        move's uom change => changing only UoM and not qty done will result in
        no quant update)
      
      closes odoo/odoo#75891
      
      X-original-commit: 8ca10a8f
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      b115f606
  4. Sep 08, 2021
  5. Sep 07, 2021
  6. Sep 06, 2021
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] l10n_de_skr04: bad debt accounts have wrong type · 3cc4f777
      Hubert Van de Walle (huvw) authored
      
      Bad debt accounts should be of expenses type like the ones in the l10n_de_skr03 addon
      
      opw-2512526
      
      closes odoo/odoo#76019
      
      X-original-commit: 5780e50c
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      Signed-off-by: default avatarHubert Van De Walle <hubvd@users.noreply.github.com>
      3cc4f777
    • Audric Onockx (auon)'s avatar
      [FIX] account_qr_code_sepa : Fixed format of 'amount of transfer' not correct in QR-code · 4d5b4de9
      Audric Onockx (auon) authored
      
      Reproduce :
      - Create an invoice with a sepa QR-code.
      
      Result :
        When reading the QR-code, German banks assume the fisrt 3 characters are the currency name/code, so the first 3 digits of the amount are cut from this amount.
      
      Solution :
        The amount now starts with the currency name/code (3 letters), as prescribed by EPC norms.
      
      opw-2591454
      
      closes odoo/odoo#75816
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      4d5b4de9
    • Denis Ledoux's avatar
      [FIX] stock: `report_stock_quantity` ambiguous column product_qty · 13468160
      Denis Ledoux authored
      
      In case there is a `product_qty` column added by a custom module,
      `product_qty`, without specifying from which table to take it from
      in the view definition, can lead to an ambiguous definition.
      
      ```
      2021-08-25 12:25:31,624 1145 ERROR db_23001 odoo.modules.registry: Failed to load registry
      Traceback (most recent call last):
        File "/home/odoo/src/odoo/13.0/odoo/modules/registry.py", line 86, in new
          odoo.modules.load_modules(registry._db, force_demo, status, update_module)
        File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 424, in load_modules
          force, status, report, loaded_modules, update_module, models_to_check)
        File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 315, in load_marked_modules
          perform_checks=perform_checks, models_to_check=models_to_check
        File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 202, in load_module_graph
          registry.init_models(cr, model_names, {'module': package.name}, new_install)
        File "/home/odoo/src/odoo/13.0/odoo/modules/registry.py", line 370, in init_models
          model.init()
        File "/home/odoo/src/odoo/13.0/addons/stock/report/report_stock_quantity.py", line 126, in init
          self.env.cr.execute(query)
        File "/home/odoo/src/odoo/13.0/odoo/sql_db.py", line 173, in wrapper
          return f(self, *args, **kwargs)
        File "/home/odoo/src/odoo/13.0/odoo/sql_db.py", line 250, in execute
          res = self._obj.execute(query, params)
      psycopg2.errors.AmbiguousColumn: column reference "product_qty" is ambiguous
      LINE 21: ...AND whd.id IS NULL) OR ls.usage = 'transit' THEN -product_qt...
      ```
      
      upg-23001
      
      closes odoo/odoo#76020
      
      X-original-commit: 07f0ffad
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      13468160
    • Touati Djamel (otd)'s avatar
      [FIX] sale_stock: prevent cancelling of pending deliveries · ca7d5701
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Install sale and inventory
      - Create a SO with Qty 10 and confirm it
      - Go to the delivery
      - Make partial delivery of 5 units and create back-order of remaining 5 units.
      - the status of backorder is “waitting”
      - Get back to the sale order and cancel it
      - the wizard “sale_order_cancel” is displayed, which gives a reminder of some partial deliveries are already done and asks to confirm the cancellation of SO
      - Do not confirm the cancellation of SO and click on the cancel button
      - Go to the delivery
      - The pending deliveries are cancelled
      
      Problem:
      The `"action_cancel"` function in the `"sale_order"` model is first called to cancel pending deliveries,
      then the `"action_cancel"` function of the `"sale"` model is called, but in that we check if whether one of the deliveries
      is already completed in order to display the wizard.
      
      But if the customer clicks the cancel button in the wizard, the SO will not be canceled, but the pending deliveries will already be.
      
      Solution:
      Check in the `"action_cancel"` function of the `"sale.order"` model if whether one of the deliveries is already been completed,
      if so, do not cancel the pending deliveries and wait for user confirmation in the wizard.
      
      opw-2623404
      
      closes odoo/odoo#75949
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      ca7d5701
    • Goffin Simon's avatar
      [FIX] sale, sale_crm: Wrong salesperson when creating SO from lead · 198019b5
      Goffin Simon authored
      
      Steps to reproduce the issue:
      
      - Let's log in Odoo with a user U1
      - Create a lead with user U2 as salesperson
      - Click on New quotation
      
      Bug:
      
      A SO was suggested with U1 as salesperson instead of U2
      
      opw:2520827
      
      closes odoo/odoo#76009
      
      X-original-commit: a8f1ee59
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      198019b5
    • ijas ahammed's avatar
      [FIX] link_tracker,test_mail_full: fix traceback while converting links · 3cc5217f
      ijas ahammed authored
      
      Currently, when we try to shorten the links from content with help of
      `_shorten_links_text` method, it throws traceback if the body(content)
      we pass is `False`(might happen when we directly pass a model field of
      textual type but the field doesn't have a value yet). It's because
      the `re` expects the content to be string / bytestring.
      
      This commit fixes the issue by adding a check in this method, which
      will simply return `False` if there's no body.
      
      Task-2628586
      
      closes odoo/odoo#75987
      
      X-original-commit: 41f59a61
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      3cc5217f
    • Louis Baudoux's avatar
      [FIX] account: fix `bank_id` from another company · 12559929
      Louis Baudoux authored
      
      When using module `account_invoice_extract`, it would happen that a
      bank account of another company was set on the `account.move`.
      This happened when the extract update was done in background via the
      cron.
      A check on the company of the bank account fixes the issue.
      
      opw-2631833
      
      closes odoo/odoo#75989
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      12559929
Loading