changeset e3b14c6a24ab in modules/commission:default
details: 
https://hg.tryton.org/modules/commission?cmd=changeset&node=e3b14c6a24ab
description:
        Use declarative index definition for ModelSQL

        issue5757
        review361251002
diffstat:

 commission.py |  9 +++++----
 product.py    |  8 ++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r fc02e6186616 -r e3b14c6a24ab commission.py
--- a/commission.py     Sun Oct 09 22:43:14 2022 +0200
+++ b/commission.py     Tue Oct 11 00:44:49 2022 +0200
@@ -164,7 +164,7 @@
             ],
         help="The last date that the agent will be considered for selection.")
     party = fields.Many2One(
-        'party.party', "Party", ondelete='CASCADE', select=True,
+        'party.party', "Party", ondelete='CASCADE',
         context={
             'company': Eval('company', -1),
             },
@@ -172,7 +172,7 @@
     company = fields.Function(fields.Many2One('company.company', "Company"),
         'on_change_with_company', searcher='search_company')
     employee = fields.Many2One(
-        'company.employee', "Employee", select=True,
+        'company.employee', "Employee",
         domain=[
             ('company', '=', Eval('company')),
             ])
@@ -334,9 +334,10 @@
         'readonly': Bool(Eval('invoice_line')),
         }
     origin = fields.Reference(
-        "Origin", selection='get_origin', select=True, states=_readonly_states,
+        "Origin", selection='get_origin', states=_readonly_states,
         help="The source of the commission.")
-    date = fields.Date('Date', select=True, states=_readonly_states,
+    date = fields.Date(
+        "Date", states=_readonly_states,
         help="When the commission is due.")
     agent = fields.Many2One('commission.agent', 'Agent', required=True,
         states=_readonly_states)
diff -r fc02e6186616 -r e3b14c6a24ab product.py
--- a/product.py        Sun Oct 09 22:43:14 2022 +0200
+++ b/product.py        Tue Oct 11 00:44:49 2022 +0200
@@ -23,10 +23,10 @@
 class Template_Agent(ModelSQL):
     'Product Template - Commission Agent'
     __name__ = 'product.template-commission.agent'
-    template = fields.Many2One('product.template', 'Template',
-        required=True, select=True)
-    agent = fields.Many2One('commission.agent', 'Agent',
-        required=True, select=True,
+    template = fields.Many2One(
+        'product.template', "Template", required=True)
+    agent = fields.Many2One(
+        'commission.agent', "Agent", required=True,
         domain=[
             ('type_', '=', 'principal'),
             ])

Reply via email to