diff options
| author | Nicolás Mac Rouillon <nmr@adhoc.com.ar> | 2021-03-17 19:48:09 +0000 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2021-05-04 07:11:59 +0000 |
| commit | b55f843e8144f31e11167d95fcb9bff9cfec2536 (patch) | |
| tree | a5de9161aafb64007fa0af005b58bfd3bd03b161 | |
| parent | 48c0efcc97e35e00ec5803235a89a2c18e821990 (diff) | |
[FIX] stock: Add missing field in cxt depends on stock calculation.
This "depends context" was missing fields and the compute of the stock qty's were not correct in several cases.
We add the same as the fields "force_company".
closes odoo/odoo#70268
X-original-commit: d6bd78e578104f43318fbe3c11f325063e3e5042
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
| -rw-r--r-- | addons/stock/models/product.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 74310084d1a..bbf42997dcb 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -641,7 +641,7 @@ class ProductTemplate(models.Model): 'product_variant_ids.stock_move_ids.product_qty', 'product_variant_ids.stock_move_ids.state', ) - @api.depends_context('company') + @api.depends_context('company', 'location', 'warehouse') def _compute_quantities(self): res = self._compute_quantities_dict() for template in self: |
