[FIX] base: copy VAT

When creating a company from a partner, copy the VAT number as well.

opw-808019
This commit is contained in:
Nicolas Martinelli
2018-02-20 13:23:41 +01:00
committed by Nicolas Martinelli
parent 64be3521ce
commit 7c92417cba
+1 -1
View File
@@ -539,7 +539,7 @@ class Partner(models.Model):
self.ensure_one()
if self.company_name:
# Create parent company
values = dict(name=self.company_name, is_company=True)
values = dict(name=self.company_name, is_company=True, vat=self.vat)
values.update(self._update_fields_values(self._address_fields()))
new_company = self.create(values)
# Set new company as my parent