Instantiate invoice product with agent company
issue10544 review363501006 (grafted from 8133c50101c0a461fa4838d26103cf5054079e1a) --HG-- branch : 6.0
This commit is contained in:
1 parent
0c3f3f4d60
commit
d2cd9fae59
1 file changed
+5
-4
+5
-4
@@ -516,11 +516,12 @@ class Commission(ModelSQL, ModelView):
|
||||
|
||||
invoice_line = InvoiceLine()
|
||||
invoice_line.invoice = invoice
|
||||
invoice_line.type = 'line'
|
||||
invoice_line.product = product
|
||||
invoice_line.quantity = 1
|
||||
invoice_line.company = invoice.company
|
||||
invoice_line.currency = invoice.currency
|
||||
invoice_line.company = invoice.company
|
||||
invoice_line.type = 'line'
|
||||
# Use product.id to instantiate it with the correct context
|
||||
invoice_line.product = product.id
|
||||
invoice_line.quantity = 1
|
||||
|
||||
invoice_line.on_change_product()
|
||||
|
||||
|
||||
Reference in new issue
Block a user