Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] sale_mrp, sale_stock: procurement qty of kits #27064

Closed

Conversation

nim-odoo
Copy link
Contributor

@nim-odoo nim-odoo commented Sep 18, 2018

  • Create a BOM kit for product F with:
    2 Unit(s) of A
    1 Unit(s) of B
  • Create a SO for 1 Unit(s) of F, confirm
    => a picking with 2 Unit(s) of A and 1 Unit(s) of B is created
  • Modify the Ordered Qty to 2 Unit(s)

The picking is not updated.

This is because _get_qty_procurement wrongly computed the product
quantity based on the moves' quantities. This is not correct since the
moves are for products A and B, not product F.

At this point, it is not possible to make sure of the real procurement
quantity. therefore, we use a very simple approach: we compare the sold
quantity before and after modification, and return the difference.

opw-1881227

@nim-odoo nim-odoo self-assigned this Sep 18, 2018
@nim-odoo nim-odoo added the OE the report is linked to a support ticket (opw-...) label Sep 18, 2018
@nim-odoo
Copy link
Contributor Author

@sle-odoo I am opened to any better idea here... But this is the same kind of issue that I already met with @lap-odoo when it comes to kits (see _get_delivered_qty: we can never know how many complete kits were delivered from the picking information)

@nim-odoo nim-odoo force-pushed the 11.0-opw-1881227-change_qty_kit-nim branch 3 times, most recently from 771a90e to 6926439 Compare September 19, 2018 09:03
- Create a BOM kit for product F with:
  2 Unit(s) of A
  1 Unit(s) of B
- Create a SO for 1 Unit(s) of F, confirm
  => a picking with 2 Unit(s) of A and 1 Unit(s) of B is created
- Modify the Ordered Qty to 2 Unit(s)

The picking is not updated.

This is because `_get_qty_procurement` wrongly computed the product
quantity based on the moves' quantities. This is not correct since the
moves are for products A and B, not product F.

At this point, it is not possible to make sure of the real procurement
quantity. therefore, we use a very simple approach: we compare the sold
quantity before and after modification, and return the difference.

opw-1881227
@nim-odoo nim-odoo force-pushed the 11.0-opw-1881227-change_qty_kit-nim branch from 6926439 to 7578d13 Compare September 19, 2018 09:27
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Sep 19, 2018
@nim-odoo
Copy link
Contributor Author

ping @sle-odoo

@wtaferner
Copy link
Contributor

@nim-odoo @sle-odoo
I resolved a related issue a few days ago, so I felt sharing the solution might help to slowly close the missing gaps.

@nim-odoo
Copy link
Contributor Author

robodoo r+

robodoo pushed a commit that referenced this pull request Sep 27, 2018
- Create a BOM kit for product F with:
  2 Unit(s) of A
  1 Unit(s) of B
- Create a SO for 1 Unit(s) of F, confirm
  => a picking with 2 Unit(s) of A and 1 Unit(s) of B is created
- Modify the Ordered Qty to 2 Unit(s)

The picking is not updated.

This is because `_get_qty_procurement` wrongly computed the product
quantity based on the moves' quantities. This is not correct since the
moves are for products A and B, not product F.

At this point, it is not possible to make sure of the real procurement
quantity. therefore, we use a very simple approach: we compare the sold
quantity before and after modification, and return the difference.

opw-1881227

closes #27064
@robodoo
Copy link
Contributor

robodoo commented Sep 27, 2018

Merged in d3ee7a7

@robodoo robodoo closed this Sep 27, 2018
@nim-odoo nim-odoo deleted the 11.0-opw-1881227-change_qty_kit-nim branch September 27, 2018 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants