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

        issue11134
        review380081002
diffstat:

 ir.py           |   3 +--
 notification.py |  11 +----------
 2 files changed, 2 insertions(+), 12 deletions(-)

diffs (86 lines):

diff -r 03131d84632e -r 27903c92c2c3 ir.py
--- a/ir.py     Wed Apr 06 23:37:43 2022 +0200
+++ b/ir.py     Fri Apr 08 19:07:13 2022 +0200
@@ -13,8 +13,7 @@
         states={
             'required': Eval('notification_email_required', False),
             'invisible': ~Eval('notification_email_required', False),
-            },
-        depends=['notification_email_required'])
+            })
     notification_email_required = fields.Function(
         fields.Boolean("Notification Email Required"),
         'on_change_with_notification_email_required')
diff -r 03131d84632e -r 27903c92c2c3 notification.py
--- a/notification.py   Wed Apr 06 23:37:43 2022 +0200
+++ b/notification.py   Fri Apr 08 19:07:13 2022 +0200
@@ -43,7 +43,6 @@
         domain=[
             ('model.model', '=', Eval('model')),
             ],
-        depends=['model'],
         help="The field that contains the recipient(s).")
     fallback_recipients = fields.Many2One(
         'res.user', "Recipients Fallback User",
@@ -53,14 +52,12 @@
         states={
             'invisible': ~Eval('recipients'),
             },
-        depends=['recipients'],
         help="User notified when no recipients e-mail is found")
     recipients_secondary = fields.Many2One(
         'ir.model.field', "Secondary Recipients",
         domain=[
             ('model.model', '=', Eval('model')),
             ],
-        depends=['model'],
         help="The field that contains the secondary recipient(s).")
     fallback_recipients_secondary = fields.Many2One(
         'res.user', "Secondary Recipients Fallback User",
@@ -70,14 +67,12 @@
         states={
             'invisible': ~Eval('recipients_secondary'),
             },
-        depends=['recipients'],
         help="User notified when no secondary recipients e-mail is found")
     recipients_hidden = fields.Many2One(
         'ir.model.field', "Hidden Recipients",
         domain=[
             ('model.model', '=', Eval('model')),
             ],
-        depends=['model'],
         help="The field that contains the hidden recipient(s).")
     fallback_recipients_hidden = fields.Many2One(
         'res.user', "Hidden Recipients Fallback User",
@@ -87,7 +82,6 @@
         states={
             'invisible': ~Eval('recipients_hidden'),
             },
-        depends=['recipients_hidden'],
         help="User notified when no hidden recipients e-mail is found")
 
     contact_mechanism = fields.Selection(
@@ -104,13 +98,11 @@
         domain=[
             ('model', '=', Eval('model')),
             ],
-        depends=['model'],
         help="The reports used as attachments.")
 
     triggers = fields.One2Many(
         'ir.trigger', 'notification_email', "Triggers",
         domain=[('model.model', '=', Eval('model'))],
-        depends=['model'],
         help="Add a trigger for the notification.")
     send_after = fields.TimeDelta(
         "Send After",
@@ -346,8 +338,7 @@
         'ir.action.report', "Report", required=True,
         domain=[
             ('model', '=', Eval('model')),
-            ],
-        depends=['model'])
+            ])
 
     model = fields.Function(fields.Char("Model"), 'get_model')
 

Reply via email to