changeset f6100aec8cb7 in modules/marketing_automation:default
details: 
https://hg.tryton.org/modules/marketing_automation?cmd=changeset&node=f6100aec8cb7
description:
        Send only the required fields when fetching a readonly view definition

        issue11134
        review380081002
diffstat:

 marketing_automation.py |  22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diffs (94 lines):

diff -r 2125544eb448 -r f6100aec8cb7 marketing_automation.py
--- a/marketing_automation.py   Wed Apr 06 23:37:42 2022 +0200
+++ b/marketing_automation.py   Fri Apr 08 19:07:13 2022 +0200
@@ -270,7 +270,6 @@
         states={
             'invisible': ~Eval('event'),
             },
-        depends=['event'],
         help="Check to execute the activity "
         "if the event has not happened by the end of the delay.")
     on = fields.Function(fields.Selection([
@@ -291,7 +290,6 @@
         states={
             'required': Eval('negative', False),
             },
-        depends=['negative'],
         help="After how much time the action should be executed.")
 
     action = fields.Selection([
@@ -304,7 +302,6 @@
         states={
             'invisible': Eval('action') != 'send_email',
             },
-        depends=['action'],
         help="Leave empty to use the value defined in the configuration file.")
     email_title = fields.Char(
         "E-Mail Title",
@@ -313,7 +310,6 @@
             'invisible': Eval('action') != 'send_email',
             'required': Eval('action') == 'send_email',
             },
-        depends=['action'],
         help="The subject of the email.\n"
         "The Genshi syntax can be used "
         "with 'record' in the evaluation context.")
@@ -324,7 +320,6 @@
             'invisible': Eval('action') != 'send_email',
             'required': Eval('action') == 'send_email',
             },
-        depends=['action'],
         help="The HTML content of the E-mail.\n"
         "The Genshi syntax can be used "
         "with 'record' in the evaluation context.")
@@ -336,15 +331,14 @@
             "E-Mails Opened",
             states={
                 'invisible': Eval('action') != 'send_email',
-                },
-            depends=['action']), 'get_record_count')
+                }), 'get_record_count')
     email_clicked = fields.Function(
         fields.Integer(
             "E-Mails Clicked",
             states={
                 'invisible': Eval('action') != 'send_email',
-                },
-            depends=['action']), 'get_record_count')
+                }),
+        'get_record_count')
 
     @classmethod
     def __setup__(cls):
@@ -359,7 +353,6 @@
                     [(name, 'in', events + [None])],
                     domain)
             field.domain = [domain]
-            field.depends = ['parent_action']
 
     @classmethod
     def view_attributes(cls):
@@ -736,20 +729,17 @@
         "At",
         states={
             'readonly': Eval('state') != 'waiting',
-            },
-        depends=['state'])
+            })
     email_opened = fields.Boolean(
         "E-Mail Opened",
         states={
             'invisible': Eval('activity_action') != 'send_email',
-            },
-        depends=['activity_action'])
+            })
     email_clicked = fields.Boolean(
         "E-Mail Clicked",
         states={
             'invisible': Eval('activity_action') != 'send_email',
-            },
-        depends=['activity_action'])
+            })
     state = fields.Selection([
             ('waiting', "Waiting"),
             ('done', "Done"),

Reply via email to