[IMP]pms: improvement invoicing data checks

This commit is contained in:
Darío Lodeiros
2022-02-26 11:05:53 +01:00
parent 2418127f87
commit c4ca6a4fed
6 changed files with 70 additions and 17 deletions

View File

@@ -555,15 +555,13 @@ class ResPartner(models.Model):
key_fields.extend(["document_number"])
return key_fields
def _enought_invoice_data(self):
def _check_enought_invoice_data(self):
self.ensure_one()
if (
self.document_number_to_invoice
and not self.country_id
and not self.state_id
and not self.city
and not self.zip
and not self.street
and self.country_id
and self.city
and self.street
):
return True
return False