Skip to content
Snippets Groups Projects
  1. May 15, 2023
  2. May 14, 2023
  3. May 12, 2023
    • Mylyna Hy's avatar
      [FIX] stock: show exception log when cancel backorders · ca301df2
      Mylyna Hy authored
      
      Steps to Reproduce Issue for single picking:
      1. Install Sales, Inventory
      2. Create an SO and confirm
      3. Go to the transfer, assign the done value to be less than demanded
      4. Validate the transfer and cancel the backorder
      
      Current Behavior:
      There is no exception error on the SO chatter
      
      Expected Behavior:
      An exception error should be logged on the SO chatter
      
      Other Info: When cancelling a backorder for a single picking,
      the exception error about less quantity than expected is not logged on the SO.
      "process_cancel_backorder" does not call _log_less_quantities_than_expected.
      As defined in "process", the exception is only logged when validating multiple pickings at once but
      one is to backorder but the other is not.
      
      opw-3222508
      
      closes odoo/odoo#120994
      
      X-original-commit: 92cd7d08
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      ca301df2
  4. May 10, 2023
    • Touati Djamel (otd)'s avatar
      [FIX] stock: change product's company · 166a7cfd
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Connect with the company A
      - Create a consumable product “P1”
      - Create a receipt transfer with this product
      - confirm the transfer
      - Come back to the product form
      - limiter le produit que a la “Company B”
      
      Problem:
      no user error triggered
      Go to inventory > operation > transfer: a Traceback is triggered
      
      Before this commit, there is no verification while changing a product's
      company for consumable. That can lead to an issue where some operations
      cannot be done because of access errors. To avoid that, this commit
      prevents to change the product's company if some move lines for this
      product exist in another company.
      
      opw-3300559
      
      closes odoo/odoo#120947
      
      X-original-commit: a6666de7
      Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
      166a7cfd
  5. May 09, 2023
  6. May 07, 2023
  7. May 05, 2023
    • Andrew Gavgavian's avatar
      [FIX] stock: fix report.stock.quantity search_read · e112a7f9
      Andrew Gavgavian authored
      
      	Currently `report.stock.quantity` has a field defined in it called `move_ids`:
      	`move_ids = fields.One2many('stock.move',readonly=True)`
      
      	This virtual field has no corresponding inverse field so when performing a search_read on the model, it fails
      	in fields.py when trying to do:	`inverse_field = comodel._fields[inverse]`
      
      	In addition, this field is apparently not used anywhere in the source code and not queried in the SQL View.
      
      	This means the model can never be search_read by default.
      
      	Since this field is never used, it isn't stored, and the model is `_auto = False`, removing it won't break any database.
      
      closes odoo/odoo#120416
      
      X-original-commit: e3b1a887
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarAndrew Gavgavian (andg) <andg@odoo.com>
      e112a7f9
  8. Apr 30, 2023
  9. Apr 26, 2023
  10. Apr 23, 2023
  11. Apr 21, 2023
  12. Apr 20, 2023
  13. Apr 19, 2023
    • paso-odoo's avatar
      [FIX] stock: expected singleton issue in quants when lot/sn number · 05a7f5c0
      paso-odoo authored
      If applied, this commit will solve the issue of the singleton when there are 2
      quants with the same location and same products but one quant with a lot and
      another quant without a lot number.
      
      Steps to produce:
      - Create one quant with location-1 and without lot number.
      - Create another quant with location-1 but with the lot number.
      - Create 3rd quant with location-1 with same lot number as step2.
      The error will raise in 3rd step as it is not accepting the 2 quants where one
      is with lot number and another is without lot number.
      
      see - https://tinyurl.com/2hqrgmwm
      
      
      
      sentry - 4024572562
      
      closes odoo/odoo#116318
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      05a7f5c0
    • BernatPForgeFlow's avatar
      [IMP] stock: Activity schedule from stock orderpoints · e7de0b7f
      BernatPForgeFlow authored
      
      When an orderpoint triggers a procurement for a product and the system does not find the procurement route, it schedules an activity remembering what was the error.
      
      If a normal user without admin access rights, makes an action that triggers the orderpoints, like confirming a MO, the activity schedule is not creating due to an access error on 'write' operation to a Product Template.
      
      So, all activity schedules triggered from an orderpoint should be created without checking access rights.
      
      closes odoo/odoo#118300
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      e7de0b7f
  14. Apr 16, 2023
  15. Apr 14, 2023
  16. Apr 13, 2023
    • PNO's avatar
      [FIX] stock: forecast on multi-step manufacturing · 6bc4d7e3
      PNO authored
      
      When in a multi-step manufacturing scenario, if there is more than enough to complete one MO, the forecast shown is wrong as it looks like it is trying to reserve more than once the quantities in stock.
      
      Steps to reproduce:
      
      - Activate multi-step routes and set manufacturing in 3 steps (warehouse settings)
      - Create a product (Component) with UOM kg and add 200kg in stock.
      - Create another product (Final product) with a BoM.
      - On the BoM, set that to manufacture 100 units, 51700g should be consumed.
      - Create a MO for 210 units and confirm.
      - Check the forecast of the Component.
      
      OPW-3231092
      
      closes odoo/odoo#117455
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      6bc4d7e3
    • Adrien Widart (awt)'s avatar
      [FIX] stock: check `allow_new_product` with packages · 40777c2d
      Adrien Widart (awt) authored
      
      To reproduce the issue:
      1. In Settings, enable:
         - Multi-Step Routes
         - Storage Categories
         - Packages
      2. Create a Storage Category SC:
         - Allow New Product: same
         - Max Weight: 100 kg
         - Capacity by Package:
           - 2 x Pallet
      3. Create two locations L1, L2:
         - Parent: WH/Stock
         - Type: Internal
         - Storage Category: SC
      4. Create a putaway rule:
         - When in: WH/Stock
         - Package type: Pallet
         - Store to: WH/Stock
         - Having Category: SC
      5. Edit the warehouse:
         - Incoming Shipments: 2 steps
      6. Create a product P:
         - Type: Storable
         - Weight: 1 kg
      7. Update L1:
         - There is 1 x P in a pallet
      8. Create a planned receipt R:
         - To: WH/Input
         - Operations:
           - 2 x P
      9. Mark R as Todo
      10. Create two packages:
          - 1 x P in PK01 (! PK01 must be a Pallet)
          - 1 x P in PK02 (! PK02 must be a Pallet)
      11. Validate R
      12. Open the related internal transfer T
      
      Error: Both packages are redirected to L2 but one of them should be
      redirected to L1
      
      When checking L1, we ensure that the policy 'all same products' is
      respected. To do so, we compare the products of the quants of L1
      with the given product. Here is the issue: when moving a package, we
      don't provide any `product` value to the methods used in the putaway
      rules process.
      
      Note: There was also another issue with the 'all same products'
      policy. Suppose L1 is empty, and we move a pallet with two different
      products, the move line is redirected to L1, which breaks the 'all
      same products' condition.
      
      OPW-3204924
      
      closes odoo/odoo#118361
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      40777c2d
  17. Apr 12, 2023
    • yhu-odoo's avatar
      [FIX] mrp: duplicate lot when auto-generate serial. · 1b840d06
      yhu-odoo authored
      
      To reproduce:
      1. Manually create lot "0000001" for a lot product
      2. Create a MO for this product and click generate-serial button.
      Validation error raised since we are trying to generate lot/sn "0000001"
      again.
      
      When useing action_generate_serial, ir.sequence always try create a
      lot/sn in form "00000dd". If user already created the same one, the
      generation will fail.
      
      We already tried to avoid this issue for sn in _get_next_serial() by
      finding the latest sn and create new one base on it.
      
      To fix, we also allow _get_next_serial to be applied to lot.
      
      Part of Tast-3187003
      
      closes odoo/odoo#117143
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1b840d06
  18. Apr 11, 2023
  19. Apr 09, 2023
  20. Apr 04, 2023
  21. Apr 02, 2023
  22. Mar 31, 2023
  23. Mar 30, 2023
  24. Mar 29, 2023
  25. Mar 28, 2023
    • niyasraphy's avatar
      [FIX] stock: typo in user group · e259a33b
      niyasraphy authored
      
      before this commit, for the company_id field
      the user groups given was base.main_company,
      such a group is not existing in the system
      
      after this commit, the group will be changed
      to base.group_multi_company from base.main_company
      
      closes odoo/odoo#116853
      
      X-original-commit: 59d0f7f4
      Related: odoo/enterprise#38903
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      e259a33b
  26. Mar 24, 2023
  27. Mar 19, 2023
  28. Mar 17, 2023
  29. Mar 16, 2023
    • Gaetan Vanden Bergh (gavb)'s avatar
      [FIX] stock: manage mrp_operation picking type with fallback · 2960a58d
      Gaetan Vanden Bergh (gavb) authored
      
      mrp_operation picking type is not handle by default in stock module get_description function.
      
      Add default return to stock get_description function
      
      opw-3232811
      
      closes odoo/odoo#115488
      
      X-original-commit: ea9632e6
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      2960a58d
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: do not allow direct deletion of quants · c99bfce4
      Tiffany Chang (tic) authored
      
      Some users were updating their access rights to allow for direct
      deletion of quants. This could lead to the infamous:
      
      "It is not possible to unreserve more products of %s than you have in stock."
      
      error since directly deleting a quant bypasses the flows of correctly
      unreserving the amounts you are deleting. Therefore we now restrict
      the unlinking to:
      - when in sudo mode, since the automatic unlinking of zero quants always
        occurs in sudo mode.
      - stock manager when unlink access right = True. Normally we would allow
        any user with the unlink access to do it, but since we are using the
        existing `_apply_inventory` to ensure that reserved qtys of the
        quant are correctly unreserved before the unlinking, only stock
        managers will correctly do this unreservation.
      
      It is expected that some custom code may break due to this restriction,
      but if custom code is directly unlinking quants without a sudo or with a
      non-stock manager, then the code in these cases probably need to be
      fixed anyways since this will cause inconsistent db data and lead to
      the error above.
      
      closes odoo/odoo#114991
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      c99bfce4
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: allow scrap uom editing in list view · 42f51dce
      Tiffany Chang (tic) authored
      Due to the domain dependancy of `product_uom_id` on
      `product_uom_category_id`, a JS error was occurring since the field
      wasn't available in the view.
      
      Steps to reproduce:
      - create a scrap
      - select scrap in list view
      - try to edit the UoM
      
      Client Error occurs instead of allowing user to edit the UoM.
      
      Fixes: odoo/odoo#92800
      Part-of: odoo/odoo#114991
      42f51dce
    • Mahamadasif Ansari's avatar
      [FIX] stock: add blank domain to avoid log error in search view · d142d938
      Mahamadasif Ansari authored
      "Non-stored fields like product.template.location_id/warehouse_id cannot
      be searched" log error is generated because the non-storable fields are
      not searchable, so it shows a log error for those fields.
      
      This commit added the blank filter_domain in the above fields to avoid
      the log error in search.
      
      This fix is for the "product.product" search view for the "product.template"
      search view has already been fixed in https://github.com/odoo/odoo/commit/a5835a160ea3f7aea37644ed4e1a49e2e4a6effd
      
      
      
      sentry-3933983991
      
      closes odoo/odoo#115382
      
      X-original-commit: 677118f0
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      d142d938
  30. Mar 15, 2023
    • Walid HANNICHE (waha)'s avatar
      [FIX] stock: label printed twice · 67842a02
      Walid HANNICHE (waha) authored
      
      Steps to reproduce:
      - enable PICK + PACK + SHIP
      - in Inventory/Configuration/Operations Types
      - check print label in PACK
      
      Bug:
      print label is already enabled by default in the SHIP Operation
      and it's not possible for the user to edit it.
      
      Fix:
      allow the user to disable print label on the SHIP Operation
      
      opw-3085428
      
      closes odoo/odoo#115038
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      67842a02
  31. Mar 14, 2023
    • svs-odoo's avatar
      [FIX] stock: immediate transfer w/ tracked product · 62078564
      svs-odoo authored
      
      How to reproduce:
      - Create a tracked product;
      - In the receipt picking type form view, for the lot and serial numbers,
        uncheck "Create New" and "Use Existing ones";
      - Create a planned receipt for some of this tracked product;
      - Confirm and validate the receipt:
        It opens the "Immediate Transfer" wizard;
      - Apply the immediate transfer:
        -> It asks if you want to create a backorder.
      
      Since the picking type doesn't use new or existing LN/SN, it accepts to
      be confirmed even if some move lines for tracked product have no
      tracking numbers.
      The issue was, when a `stock.move` sets its done quantity to its
      reserved quantity, if its product is tracked, it doesn't change its done
      quantity if it has no tracking number, regardless the picking type's
      configuration.
      
      OPW-3186155
      
      closes odoo/odoo#114831
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      62078564
  32. Mar 09, 2023
    • Aurelien van Delft (avd)'s avatar
      [IMP] stock: _apply_putaway_strategy opti for MOs · 111b319f
      Aurelien van Delft (avd) authored
      
      Backport of cbeab103342 to speed up MOs confirmation when
      producing lots of quantity and when at least one component
      is tracked by Unique SN.
      
      closes odoo/odoo#112565
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      111b319f
    • Victor Piryns (pivi)'s avatar
      [FIX] {sale,purchase}_stock: propagate package type to stock moves · 1dc25c61
      Victor Piryns (pivi) authored
      
      Current behaviour:
      If you have a confirmed SO, with a `sale.order.line` that has a
      `product_packaging_id`, and you write a new `product_packaging_id`,
      the "Delivery Order" has 2 lines, 1 move with the old qty and the old
      packaging, and another line with the difference of qty and the new packaging.
      Same behaviour is present on purchase side.
      
      Expected behaviour:
      If you have multiple `stock.move.line` from the same `sale.order.line`,
      they should be able to merge, when you changed the `product_packaging_id`.
      Ex: If you edit an SOL from 1 pack of 10 to 1 pack of 20, we should have
      1 move line with qty 20 in packs of 20, instead of 2 lines, one with qty 10
      in packs of 10, and another line with qty 10 in packs of 20.
      Same behaviour is expected on purchase side.
      
      Steps to reproduce:
      - Install Sales and Inventory
      - Activate "Product Packaging" in Settings
      - Create a new product with 2 types of packaging
        - PackOf10 with quantity of 10
        - PackOf20 with quantity of 20
      - Create a SO with a new line that product, quantity 10
      - Confirm the SO
      - Edit the SOL with 1 pack of 20 (`product_uom_qty`=20)
      - The "Delivery Order" has 2 lines, instead of 1 with the new packaging
      
      Reason for the problem:
      When saving the SO/PO, a new `procurement` is created which will create
      a new `stock.move.line` with the new packaging. This will prevent the
      lines to merge correctly, because they have different packaging.
      
      Fix:
      When writing the `product_packaging_id` on a `sale.order.line`/`purchase.order.line`,
      we directly write the package on the `stock.move.line`,
      before any `procurements` are created, so the generate move lines
      can correctly be merged.
      
      Affected versions:
      - 15.0
      - saas-15.2
      - saas-15.3
      - 16.0
      - master
      
      opw-3002612
      
      closes odoo/odoo#107223
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1dc25c61
    • Adrien Widart (awt)'s avatar
      [FIX] {sale_,}stock: decrease SOL qty with existing backorders · 4180afb9
      Adrien Widart (awt) authored
      
      2-steps delivery. If there is already a backorder for the picking
      out->customer, when decreasing the SOL qty, an unexpected picking
      will be created
      
      To reproduce the error:
      1. In Settings, enable "Multi-Step Routes"
      2. Edit the warehouse:
         - Outgoing: 2 steps
      3. Create a storable product P
      4. Update the on hand qty:
         - 10 x P at WH/Stock
      5. Create and confirm a SO with 10 x P
      6. Process the pickings with 6 x P (with backorders)
         - There should be 4 pickings
      7. On the SO, decrease the quantity to 7
      
      Error: an unexpected picking (customer -> out) is created for 3 x P
      
      Step 6, when creating a backorder for 4 x P from out to customer,
      we split the initial SM, and we force the `procure_method` to
      `make_to_stock`
      Step 7, when decreasing the qty, we create a negative procurement
      and run the rules' system. Because of warehouse configuration, the
      rule that links output location and customer one is based on an MTO
      logic: the SM for -3 x P has the `procure_method` set to
      `make_to_order`. As a result, that move will not be merged with the
      one created during the split (step 6) and we will create the
      unexpected picking for the move.
      
      The SM generated by the split should keep the same procure method
      logic as the initial one.
      
      OPW-3141387
      
      closes odoo/odoo#114686
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      4180afb9
Loading