Skip to content
Snippets Groups Projects
  1. Sep 14, 2021
  2. Sep 13, 2021
    • Nathan Marotte (nama)'s avatar
      [FIX] website_slides : iframe code block appearing when pdfviewer loaded · 0e9975d7
      Nathan Marotte (nama) authored
      Issue: When viewing a pdf in a website_slide, in certain conditions (
      odoo detect the slide is externally embedded), a <iframe> code block
      is displayed on the pdf rendering it really hard to read. As a work
      around, one could click on the "<\> Embed" button to make it disapear
      
      Steps to reproduce :
       1) Run a local odoo server with the website_slides module
       2) Set up a ngrox tunneling service to your localhost and good port
       3) Find or create a **document** slide and get its id (<slide_id>)
       4) Access the slide via the website url on the slide
       5) Go down the page in the Share tab and copy the iframe
        -Replace http by https in the src attribute of the iframe if necessary
       6) go back to the dashboard, open the inspector and add the iframe in
       the body of the webpage
       -> The slide is correctly detected as non embed
       7) Access your Odoo database with the ngrox https forward (example :
       https://0dfc-2a02-a03f-6b9b-b300-bd6c-8048-90f1-3f25.eu.ngrok.io)
       8) Repeat step 3 to 6 included
       -> The slide is detected as embed, so a <iframe> text area appears
       and make the pdf hard to read
      
      Alternative steps to reproduce :
       1) Run a local odoo server with the website_slides module
       2) Go to the usual http://localhost:8069/ to access your database and
       navigate to a PDF slide in eLearning
       3) Change the localhost in the URL to 127.0.0.1 (Example
       http://localhost:8069/slides/slide/gardening-the-know-how-1 becomes
       http://127.0.0.1:8069/slides/slide/gardening-the-know-how-1
      
      ) and press
       Enter to go to the new URL
       4) Change back the 127.0.0.1 to localhost and press Enter to go to the
       new URL
       5) You might have to repeat the back and forth between the two domains
       -> The slide is detected as embed, so a <iframe> text area appears
       and make the pdf hard to read
      
      Why is that a bug:
       It makes the PDF unreadable unless we know that we must click on that
       button, it really shouldn't be like that
      
      opw-2499110
      
      closes odoo/odoo#76277
      
      Signed-off-by: default avatarNathan Marotte <nmarotte@users.noreply.github.com>
      0e9975d7
    • Nasreddin Boulif (bon)'s avatar
      [FIX] base,l10n_ch: Display all QR codes in QR bill · 684f0c44
      Nasreddin Boulif (bon) authored
      Issue:
      
        When trying to print a Suisse QR bill, if multiple images are presents
        in document and they have a url as src, some pictures will not be
        displayed.
        (Same issue may occur with simple QR code)
      
      Cause:
      
        It's a known issue with wkhtmltopdf: https://github.com/odoo/odoo/commit/2949138a7d84cd6c925ea1745d62f25ef077bb8b
      
      
        Also, adding css class to body by js break wkhtmltopdf.
      
      Solution:
      
        Replace link by base64 image value (use a function to retrieve base64
        image instead of image_url).
        Remove class 'l10n_ch_qr' added by js (no need since CSS file didacted
        to this report).
      
        extra: Alter some css for better rendering.
      
      opw-2620082
      
      closes odoo/odoo#76235
      
      X-original-commit: e0d5f63710c6d331c3cf7ab3fab5a0ce8e5e1b20
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
      684f0c44
    • mreficent's avatar
      [IMP] account: add hook to pre-process taxes_map · 748ac076
      mreficent authored
      
      Currently, the _recompute_tax_lines method is too long and there is no way to customize the taxes_map before move line creation. This commit adds a hook to be able to customize the tax dict values.
      
      closes odoo/odoo#76107
      
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      748ac076
  3. Sep 12, 2021
  4. Sep 10, 2021
  5. Sep 09, 2021
    • Roy Le's avatar
      [FIX] payment: fix some warning in console log · 2842a3c3
      Roy Le authored
      
      The method '_company_default_get' on res.company is deprecated and
      shouldn't be used anymore.
      
      closes odoo/odoo#76186
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      2842a3c3
    • François (FRC)'s avatar
      [FIX] snailmail: better tests & delivery address now visible on report · ea1869d0
      François (FRC) authored
      
      Tests now check for the 'error' field in Pingen repsonse
      snailmail_external_layout.js now targets the right div
      
      closes odoo/odoo#76246
      
      Task: 2588145 & 2583718
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      ea1869d0
    • Anh Thao Pham (pta)'s avatar
      [FIX] stock_account: fix access error when computing average price · cc76e76e
      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#75507
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      cc76e76e
    • Anh Thao Pham (pta)'s avatar
      [FIX] web: fix data in view graph for concurrent groupby · 1cda59cf
      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#75307
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      1cda59cf
    • Nathan Marotte (nama)'s avatar
      [FIX] mrp : Confirm MO twice generates multiple stock move · ec86c67a
      Nathan Marotte (nama) authored
      
      Issue: When two Odoo webpage are open on a Manufacturing order, it is
      possible to mark the MO as todo twice, then when trying to record the
      production, there will be a traceback Expected Singleton
      
      Steps to reproduce:
       1) Install MRP
       2) Create a Manufacturing order for a Product with a BO
       3) Save, open a new odoo webclient and go to the same MO
       4) Mark as todo on each webclient
       5) Check availability on each webclient
       6) Produce on each webclient, and save the wizard
       -> Traceback Expected Singleton
      
      opw-2636556
      
      closes odoo/odoo#76210
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      ec86c67a
    • Adrien Widart's avatar
      [FIX] point_of_sale: consider scanned price as manual price · 3b8615c0
      Adrien Widart authored
      
      In a POS session, when using the scanner, if the seller changes the
      customer, the prices may become incorrect
      
      To reproduce the issue
      1. Create a product P:
          - Sales Price: 38
          - Barcode: 2312345000002
          - Available in POS: True
      2. Start a POS session (with debug Window)
      3. Scan 2312345010001
          - This is product P with price $10
      4. Set a Customer
      
      Error: The price is now $38
      
      Because the price has not been set manually, when changing the customer,
      the pricelist is updated and so does the price.
      
      When scanning a barcode that includes a price, the latter should be
      considered as manually set.
      
      OPW-2618934
      
      closes odoo/odoo#76074
      
      X-original-commit: e6672427
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      3b8615c0
  6. Sep 06, 2021
  7. Sep 05, 2021
  8. Sep 02, 2021
    • Bruno Zanotti's avatar
      [FIX] l10n_ar: return vat info grouped by tax · a9d35786
      Bruno Zanotti authored
      
      In the method _get_vat(), used to inform AFIP about the vat taxes of an
      invoice, we were assuming that in the journal items of the invoices
      there is always one line per tax group, but if the user enables the
      option "Include in Analytic Cost" of the tax, then it could create more
      than one line per tax so it will return an error if you try to validate
      the invoice in AFIP or upload the vat book.
      
      closes odoo/odoo#75802
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      a9d35786
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: ensure safe UoM change for done smls · 8ca10a8f
      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#75823
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      8ca10a8f
  9. Sep 01, 2021
  10. Aug 31, 2021
  11. Aug 30, 2021
    • Denis Ledoux's avatar
      [FIX] mrp: `qty_available` computation of a nested bom kits asked together · c2df3d43
      Denis Ledoux authored
      
      This revision has a similar goal than the previous revision
      62c5b8d9
      but this times, it's a kit/phantom bom which is nested in another
      kit/phantom bom, and their computation is asked in the same time.
      
      ```
      2021-08-20 11:29:54,835 1689 ERROR db_22687 odoo.upgrade.stock.tests.test_on_hand_quantity: FAIL: TestOnHandQuantityUnchanged.test_check
      Traceback (most recent call last):
        File "/tmp/tmpv3ujv2vr/migrations/testing.py", line 208, in test_check
          self.check(value)
        File "/tmp/tmpv3ujv2vr/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: [[551[14585 chars] [8988, '137'], [8989, '137'], [8990, '20'], [[1793 chars]91']] != [[551[14585 chars] [8989, '137'], [8990, '20'], [8991, '126'], [[1778 chars]91']]
      
      First differing element 1007:
      [8988, '137']
      [8989, '137'
      ```
      
      ```
      SELECT b.id, b.type,  p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as
      kit_product_name FROM mrp_bom b JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product p ON p.pr
      oduct_tmpl_id = pt.id WHERE p.id = 8988;
      -[ RECORD 1 ]-------+-----------------
      id                  | 2208
      type                | phantom
      kit_product_id      | 8988
      kit_product_tmpl_id | 9049
      kit_product_name    | KIT Poulie AR G4
      ```
      
      ```
      SELECT b.id, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as kit_product_name, l.product_id as component_product_id, component_t.name as component_name FROM mrp_bom_line l JOIN mrp_bom b ON l.bom_id = b.id JOIN product_product p ON p.product_tmpl_id = b.product_tmpl_id JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product component ON component.id = l.product_id JOIN product_template component_t ON component_t.id = component.product_tmpl_id WHERE l.product_id = 8988;
      -[ RECORD 1 ]--------+---------------------
      id                   | 2213
      kit_product_id       | 8761
      kit_product_tmpl_id  | 8879
      kit_product_name     | VEL BP KIT direction
      component_product_id | 8988
      component_name       | KIT Poulie AR G4
      ```
      
      upg-22687
      
      closes odoo/odoo#75654
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      c2df3d43
  12. Aug 29, 2021
  13. Aug 27, 2021
  14. Aug 26, 2021
Loading