Add missing invoice in depends

issue7249
review39241002
This commit is contained in:
Cédric Krier committed 2018-03-24 13:46:10 +01:00
1 parent 1567a68edd
commit 058201c87f
1 file changed
+6 -5
+6 -5
View File
@@ -1723,7 +1723,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
return self.currency.digits
return 2
@fields.depends('type', 'quantity', 'unit_price',
@fields.depends('type', 'quantity', 'unit_price', 'invoice',
'_parent_invoice.currency', 'currency')
def on_change_with_amount(self):
if self.type == 'line':
@@ -1856,8 +1856,9 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
if self.product:
return self.product.default_uom_category.id
@fields.depends('account', 'product', '_parent_invoice.party',
'_parent_invoice.type', 'party', 'invoice', 'invoice_type')
@fields.depends('account', 'product', 'invoice',
'_parent_invoice.party', '_parent_invoice.type',
'party', 'invoice', 'invoice_type')
def on_change_account(self):
if self.product:
return
@@ -2191,7 +2192,7 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
if self.invoice:
return self.invoice.state
@fields.depends('tax', '_parent_invoice.party', 'base')
@fields.depends('tax', 'invoice', '_parent_invoice.party', 'base')
def on_change_tax(self):
Tax = Pool().get('account.tax')
if not self.tax:
@@ -2216,7 +2217,7 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
self.tax_sign = tax.credit_note_tax_sign
self.account = tax.credit_note_account
@fields.depends('tax', 'base', 'amount', 'manual',
@fields.depends('tax', 'base', 'amount', 'manual', 'invoice',
'_parent_invoice.currency')
def on_change_with_amount(self):
Tax = Pool().get('account.tax')