Skip to content

Commit

Permalink
[FIX] sale_ux: removing useless method
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-weiss committed Apr 14, 2023
1 parent b61c7db commit a978d6e
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions sale_ux/models/sale_order.py
Expand Up @@ -106,27 +106,6 @@ def _get_update_prices_lines(self):
lines_to_not_update_ids = self._context.get('lines_to_not_update_ids', [])
return lines.filtered(lambda l: l.id not in lines_to_not_update_ids)

def action_update_prices(self):
# avoiding execution for empty records
if not self:
return
# for compatibility with product_pack module
pack_installed = 'pack_parent_line_id' in self.order_line._fields
if pack_installed:
pack_lines = self.order_line.with_context(update_prices=True, pricelist=self.pricelist_id.id).filtered(
lambda l: l.product_id.pack_ok and l.product_id.pack_component_price != 'ignored')
super(SaleOrder, self.with_context(lines_to_not_update_ids=pack_lines.ids)).action_update_prices()
for line in pack_lines:
if line.pack_parent_line_id:
continue
elif line.pack_child_line_ids:
if not isinstance(self.id, int):
self._compute_pack_lines_prices(line)
else:
line.expand_pack_line(write=True)
else:
super().action_update_prices()

def _compute_pack_lines_prices(self, line):
""" This method is for the case when came from an onchange and the original method
doesn't works with _origin and the values aren't change.
Expand Down

0 comments on commit a978d6e

Please sign in to comment.