mirror of
https://github.com/NaN-tic/trytond-sale_discount_visible.git
synced 2023-12-14 05:13:13 +01:00
Invoice type from invoice or invoice line
This commit is contained in:
parent
7bf2f164c8
commit
ebe14500c0
|
@ -20,8 +20,10 @@ class InvoiceLine:
|
|||
Product = Pool().get('product.product')
|
||||
|
||||
with Transaction().set_context({
|
||||
'price_list': self.invoice.party.sale_price_list,
|
||||
'customer': self.invoice.party.id,
|
||||
'price_list': self.invoice.party.sale_price_list \
|
||||
if self.invoice else self.party.sale_price_list,
|
||||
'customer': self.invoice.party.id \
|
||||
if self.invoice else self.party.id,
|
||||
}):
|
||||
gross_unit_price = self.gross_unit_price_wo_round
|
||||
discount = Decimal(0)
|
||||
|
|
Loading…
Reference in a new issue