changeset 32ce93c7fe77 in modules/account_product:default
details:
https://hg.tryton.org/modules/account_product?cmd=changeset&node=32ce93c7fe77
description:
Use declarative index definition for ModelSQL
issue5757
review361251002
diffstat:
product.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r c8baba2d1088 -r 32ce93c7fe77 product.py
--- a/product.py Mon May 02 16:58:10 2022 +0200
+++ b/product.py Tue Oct 11 00:44:49 2022 +0200
@@ -55,7 +55,8 @@
class Category(CompanyMultiValueMixin, metaclass=PoolMeta):
__name__ = 'product.category'
- accounting = fields.Boolean('Accounting', select=True,
+ accounting = fields.Boolean(
+ "Accounting",
states={
'readonly': Bool(Eval('childs', [0])) | Bool(Eval('parent')),
},
@@ -258,7 +259,7 @@
"Category Account"
__name__ = 'product.category.account'
category = fields.Many2One(
- 'product.category', "Category", ondelete='CASCADE', select=True,
+ 'product.category', "Category", ondelete='CASCADE',
context={
'company': Eval('company', -1),
},
@@ -299,8 +300,8 @@
'Category - Customer Tax'
__name__ = 'product.category-customer-account.tax'
_table = 'product_category_customer_taxes_rel'
- category = fields.Many2One('product.category', 'Category',
- ondelete='CASCADE', select=True, required=True)
+ category = fields.Many2One(
+ 'product.category', "Category", ondelete='CASCADE', required=True)
tax = fields.Many2One('account.tax', 'Tax', ondelete='RESTRICT',
required=True)
@@ -314,8 +315,8 @@
'Category - Supplier Tax'
__name__ = 'product.category-supplier-account.tax'
_table = 'product_category_supplier_taxes_rel'
- category = fields.Many2One('product.category', 'Category',
- ondelete='CASCADE', select=True, required=True)
+ category = fields.Many2One(
+ 'product.category', "Category", ondelete='CASCADE', required=True)
tax = fields.Many2One('account.tax', 'Tax', ondelete='RESTRICT',
required=True)