diff options
| author | Denis Ledoux <dle@odoo.com> | 2021-02-08 10:44:24 +0000 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2021-02-08 17:39:45 +0000 |
| commit | 62c5b8d95c1ba5634e201c0c8a3e2d91fb2305a7 (patch) | |
| tree | 0f8ee19d17fb616a24b6b6e33d0e350526b13563 /addons/web_editor/static/src/js/editor/snippets.options.js | |
| parent | ec05004acb2a3283920e3d7730a971814ccc2ac1 (diff) | |
[FIX] mrp: `qty_available` computation of a kit and its component
When `qty_available` was being called
for a kit and its components at the same time,
e.g.:
- Kit product
- Product 1
- Product 2
The kit product available qty was always computed to `0.0`,
because when computing its component available quantity,
they were computed to `0.0` because they were marked
as `protected` by the ORM when calling the compute method
for these records at the first call.
When the `qty_available` compute method for the kit
then called recursively the `qty_available` compute
method for the component, as the component record
were marked as protected,
the ORM filled their value with the Falsy value `0.0`.
This issue occured particularly in the upgrade integrity unit test
which makes sure the available quantities of the products remain
unchanged after upgrade. This test computes the available
quantities for a bunch of products at the same time,
and its therefore likely a kit product gets its available
quantity computed as the same time than its components.
upg-3185
upg-4215
upg-4228
upg-5558
upg-5745
upg-5856
upg-6012
upg-6064
upg-6076
upg-6306
upg-6514
upg-6588
upg-6729
closes odoo/odoo#65751
X-original-commit: 8e152a567a6003dae4abb3b537b963eec4142d6d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/editor/snippets.options.js')
0 files changed, 0 insertions, 0 deletions
