Do not copy accounting templates when copying product category for accounting
Closes #14862 (grafted from 6cd898bfdb36da8c69ecaa9ca85eb07b4cc88df3) --HG-- branch : 8.0
This commit is contained in:
@@ -260,6 +260,12 @@ class Category(CompanyMultiValueMixin, metaclass=PoolMeta):
|
||||
else:
|
||||
return self.supplier_taxes_deductible_rate
|
||||
|
||||
@classmethod
|
||||
def copy(cls, categories, default=None):
|
||||
default = default.copy() if default is not None else {}
|
||||
default.setdefault('accounting_templates')
|
||||
return super().copy(categories, default=default)
|
||||
|
||||
|
||||
class CategoryAccount(ModelSQL, CompanyValueMixin):
|
||||
__name__ = 'product.category.account'
|
||||
|
||||
Reference in New Issue
Block a user