Include be_vat identifier to VAT customer

issue9891
review318961002
This commit is contained in:
Cédric Krier committed 2020-12-06 00:33:19 +01:00
1 parent 66604401be
commit 3076ac620f
1 file changed
+6 -4
+6 -4
View File
@@ -93,10 +93,12 @@ class BEVATCustomer(ModelSQL, ModelView):
where = ((invoice.company == context.get('company'))
& (period.fiscalyear == context.get('fiscalyear')))
where &= invoice.type == 'out'
where &= (company_identifier.code.ilike('BE%')
& (company_identifier.type == 'eu_vat'))
where &= (party_identifier.code.ilike('BE%')
& (party_identifier.type == 'eu_vat'))
where &= ((company_identifier.code.ilike('BE%')
& (company_identifier.type == 'eu_vat'))
| (company_identifier.type == 'be_vat'))
where &= ((party_identifier.code.ilike('BE%')
& (party_identifier.type == 'eu_vat'))
| (party_identifier.type == 'be_vat'))
where &= tax.group.in_(groups)
return (invoice_tax
.join(invoice,