summaryrefslogtreecommitdiff
path: root/addons/stock
diff options
context:
space:
mode:
authorNicolás Mac Rouillon <nmr@adhoc.com.ar>2021-03-17 19:48:09 +0000
committerWilliam Henrotin <whe@odoo.com>2021-05-04 07:11:59 +0000
commitb55f843e8144f31e11167d95fcb9bff9cfec2536 (patch)
treea5de9161aafb64007fa0af005b58bfd3bd03b161 /addons/stock
parent48c0efcc97e35e00ec5803235a89a2c18e821990 (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>
Diffstat (limited to 'addons/stock')
-rw-r--r--addons/stock/models/product.py2
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: