Skip to content
Snippets Groups Projects
  1. Oct 29, 2021
  2. Oct 28, 2021
  3. Oct 27, 2021
    • JF Aubert's avatar
      [FIX] mrp_subcontracting: Allow to create backorder for tracked products · 0ef9583b
      JF Aubert authored
      
      This commit fixes the 'You need to supply a Lot/Serial Number...' message
      when validating a receipt with backorder for subcontracted tracked products.
      
      closes odoo/odoo#78062
      
      Task: 2604664
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      0ef9583b
    • Rémy Voet (ryv)'s avatar
      [FIX] base: fix batched version of get_metadata · 657748dc
      Rémy Voet (ryv) authored
      
      - The batch version of get_metadata won't work correctly for the xmlid
      returns due to the limit=1 (cause by
      718b0f8b ). Fix the
      previous issue by reversing the order and without limit.
      - The read should be read with the correct user.
      
      closes odoo/odoo#79076
      
      X-original-commit: 29a53f19
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      657748dc
    • Adrien Widart's avatar
      [FIX] mrp_account, sale_mrp: check if BoM line is correct · acd35564
      Adrien Widart authored
      
      Suppose an automated AVCO product category. When confirming an invoice,
      if the associated product was a kit and if its BoM has changed during
      the process, a traceback can occur.
      
      To reproduce the issue:
      (Need sale_management)
      1. Create a product category PC:
          - Costing Method: AVCO
          - Inventory Valuation: Automated
      2. Create 3 products P1, P2, P3:
          - Product Type: Storable
          - Category: PC
      3. Update P3's quantity > 0
      4. Create two bills of materials:
          - BOM01:
              - Product: P1
              - BoM Type: Kit
              - Components: 1 x P2
          - BOM02:
              - Product: P2
              - BoM Type: Kit
              - Components: 1 x P3
      5. Create a sale order SO with 1 x P1
      6. Confirm SO and process the delivery
      7. Edit BOM02:
          - BoM Type: Manufacture
      8. On SO, create the invoice INV
      9. Confirm INV
      
      Error: an Odoo Server Error is displayed with a traceback: "[...] in
      _compute_average_price, bom_line_data = bom_lines[bom_line] [...]
      KeyError: mrp.bom.line(19,)"
      
      On step 7, when changing the BoM type, a new BoM line is created.
      Therefore, in `_compute_average_price`, the BoM associated to the move
      (i.e., `bom_line`) is not one of the lines in `bom_lines` (i.e., the new
      BoM lines). There is already a check in case the line has been deleted,
      but not if it has been changed.
      
      OPW-2610685
      
      closes odoo/odoo#78917
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      acd35564
    • Bruno Zanotti's avatar
      [FIX] l10n_ar: doc types active field no updatable · 0f900ba5
      Bruno Zanotti authored
      
      We create the document types data with a csv file, but the active field
      should be not updatable so the users could active or inactive records.
      
      closes odoo/odoo#78576
      
      X-original-commit: a7ea6f21
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      0f900ba5
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: always show draft outs in forecasted report · c7647097
      Tiffany Chang (tic) authored
      
      Fix a small logic bug which made it so draft outs would only show only
      if there were also draft ins.
      
      closes odoo/odoo#79037
      
      Fixes: odoo/odoo#78872
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      c7647097
  4. Oct 26, 2021
    • Arnold Moyaux's avatar
      [FIX] sale_mrp: Link to MO on SO · 475e6b3c
      Arnold Moyaux authored
      
      commit 96b56ea3 fix the link between SO <-> MO in manufacture 3 steps
      but break it on other configuration
      
      It happens because without `store after manufacturing` the procurement
      group is not copied and used on the MO. And the stat button search on
      procurement group with a MO and a SO on it. Before it was searching
      on `stock_move.created_production_id` and thus was able to find the MO.
      
      This commit do a mix of the 2 solutions. It search for procurement group
      linked to SO and MO + created_production_id to be sure to find all the
      MO related to a SO
      
      opw-2645042
      
      closes odoo/odoo#79015
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      475e6b3c
    • william-andre's avatar
      [FIX] l10n_au: ABN number for demo company · 755c074a
      william-andre authored
      The number that was there before was a TFN, not an ABN because of
      confusion between those two tax numbers.
      See
      https://github.com/arthurdejong/python-stdnum/commit/cc3a970e893ebe6635982bcd49c48e6549cb5ac3
      https://github.com/odoo/odoo/commit/a72f7222c9f5987a20461be9c837e3de73801ff7
      
      
      
      closes odoo/odoo#78894
      
      Signed-off-by: default avatarLaurent Smet <las@openerp.com>
      755c074a
    • Harald Panten's avatar
      [FIX] Fix typo in 24% IRPF tax · 3415ba88
      Harald Panten authored
      
      closes odoo/odoo#78883
      
      X-original-commit: 83bb18e4
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      3415ba88
    • oco-odoo's avatar
      [FIX] l10n_es: Replace grid 61 by the proper tag on tax templates · f16086c3
      oco-odoo authored
      Fix https://github.com/odoo/odoo/commit/b40216a8ae8fefd03311b2884e7b83644baac0a1
      
       was merged though partially ready.
      
      closes odoo/odoo#79005
      
      X-original-commit: 880c32f9
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      f16086c3
    • Antoine Dupuis (andu)'s avatar
      [FIX] base: catch PDFs that fail on PdfFileWriter.write · 2dbe39ae
      Antoine Dupuis (andu) authored
      
      Issue:
      Our functionality for merging PDFs from multiple vendor bills relies on PyPDF2. It is well-known that PyPDF2 is sometimes unable to manipulate even perfectly normal PDFs. To provide a helpful error message to the user when this happens (i.e. give them the names of the vendor bills corresponding to the offending pdfs), the `_get_unreadeable_pdfs()` function is called right before we try to merge the PDFs in `_merge_pdfs`. This function is meant to identify the offending PDFs and provide them to the user.
      However, _get_unreadable_pdfs did not notice the problem with 3 of my customer's pdfs, because the error was only triggered once the PdfFileWriter.write function was called in _merge_pdfs. This function, however, is not called in _get_unreadable_pdfs, therefore, it did not notice that anything was wrong.
      
      Fix:
      - Change _get_unreadable_pdfs so that it also makes a call to PdfFileWriter.write
      - As soon as PdfFileWriter.write fails once, it will continue failing when we append more PDF streams to the PdfFileWriter. I therefore suggest initialising a different PdfFileWriter at each iteration of the for loop in order for an offending PDF to not cause a false positive on subsequent PDFs.
      
      closes odoo/odoo#78955
      
      X-original-commit: 0b4efd37
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarAntoine Dupuis (andu) <andu@odoo.com>
      2dbe39ae
    • Audric Onockx (auon)'s avatar
      [FIX] web : Fixed datetime filter search based on wrong hours · 454a367a
      Audric Onockx (auon) authored
      
      Reproduce :
      (With timezone GMT+3)
      - Create any record R1 with previous day's date and time after 21:00.
      - Create any record R2 with today's date and time after 21:00.
      - Create a filter to show all todays records (Date is between "<TODAY'S DATE> 00:00:00 and <TODAY'S DATE> 23:59:59".
      
      Result :
        Even though R1 is in yesterday's date, it will show in the list.
        R2 will not show in this list.
      
      Explanation :
        This behaviour has been observed in several modules, for any timezone but UTC & only with custom filters default datetime values.
        The search was applied on [datetime(UTC) + 2 * offset] because the timezone wasn't correctly set.
      
      Solution :
        Timezone is now correctly set on default datetime values.
      
      closes odoo/odoo#75663
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      454a367a
    • Raphael Collet's avatar
      [FIX] core: related field attributes · d10073d4
      Raphael Collet authored
      
      A related field copies the attributes from its target field, except for
      the attributes defined on the related field itself.  The implementation
      of this feature was not working properly for attributes with a truthy
      default value.
      
      closes odoo/odoo#78687
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      d10073d4
    • Alvaro Fuentes's avatar
      [FIX] stock: fix search default property for missing locs · b9d98950
      Alvaro Fuentes authored
      It may happen that there is a property defined on some field that is not
      the default property, but rather the property associated to a record.
      For example
      ```
      => select id,name,company_id,fields_id,value_reference,res_id from ir_property where name like '%property_stock_inventory%'
      +------+--------------------------+--------------+-------------+-------------------+----------------------+
      | id   | name                     | company_id   | fields_id   | value_reference   | res_id               |
      |------+--------------------------+--------------+-------------+-------------------+----------------------|
      | 528  | property_stock_inventory | 1            | 4665        | <null>            | product.template,752 |
      | 6    | property_stock_inventory | <null>       | 4665        | stock.location,5  | <null>               |
      +------+--------------------------+--------------+-------------+-------------------+----------------------+
      ```
      In this case the property with id=528 is not a default property since
      res_id is not NULL. Alternatively the property id=6 is a default one.
      
      The issue here is that when searching for the missing locations we do
      not filter out the properties with res_id not NULL, thus we may get that
      a company has the location define while in fact it doesn't. Following
      the example above, this means that we incorrectly get property id=528 as
      the one defining the location for the company id=1 here:
      https://github.com/odoo/odoo/blob/c5c47da2e96fd5e37030c70d6bb1bae4c4047fa8/addons/stock/models/res_company.py#L107
      This not only prevents the creation of the correct default property but
      also the default locations
      https://github.com/odoo/odoo/blob/c5c47da2e96fd5e37030c70d6bb1bae4c4047fa8/addons/stock/models/res_company.py#L36-L51
      
      
      
      On this patch we fix the domain search for default property. This allows
      for the correct creation of the default locations and associated
      properties.
      
      This issue was observed during upgrade 40921, where it prevents the
      upgrade to 15.0
      
      closes odoo/odoo#78949
      
      X-original-commit: 17e74b48
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      b9d98950
    • Kevin Baptiste's avatar
      [FIX] hr: remove footer buttons on My Profile · 71e59f43
      Kevin Baptiste authored
      
      The "Save" / "Cancel" buttons were wrongly showing on the "My Profile"
      page.
      
      closes odoo/odoo#78820
      
      Taskid: 2675313
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      71e59f43
    • Tiffany Chang (tic)'s avatar
      [FIX] purchase: correct amounts for purchase report multi-company/currency · 083a3776
      Tiffany Chang (tic) authored
      
      Selection of multiple companies to view multi-company data was added
      in v13, but at the time there was no way to have reports correctly
      take into account currency rates when also working with multi-currency.
      v14 onwards is able to correctly apply the currency rates, therefore we
      fix the purchase report to do so.
      
      Steps to reproduce:
      1. Start with existing demo data + add a new company with currency = EUR
      2. Activate multi-currencies + set a currency rate (not 1) for Euro to $
      3. Open Purchase Report (Purchase > Reporting > Dashboard)
      4. Activate demo company + new EUR company
      5. Switch between USD and EUR company as selected company
      
      Expected result:
        Dashboard monetary quantities switch between $ and EUR, i.e. both the
        amount changes according to current exchange rate and symbol.
      
      Actual result:
        Currency symbol changes, but amount stays the same.
      
      closes odoo/odoo#75651
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      083a3776
    • Philippe Wauthy's avatar
      [FIX] resource: timezone end before assigning search_range · 36e20a34
      Philippe Wauthy authored
      
      The end datetime is not timezoned in _adjust_to_calendar before defining the search_range and using the _get_closest_work_time method.
      Since _get_closest_work_time will timezone the timestamp received to start searching, the search interval needs to refer to the same end timestamp to avoid erratic behaviors.
      
      Task-2628876
      
      closes odoo/odoo#76374
      
      Related: odoo/enterprise#20783
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      36e20a34
  5. Oct 25, 2021
    • Victor Feyens's avatar
      [FIX] purchase_product_matrix: multiple fixes · 591e424f
      Victor Feyens authored
      
      Same fixes for the purchase scope
      
      1) Do not overwrite lines description if the line was not modified
      
      2) Correctly recompute prices/sellers on quantity change.
      
      When no new line was added to the PO through the matrix, the
      prices/sellers were not recomputed, even if the qty was modified for
      some products.
      
      closes odoo/odoo#78902
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      591e424f
    • Victor Feyens's avatar
      [FIX] sale_product_matrix: multiple fixes · 4f819438
      Victor Feyens authored
      1) Do not overwrite lines description if the line was not modified
      
      Fixes #78833
      
      2) Correctly recompute prices on quantity change.
      
      When no new line was added to the SO through the matrix, the prices were 
      not recomputed, even if the qty was modified for some products.
      
      The prices have to be recomputed in this case since pricelist provide 
      rules based on minimum qty.
      
      Part-of: odoo/odoo#78902
      4f819438
    • Jeremy Kersten's avatar
      [FIX] base: autoresize, be more tolerant with output size · 42d34279
      Jeremy Kersten authored
      
      Seems like depending the pillow version, the output image size could differ
      from one or two bytes. Now we check the expected size with a tolerance of
      +/- 1 byte.
      
      closes odoo/odoo#78935
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      42d34279
    • Roy Le's avatar
      [FW][FIX] sale: conflicting context content · 07677d5f
      Roy Le authored
      
      Most uses (correct ones) of the `partner` context key content expect a `res.partner` recordset as `partner` context value.
      This value is extracted during the pricelist price computation (but not used anyway...).
      
      But in one case, fixed by the current commit, a `res.partner` id is placed in the context, as `partner` value.  In some cases, this may trigger "Comparing Apple and Oranges" errors, since `with_context` calls returns a new or existing environment, verifying whether an environment with the same values (user, context, ...) exists.
      During this comparison, the new context, with an id (int) as `partner` value, is compared with existing contexts, potentially including some with a recordset on the same key.  Such a comparison fails on the lowest `__eq__` level, raising "Comparing apples with oranges" error.
      
      This commit fixes this case, by making sure the value put in the `partner` context value is always a recordset, and not an id.
      
      closes odoo/odoo#78936
      
      Note: In the future, this context key should be dropped because it's still a bad practice to put recordsets in the context.
      Forward-port-of: odoo/odoo#78276
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      07677d5f
    • roen-odoo's avatar
      [FIX] stock : Missleading help message · 3244944d
      roen-odoo authored
      
      WO are released in confirmed state, but the help message says that they are released in draft.
      
      opw-2609040
      
      closes odoo/odoo#78890
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      3244944d
    • Touati Djamel (otd)'s avatar
      [FIX] mrp_workorder: calculate correctly the WO scheduled end date · b02cdbbe
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - install mrp_workorder
      - Create a new work center which will work every day from 8:00-9:00
      - Create a BOM with component and operation, which takes 24 minutes in your work center
      - Create 4 MO for this bom
      - Set manually scheduled date > 1 MO should have a different date than others, e.g:
          - 3 MO → 01/dec/2021 08:00
          - 1 MO → 02/dec/2021 08:00
      - Plan the MO which has different date than others
      
      The ```planned_end_date``` is not calculated correctly
      
      Current behavior before PR:
      MO_1 : 01/dec/2021 08:00 → 01/dec/2021 08:24
      MO_2 : 01/dec/2021 08:24 → 01/dec/2021 08:48
      MO_3 : 02/dec/2021 08:00 → 02/dec/2021 08:24
      MO_4 : 02/dec/2021 08:24 → 02/dec/2021 08:24
      
      Problem
      The MO_4 should only last 20 minutes, while it lasts 23 hours and 48 minutes.
      
      opw-2648065
      
      closes odoo/odoo#78377
      
      Related: odoo/enterprise#21701
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      b02cdbbe
    • jev-odoo's avatar
      [FIX] point_of_sale: close sessions via xml-rpc · 6abe353e
      jev-odoo authored
      
      Some of the support scripts use xml-rpc calls to work
      on pos.session on Saas or SH databases
      (especially when needed to upload lot of offline orders
      in smaller batches)
      These scripts should be allowed to close any rescue session
      created during this process programmatically via xml-rpc.
      
      Our xml-rpc protocol does not allow to call function that
      return nothing
      
      closes odoo/odoo#78909
      
      X-original-commit: 834bed30
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      6abe353e
    • Nathan Marotte (nama)'s avatar
      [FIX] sale_mrp : wrong delivered quantities on kit return · 206c9c8d
      Nathan Marotte (nama) authored
      
      Issue: When returning a product sold that is only made of kits and
      validating the return, the delivered quantities of the sales order was
      set back to the full amount delivered
      
      Steps to reproduce :
        1) Install MRP and Sales
        2) Create a BoM Kit for a new product [Nested Kit] that has one or
          more consumable or storable product as component
        3) Create a BoM Kit for a new product [Main Kit] that has
          [Nested Kit] as component
        4) Create a SO for [Main Kit], confirm, validate delivery
        5) Check SO, 1 product is delivered (correct)
        6) Go back to the Delivery, create a return for the delivery
          (don't validate)
        7) Check SO, 0 product is delivered (correct)
        8) Now validate the return for the delivery
        -> Check SO, 1 product is delivered (bug)
      
      Why is that a bug:
       Since the Main Kit was returned, the delivered should be 0 and not
       the full amount initially delivered. It was set back to 1 because we
       didn't look at the type of picking, when computing the quantity
       delivered, the fall back considered that if all the moves were done,
       everything was delivered, but it is the opposite when returning
      
      opw-2542337
      
      closes odoo/odoo#78838
      
      X-original-commit: e90452bf
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      206c9c8d
    • Fabio Barbero's avatar
      [FIX] event: stop sending confirmation email as public user · 0b0a359e
      Fabio Barbero authored
      
      Purpose
      =======
      Fix guest users receiving confirmation emails for events by "Public User".
      
      Specifications
      ==============
      Confirmation emails for events are sent by:
      
      - Organizer (if set)
      - Company email (if set)
      - The users's email
      - Odoo bot otherwise
      
      Task-2657588
      
      closes odoo/odoo#78849
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      0b0a359e
    • thcl-odoo's avatar
      [FIX] stock: display float with correct decimal · ef0320b8
      thcl-odoo authored
      
      (Backport : fbf76c1f)
      
      Expected behavior : Quantities are displayed in the same way on the delivery note regardless the stock picking stage.
      
      Current behavior : Quantities aren't displayed in the same way on the delivery note depending on the stock picking stage. (e.g. `2.00 Units` units when picking is in `Waiting` stage but `2.0 Units` when picking is in `Done` stage)
      
      Steps to reproduce the error :
      - Create a RFQ with few units of a Storable Product (e.g. 2 units)
      - Go to the Receipt and print the Delivery Slip and look at the quantities printed (e.g. 2.00)
      - Validate the Receipt and print the Delivery Slip again, quantities printed have changed (e.g. 2.0)
      
      opw-2578120
      
      closes odoo/odoo#78815
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      ef0320b8
  6. Oct 24, 2021
    • thcl-odoo's avatar
      [FIX] pos_restaurant: Order button should go green after unskip orderline · 2f57176e
      thcl-odoo authored
      
      Expected behavior : The order button should go green and active when you 'unskipped' an orderline
      
      Current behavior : The order button doesn't go green and can't be clicked when an orderline is 'unskipped'
      
      Steps to reproduce the error :
      First of all, you need to setup a PoS Restaurant with these options :
      ~ Bar/Restaurant
      ~ Enable `Table Management`
      ~ Enable and setup `Order Printer` with IP Address and choose Categories to be printed on.
      
      1. Open a restaurant session
      2. Pick a table
      3. Select a product and put it on hold
      4. Select the **same** product and order it
      5. 'Unskipped' the product from step 3
      
      Order button should be green and active but is unactive so the order can't be sent
      
      Previously, the condition was only based on the product_id so error occurs when multiline of the same product are handled
      
      opw-2557518
      
      closes odoo/odoo#78829
      
      X-original-commit: 8159e5ac
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      2f57176e
    • Odoo Translation Bot's avatar
  7. Oct 23, 2021
  8. Oct 22, 2021
    • Paolo (pgi)'s avatar
      [FIX] sale_quotation_builder: quotation_description sanitize_attributes=False · 39bdf1bb
      Paolo (pgi) authored
      quotation_description on the sale order is copied from the
      product template, where it already is sanitize_attributes=False,
      and it has to stay like that because otherwise widgets like
      "tab" or "accordion" cannot be rendered correctly.
      
      This is also linked to a bug in the ORM where the _related_attrs
      weren't copied correctly.
      
      Related ORM PR: https://github.com/odoo/odoo/pull/78687
      Ticket link: https://www.odoo.com/web#id=2487749&model=project.task
      
      
      
      opw-2487749
      
      closes odoo/odoo#78818
      
      X-original-commit: ee90f6bc
      Signed-off-by: default avatarPaolo Gatti <lordkrandel@users.noreply.github.com>
      39bdf1bb
    • thcl-odoo's avatar
      [FIX] purchase: fix qty received computation · 0c8ea86f
      thcl-odoo authored
      
      Expected behavior : The log note sent when received quantity is updated should take into account the quantity already received.
      
      Current behavior : The log note sent doesn't take into account the quantity already received for a 'stock_moves'. So it always displays `Received Quantity: 0.0 -> quantity in stock` instead of `Received Quantity: quantity already received -> quantity in stock`
      
      Steps to reproduce the error :
      - Create a RFQ with few units of a Storable Product (e.g. 5 units)
      - Partially validate the receipt and create a backorder (e.g. 3 units)
      - Validate the backorder (e.g. 2 units)
      
      Log notes should be :
      `Received Quantity: 0.0 -> 3.0`
      `Received Quantity: 3.0 -> 5.0`
      
      But are :
      `Received Quantity: 0.0 -> 3.0`
      `Received Quantity: 0.0 -> 5.0`
      
      The value is always equal to 0.0 because `qty_received_method == 'stock_moves'` so `line.qty_received` is overridden by 0.0 in parent `_compute_qty_received` even though its value is already set to 0.0 (default) or to the quantity already received
      
      opw-2600221
      opw-2613116
      
      closes odoo/odoo#78286
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      0c8ea86f
    • Adrien Widart's avatar
      [FIX] {purchase_,sale_}stock, stock: round qty in report · d50328f9
      Adrien Widart authored
      
      Due to floating point limitation, the quantities displayed in the
      forecasted report should be formatted to ensure the rounding.
      
      Issue example:
      (Need stock)
      1. Create a storable product P
      2. Update its quantity to 7.1
      3. Consult the Forecasted Report
      
      Error:
      Quantities are "7.1000000000000005 Units". In this case, the
      floating-point issue comes from the method `float_round()`
      
      Another example:
      (Need purchase_stock)
      1. Create a storable product P
      2. Update its quantity to 0.1
      3. Create a PO with 0.2 x P
      4. Consult the Forecasted Report
      
      Error:
      The "Forecasted + Pending" quantity is 0.30000000000000004 Units. This
      field is directly computed while rendering the report, it's the sum of
      0.1 and 0.2 which, in python, results in 0.30000000000000004
      (floating-point issue)
      
      Since the rounding of these quantities are actually based on the decimal
      precision of the UoM, this commit may slightly change the report.
      Suppose the generic precision is .001 and the precision of "Units" is
      0.01: if the quantity is 12.34, one zero will be added in the report:
      12.340. However, these unnecessary zeros do not change the information
      that is initially displayed. Moreover, the UoM precision can not be
      greater than the generic precision, so we will never lose a part of the
      quantity to display.
      
      OPW-2611892
      
      closes odoo/odoo#78773
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      d50328f9
Loading