Skip to content
Snippets Groups Projects
  1. May 24, 2023
  2. May 07, 2023
  3. Apr 30, 2023
  4. Apr 23, 2023
  5. Apr 16, 2023
  6. Apr 09, 2023
  7. Feb 26, 2023
  8. Jan 04, 2023
    • Adrien Widart (awt)'s avatar
      [FIX] purchase_{mrp,stock}: run procurement with buy route · 1bc3d37e
      Adrien Widart (awt) authored
      In multi-steps receipt, when running a procurement, using "Buy" as
      preferred route does not always work because the route is not
      correctly configured
      
      To reproduce the issue:
      1. In Settings, enable "Multi-Step Routes"
      2. Edit the warehouse:
         - Incoming: 2 steps
      3. Create a product P:
          - Type: Storable
          - Vendors: a vendor V
          - Routes:
              - Manufacture
              - Buy
      4. Update on hand quantity:
         - -1 at WH/Stock
      5. Open the Replenishment page
         - There should be a line with 1 x P
      6. Set the Preferred route to "Buy"
      7. Order Once
      
      Error: a user error is displayed "There is no Bill of Material of
      type manufacture [...] Please define a Bill [...]". This is
      incorrect, it should generate a PO
      
      The problem is simple: the Buy route is composed of one rule:
      - Action: Buy
      - Source Location: /
      - Destination Location: WH/Input
      
      But, when running the procurement, we first look for a rule to
      fulfill the need at WH/Stock. We prioritize the rules of the
      preferred route, but as explained above, the route does not contain
      such a rule. Therefore, we use the other routes of the product:
      https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_rule.py#L461-L466
      
      
      And, because of step 3, it then finds the manufacture rule. This is
      the reason why it tries to create a MO and why an error is raised
      because of the missing BoM
      
      OPW-3006960
      
      closes odoo/odoo#108550
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1bc3d37e
  9. Dec 11, 2022
  10. Dec 02, 2022
    • JordiMForgeFlow's avatar
      [FIX] purchase_mrp: filter cancelled moves when evaluating kit · 436299ee
      JordiMForgeFlow authored
      
      The current behaviour does not filter the cancelled moves when
      evaluating if the product of the purchase order line is a kit.
      This causes that, in cases where you have a cancelled wrong receipt
      where the product was being received as a kit, if a new receipt is
      created without receiving as a kit Odoo will always expect it as a kit.
      
      After the fix, the cancelled moves will not be considered, as this is what
      should be expected from cancelled operations.
      
      closes odoo/odoo#107025
      
      X-original-commit: 496f67ce
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      436299ee
  11. Jul 31, 2022
  12. Jul 17, 2022
  13. Jul 10, 2022
  14. Jun 24, 2022
  15. Jun 05, 2022
  16. May 22, 2022
  17. Apr 17, 2022
  18. Apr 10, 2022
  19. Apr 03, 2022
  20. Mar 21, 2022
  21. Jan 09, 2022
  22. Jan 07, 2022
    • Adrien Widart's avatar
      [FIX] purchase_{stock,mrp}: compute price difference of a kit · ec01934b
      Adrien Widart authored
      
      In automated-AVCO configuration, buying a kit at a higher price than its
      cost can create inconsistencies in the accounting.
      
      To reproduce the issue:
      (Need account_accountant. Use demo data)
      1. Create a product category PC:
          - Costing Method: AVCO
          - Inventory Valuation: Automated
          -  Set up the Price Difference Account PDA
      2. Create 3 products P_kit, P_compo01, P_compo02
          - Type: Storable
          - Category: PC
          - P_compo01:
              - Cost: 10
          - P_compo02:
              - Cost: 20
      3. Create a bill of materials:
          - Product: P_kit
          - Type: Kit
          - Components:
              - 1 x P_compo01
              - 1 x P_compo02
      4. On P_kit's form, "Compute Price from BoM":
          - The cost should be $30
      5. Create a purchase order PO with one line:
          - Product: P_kit
          - Quantity: 1
          - Unit Price: 100
      6. Confirm PO and process the receipt
      7. Create and Post the bill
      
      Error: There is an error in the journal items of the bill: the value for
      PDA is $85
      
      When posting the bill, for each account move line, the module computes
      the stock valuation of the associated product and the price difference.
      To do so, it sums the valuation of all related outgoing stock moves and
      divides by the quantity to get the value per unit, then it compares with
      the unit price used on the PO's line. Here is the issue: in case of a
      kit, there is one outgoing move per component while the PO's line is
      linked to the kit itself.
      
      Therefore, in the above case, it uses the outgoing moves of P_compo01
      and P_compo02, adds up their value ($10 + $20 = $30) and then divides by
      the total quantity (one P_compo01 and one P_compo02, thus $30 / 2 =
      $15). This is the reason why it considers that the unit value of P_kit
      equals $15. Then, since the unit price on the PO's line is $100, it gets
      a price difference value equal to $85.
      
      When comparing the unit value of the kit and its unit price, the unit
      value should not be divided by the quantity of components ($30 should
      not be divided by 2). Moreover, when buying such a kit at $100, the
      surplus ($70) should be distributed among each component. However, it is
      difficult to define a rule to correctly weight this distribution.
      Therefore, this surplus will be considered as a price difference.
      
      OPW-2566546
      
      closes odoo/odoo#82318
      
      X-original-commit: 75191404
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      ec01934b
  23. Dec 26, 2021
  24. Dec 12, 2021
  25. Dec 05, 2021
  26. Nov 21, 2021
  27. Oct 24, 2021
  28. Oct 17, 2021
  29. Oct 14, 2021
  30. Oct 03, 2021
  31. Oct 01, 2021
    • Touati Djamel (otd)'s avatar
      [FIX] purchase_stock, purchase_mrp: adjust the qty of purchased kit correctly · 30305b4a
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a BOM kit for “product K”  with:
          - 2 * “product A”
          - 1 * “product B”
      - Create a PO for 1 unit of “product K” > confirm
      - A receipt delivery with 2 units of “product A” and 1 unit of B will be created
      - Modify the ordered Qty to 2 units of “Product K”
      
      Problem:
      The receipt delivery will not be updated correctly (4 units of product A and 3 of product B)
      because the `"_prepare_stock_moves"` function computed the previous quantity wrong based on the moves quantities
      since the moves are for products A and B, not product F.(do not take into account the products in kit)
      
      Solution:
      For kit products, do not calculate from the `"stock.move"`, calculate the difference between the quantity before and after the change
      
      opw-2645719
      
      closes odoo/odoo#77580
      
      X-original-commit: 2fd87885
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      30305b4a
  32. Sep 21, 2021
    • William Henrotin's avatar
      [FIX] mrp: confirm production order at the end · 5fd6c725
      William Henrotin authored
      
      This commit removes the action_confirm from the run_manufacture to do it
      only after all the orderpoints have been processed.
      
      In case a production, created in run_manufacture, triggers procurements
      for one of its component. And those procurements have the same
      parameters than another one still not run because after the manufacture
      one in the queue. This new procurement will replenish its quantity plus
      the other procurement's one.
      
      That means too much quantity will be replenished.
      
      closes odoo/odoo#76549
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      5fd6c725
  33. Sep 12, 2021
  34. Aug 22, 2021
  35. Jul 29, 2021
  36. Jul 26, 2021
    • Xavier-Do's avatar
      [FIX] *: add explicit license to all manifest · 4f683968
      Xavier-Do authored
      
      The license is missing in most enterprise manifest so
      the decision was taken to make it explicit in all cases.
      When not defined, a warning will be triggered starting from
      14.0 when falling back on the default LGPL-3.
      
      closes odoo/odoo#74231
      
      Related: odoo/enterprise#19850
      Related: odoo/design-themes#43
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      4f683968
  37. Jul 18, 2021
  38. Jul 11, 2021
  39. Jul 04, 2021
  40. Jun 27, 2021
Loading