Use used properties for account payable and receivable

issue6561
review38471002
This commit is contained in:
Sergi Almacellas Abellana committed 2017-09-28 10:18:05 +02:00
1 parent 5513035b91
commit cb2141d98c
1 file changed
+2 -2
+2 -2
View File
@@ -442,11 +442,11 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
self.account = None
if self.party:
if self.type == 'out':
self.account = self.party.account_receivable
self.account = self.party.account_receivable_used
if self.party.customer_payment_term:
self.payment_term = self.party.customer_payment_term
elif self.type == 'in':
self.account = self.party.account_payable
self.account = self.party.account_payable_used
if self.party.supplier_payment_term:
self.payment_term = self.party.supplier_payment_term