Skip to content

Commit

Permalink
Merge PR #95 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by PCatinean
  • Loading branch information
OCA-git-bot committed Jan 16, 2024
2 parents c9c57b9 + bbd4d4d commit 77d0563
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions product_configurator_sale/wizard/product_configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ProductConfiguratorSale(models.TransientModel):
def _get_order_line_vals(self, product_id):
"""Hook to allow custom line values to be put on the newly
created or edited lines."""
product = self.env["product.product"].browse(product_id)
product = self.env["product.product"].browse(product_id).with_context(lang=self.order_id.partner_id.lang)
line_vals = {"product_id": product_id, "order_id": self.order_id.id}
extra_vals = self.order_line_id._prepare_add_missing_fields(line_vals)
line_vals.update(extra_vals)
Expand Down Expand Up @@ -48,9 +48,9 @@ def action_config_done(self):
values.update(line_vals)

if self.order_line_id:
self.order_line_id.write(values)
self.order_line_id.with_context(lang=self.order_id.partner_id.lang).write(values)
else:
self.order_id.write({"order_line": [(0, 0, values)]})
self.order_id.with_context(lang=self.order_id.partner_id.lang).write({"order_line": [(0, 0, values)]})
return

@api.model
Expand Down

0 comments on commit 77d0563

Please sign in to comment.