diff options
| author | Adrien Widart <awt@odoo.com> | 2021-05-12 14:41:40 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2021-05-18 07:18:55 +0000 |
| commit | 2eee690d307e5a55dd2fc6ac05124ddd9c496da5 (patch) | |
| tree | 651ced801846d99dc590c483fbb8c9d85eec553c /addons/web/static/src/js | |
| parent | 13ff118da832a339d9cb43d74bf0b5dd0cf3c036 (diff) | |
[FIX] mrp: use MO's UoM on unbuild order creation
On unbuild order creation, when the user selects a manufacturing order,
the UoM of the quantity will be defined with the product's UoM instead
of MO's UoM.
To reproduce the error:
(Use demo data)
1. In Settings > General Settings, enable "Units of Measure"
2. Create two products P_finished and P_compo
- Both are storable
- Qty on Hand of P_compo = 12
3. Create a Bill of Material
- Product: P_finished
- Component: 1 x P_compo
4. Create a Manufacturing Order MO
- Product: P_finished
- Quantity To Produce: 1 Dozen(s)
5. Check Availability, Produce, Mark as Done
6. Create an Unbuild Order:
- Manufacturing Order: MO
Error: The unit of measure of the quantity is incorrect, this is
Unit(s), it should be Dozen(s)
The method `onchange_mo_id` defines the product, therefore the method
`onchange_product_id` is also called and here is the issue:
`onchange_product_id` will override the UoM using the product's UoM.
OPW-2467017
closes odoo/odoo#70904
X-original-commit: b80321acd5553466862b5c2c56cff014765ecf99
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions
