Skip to content

Commit e1f3e69

Browse files
committed
[FIX] prodct_catalog_tree: left a minimal context when updating line
1 parent f12fe06 commit e1f3e69

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

product_catalog_tree/models/product_product.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ def _inverse_catalog_values(self, product_catalog_qty):
6060
for rec in self:
6161
# Actualizar la información de la línea de orden
6262
# Call the order method with a cleared context to avoid errors on creating move line
63-
order.with_company(order.company_id).with_context(clear_context=True)._update_order_line_info(
63+
minimal_context = {
64+
"lang": self._context.get("lang"),
65+
"tz": self._context.get("tz"),
66+
"uid": self._context.get("uid"),
67+
"allowed_company_ids": self._context.get("allowed_company_ids"),
68+
}
69+
order.with_company(order.company_id).with_env(self.env(context=minimal_context))._update_order_line_info(
6470
rec.id, product_catalog_qty
6571
)
6672

0 commit comments

Comments
 (0)