details: https://code.tryton.org/tryton/commit/f2eb4ca187d7
branch: 8.0
user: Cédric Krier <[email protected]>
date: Wed May 27 10:21:50 2026 +0200
description:
Do not copy accounting templates when copying product category for
accounting
Closes #14862
(grafted from 6cd898bfdb36da8c69ecaa9ca85eb07b4cc88df3)
diffstat:
modules/account_product/product.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 719408d95786 -r f2eb4ca187d7 modules/account_product/product.py
--- a/modules/account_product/product.py Thu May 21 17:54:51 2026 +0200
+++ b/modules/account_product/product.py Wed May 27 10:21:50 2026 +0200
@@ -260,6 +260,12 @@
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'