Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion product_catalog_tree/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@ def _inverse_catalog_values(self, product_catalog_qty):

order = self.env[res_model].browse(order_id)
for rec in self:
order.with_company(order.company_id)._update_order_line_info(rec.id, product_catalog_qty)
# Actualizar la información de la línea de orden
# Call the order method with a cleared context to avoid errors on creating move line
minimal_context = {
"lang": self._context.get("lang"),
"tz": self._context.get("tz"),
"uid": self._context.get("uid"),
"allowed_company_ids": self._context.get("allowed_company_ids"),
}
order.with_company(order.company_id).with_env(self.env(context=minimal_context))._update_order_line_info(
rec.id, product_catalog_qty
)

def increase_quantity(self):
for rec in self:
Expand Down