[FIX] partner_autocomplete: stop comparing apples and oranges
If no country is specified on a partner, self.country_id is res.country() and partner_country_code contains res.country(). In the next line the code was comparing `res.country()` with `'BE'`, raising a warning. closes odoo/odoo#54026 X-original-commit: ef9fc11ded5eaef81ee4d844039bf41a714599f5 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
88c328bcd0
commit
378cde8bc4
@@ -166,7 +166,7 @@ class ResPartner(models.Model):
|
||||
|
||||
def _is_vat_syncable(self, vat):
|
||||
vat_country_code = vat[:2]
|
||||
partner_country_code = self.country_id and self.country_id.code
|
||||
partner_country_code = self.country_id.code if self.country_id else ''
|
||||
return self._is_company_in_europe(vat_country_code) and (partner_country_code == vat_country_code or not partner_country_code)
|
||||
|
||||
def _is_synchable(self):
|
||||
|
||||
Reference in New Issue
Block a user