Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] sale_product_pack: _get_update_prices_lines refactor #192

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from
Open
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
10 changes: 1 addition & 9 deletions sale_product_pack/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,4 @@ def write(self, vals):

def _get_update_prices_lines(self):
res = super()._get_update_prices_lines()
result = self.order_line.browse()
index = 0
while index < len(res):
line = res[index]
result |= line
index += 1
if line.product_id.pack_ok and line.pack_type == "detailed":
index += len(line.product_id.pack_line_ids)
return result
return res.filtered(lambda line: not line.pack_parent_line_id)
Loading