diff --git a/sale.py b/sale.py index eea107065d..8de358ad9b 100644 --- a/sale.py +++ b/sale.py @@ -204,8 +204,6 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin): 'defined for the quotation of sale "%s".'), 'warehouse_required': ('Warehouse must be defined for the ' 'quotation of sale "%s".'), - 'missing_account_receivable': ('It misses ' - 'an "Account Receivable" on the party "%s".'), 'delete_cancel': ('Sale "%s" must be cancelled before ' 'deletion.'), }) @@ -755,7 +753,7 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin): party=self.party, invoice_address=self.invoice_address, currency=self.currency, - account=self.party.account_receivable, + account=self.party.account_receivable_used, ) invoice.on_change_type() invoice.payment_term = self.payment_term @@ -768,10 +766,6 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin): if self.invoice_method == 'manual': return - if not self.party.account_receivable: - self.raise_user_error('missing_account_receivable', - (self.party.rec_name,)) - invoice_lines = [] for line in self.lines: invoice_lines.append(line.get_invoice_line())