changeset d091786f9099 in modules/marketing_automation:default
details: 
https://hg.tryton.org/modules/marketing_automation?cmd=changeset;node=d091786f9099
description:
        Returns all available models when no scenario is set

        This is needed to let the domain parsers provide completion and 
correctly
        split the value.

        issue9865
        review320431002
diffstat:

 marketing_automation.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 2cab0abcba9c -r d091786f9099 marketing_automation.py
--- a/marketing_automation.py   Mon Nov 16 21:22:13 2020 +0100
+++ b/marketing_automation.py   Fri Nov 27 22:41:03 2020 +0100
@@ -654,9 +654,10 @@
     def get_models(self):
         pool = Pool()
         Model = pool.get('ir.model')
+        Scenario = pool.get('marketing.automation.scenario')
 
         if not self.scenario:
-            return [('', '')]
+            return Scenario.get_models()
 
         model, = Model.search([
                 ('model', '=', self.scenario.model),

Reply via email to