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

[IMP] purchase_triple_discount: when purchase line created from seller, sets discount2 and discount3 #2406

Open
wants to merge 1 commit into
base: 15.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
12 changes: 12 additions & 0 deletions purchase_triple_discount/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,15 @@ def _prepare_account_move_line(self, move=False):
}
)
return res

@api.model
def _prepare_purchase_order_line_from_seller(self, seller):
res = super()._prepare_purchase_order_line_from_seller(seller)
if not res:
return res
res.update(
{
"discount2": seller.discount2,
"discount3": seller.discount3,
}
)
Loading