odoo-addon-automation-oca 16.0.1.5.2__py3-none-any.whl → 17.0.1.0.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. odoo/addons/automation_oca/README.rst +7 -7
  2. odoo/addons/automation_oca/__init__.py +1 -0
  3. odoo/addons/automation_oca/__manifest__.py +1 -1
  4. odoo/addons/automation_oca/data/cron.xml +0 -5
  5. odoo/addons/automation_oca/i18n/automation_oca.pot +95 -22
  6. odoo/addons/automation_oca/i18n/es.po +0 -13
  7. odoo/addons/automation_oca/i18n/fr.po +0 -13
  8. odoo/addons/automation_oca/i18n/it.po +2 -15
  9. odoo/addons/automation_oca/models/automation_configuration.py +28 -26
  10. odoo/addons/automation_oca/models/automation_configuration_step.py +38 -11
  11. odoo/addons/automation_oca/models/automation_filter.py +5 -1
  12. odoo/addons/automation_oca/models/automation_record.py +64 -52
  13. odoo/addons/automation_oca/models/automation_record_step.py +34 -15
  14. odoo/addons/automation_oca/models/automation_tag.py +0 -1
  15. odoo/addons/automation_oca/models/mail_activity.py +3 -3
  16. odoo/addons/automation_oca/models/mail_mail.py +17 -15
  17. odoo/addons/automation_oca/models/mail_thread.py +6 -11
  18. odoo/addons/automation_oca/static/description/index.html +5 -5
  19. odoo/addons/automation_oca/static/src/fields/automation_activity/automation_activity.esm.js +5 -4
  20. odoo/addons/automation_oca/static/src/fields/automation_graph/automation_graph.esm.js +21 -25
  21. odoo/addons/automation_oca/static/src/views/automation_kanban/automation_kanban.scss +3 -0
  22. odoo/addons/automation_oca/static/src/views/automation_kanban/automation_kanban_compiler.esm.js +2 -3
  23. odoo/addons/automation_oca/static/src/views/automation_kanban/automation_kanban_record.esm.js +1 -2
  24. odoo/addons/automation_oca/static/src/views/automation_kanban/automation_kanban_renderer.esm.js +1 -2
  25. odoo/addons/automation_oca/tests/__init__.py +1 -0
  26. odoo/addons/automation_oca/tests/common.py +2 -1
  27. odoo/addons/automation_oca/tests/models.py +10 -0
  28. odoo/addons/automation_oca/tests/test_automation_action.py +7 -8
  29. odoo/addons/automation_oca/tests/test_automation_activity.py +122 -10
  30. odoo/addons/automation_oca/tests/test_automation_base.py +73 -82
  31. odoo/addons/automation_oca/tests/test_automation_date.py +59 -0
  32. odoo/addons/automation_oca/tests/test_automation_mail.py +31 -50
  33. odoo/addons/automation_oca/tests/test_automation_security.py +5 -2
  34. odoo/addons/automation_oca/utils/__init__.py +1 -0
  35. odoo/addons/automation_oca/utils/query.py +45 -0
  36. odoo/addons/automation_oca/views/automation_configuration.xml +60 -51
  37. odoo/addons/automation_oca/views/automation_configuration_step.xml +86 -49
  38. odoo/addons/automation_oca/views/automation_filter.xml +1 -3
  39. odoo/addons/automation_oca/views/automation_record.xml +32 -19
  40. odoo/addons/automation_oca/views/automation_record_step.xml +4 -14
  41. odoo/addons/automation_oca/views/automation_tag.xml +3 -4
  42. odoo/addons/automation_oca/views/link_tracker_clicks.xml +2 -3
  43. odoo/addons/automation_oca/wizards/automation_configuration_test.py +1 -2
  44. odoo/addons/automation_oca/wizards/automation_configuration_test.xml +4 -6
  45. odoo/addons/automation_oca/wizards/mail_compose_message.py +2 -3
  46. {odoo_addon_automation_oca-16.0.1.5.2.dist-info → odoo_addon_automation_oca-17.0.1.0.0.5.dist-info}/METADATA +12 -12
  47. odoo_addon_automation_oca-17.0.1.0.0.5.dist-info/RECORD +66 -0
  48. {odoo_addon_automation_oca-16.0.1.5.2.dist-info → odoo_addon_automation_oca-17.0.1.0.0.5.dist-info}/WHEEL +1 -1
  49. odoo_addon_automation_oca-17.0.1.0.0.5.dist-info/top_level.txt +1 -0
  50. odoo_addon_automation_oca-16.0.1.5.2.dist-info/RECORD +0 -62
  51. odoo_addon_automation_oca-16.0.1.5.2.dist-info/top_level.txt +0 -1
@@ -2,7 +2,6 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_configuration_step_form_view">
7
6
  <field name="model">automation.configuration.step</field>
8
7
  <field name="arch" type="xml">
@@ -10,15 +9,17 @@
10
9
  <header />
11
10
  <sheet>
12
11
  <div class="oe_title">
13
- <h1><field
12
+ <h1>
13
+ <field
14
14
  name="name"
15
15
  placeholder="e.g. Remember unpaid invoices"
16
- /></h1>
16
+ />
17
+ </h1>
17
18
  </div>
18
19
  <div
19
20
  class="alert alert-warning"
20
21
  role="alert"
21
- attrs="{'invisible': [('trigger_interval', '>=', 0)]}"
22
+ invisible="trigger_interval >= 0"
22
23
  >
23
24
  In this case, the task will be executed automatically when we create it in the same process.
24
25
  </div>
@@ -30,83 +31,109 @@
30
31
  <field name="model" invisible="1" />
31
32
  </group>
32
33
  <group>
34
+ <field name="trigger_date_kind" />
33
35
  <label for="trigger_interval" string="Trigger" />
34
36
  <div class="container ps-0">
35
37
  <div class="row">
36
- <div class="col-2"><field
37
- name="trigger_interval"
38
- nolabel="1"
39
- /></div>
40
- <div class="col-10"><field
38
+ <div class="col-2">
39
+ <field name="trigger_interval" nolabel="1" />
40
+ </div>
41
+ <div class="col-10">
42
+ <field
41
43
  name="trigger_interval_type"
42
44
  nolabel="1"
43
- /></div>
44
- </div>
45
- <div class="row">
46
- <span class="col-2">after</span>
47
- <div class="col-10"><field
48
- name="trigger_type"
49
- nolabel="1"
50
- /></div>
45
+ />
46
+ </div>
51
47
  </div>
52
48
  <div
53
49
  class="row"
54
- attrs="{'invisible': [('trigger_type', '=', 'start')]}"
50
+ invisible="trigger_date_kind != 'date'"
55
51
  >
52
+ <span class="col-2">after</span>
53
+ <div class="col-10">
54
+ <field
55
+ name="trigger_date_field_id"
56
+ nolabel="1"
57
+ required="trigger_date_kind == 'date'"
58
+ />
59
+ </div>
60
+ </div>
61
+ <div class="row">
62
+ <span
63
+ class="col-2"
64
+ invisible="trigger_date_kind != 'offset'"
65
+ >after</span>
66
+ <span
67
+ class="col-2"
68
+ invisible="trigger_date_kind == 'offset'"
69
+ >when</span>
70
+ <div class="col-10">
71
+ <field name="trigger_type" nolabel="1" />
72
+ </div>
73
+ </div>
74
+ <div class="row" invisible="trigger_type == 'start'">
56
75
  <span class="col-2">of</span>
57
76
  <div class="col-10">
58
77
  <field
59
78
  name="parent_id"
60
79
  domain="[('configuration_id', '=', configuration_id)]"
61
- /></div>
80
+ />
81
+ </div>
62
82
  </div>
63
83
  </div>
64
84
  <field name="allow_expiry" invisible="1" />
65
- <field
66
- name="expiry"
67
- attrs="{'invisible': [('allow_expiry', '=', False)]}"
68
- />
85
+ <div
86
+ class="container ps-0 alert alert-warning"
87
+ role="alert"
88
+ colspan="2"
89
+ invisible="trigger_date_kind != 'date'"
90
+ >
91
+ The scheduled date will be the date of the record at the moment we generate the new record.
92
+ Later changes of the field will not affect the scheduled date.
93
+ </div>
94
+ <field name="expiry" invisible="not allow_expiry" />
69
95
  <label
70
96
  for="expiry_interval"
71
97
  string="Trigger"
72
- attrs="{'invisible': [('expiry', '=', False)]}"
98
+ invisible="not expiry"
73
99
  />
74
- <div
75
- class="container ps-0"
76
- attrs="{'invisible': [('expiry', '=', False)]}"
77
- >
100
+ <div class="container ps-0" invisible="not expiry">
78
101
  <div class="row">
79
- <div class="col-2"><field
102
+ <div class="col-2">
103
+ <field
80
104
  name="expiry_interval"
81
- attrs="{'required': [('expiry', '=', True)]}"
105
+ required="expiry"
82
106
  nolabel="1"
83
- /></div>
84
- <div class="col-10"><field
107
+ />
108
+ </div>
109
+ <div class="col-10">
110
+ <field
85
111
  name="expiry_interval_type"
86
- attrs="{'required': [('expiry', '=', True)]}"
112
+ required="expiry"
87
113
  nolabel="1"
88
- /></div>
114
+ />
115
+ </div>
89
116
  </div>
90
117
  </div>
91
118
  </group>
92
- <group attrs="{'invisible':[('step_type', '!=', 'action')]}">
119
+ <group invisible="step_type != 'action'">
93
120
  <field
94
121
  name="server_action_id"
95
122
  context="{'default_model_id': model_id}"
96
- attrs="{'required': [('step_type', '=', 'action')]}"
123
+ required="step_type == 'action'"
97
124
  />
98
125
  </group>
99
- <group attrs="{'invisible':[('step_type', '!=', 'mail')]}">
126
+ <group invisible="step_type != 'mail'">
100
127
  <field
101
128
  name="mail_template_id"
102
- attrs="{'required': [('step_type', '=', 'mail')]}"
129
+ required="step_type == 'mail'"
103
130
  />
104
131
  <field name="mail_author_id" />
105
132
  </group>
106
- <group attrs="{'invisible':[('step_type', '!=', 'activity')]}">
133
+ <group invisible="step_type != 'activity'">
107
134
  <field
108
135
  name="activity_type_id"
109
- attrs="{'required': [('step_type', '=', 'activity')]}"
136
+ required="step_type == 'activity'"
110
137
  />
111
138
  <label
112
139
  for="activity_date_deadline_range"
@@ -114,25 +141,31 @@
114
141
  />
115
142
  <div class="container ps-0">
116
143
  <div class="row">
117
- <div class="col-2"><field
144
+ <div class="col-2">
145
+ <field
118
146
  name="activity_date_deadline_range"
119
147
  nolabel="1"
120
- /></div>
121
- <div class="col-10"><field
148
+ />
149
+ </div>
150
+ <div class="col-10">
151
+ <field
122
152
  name="activity_date_deadline_range_type"
123
153
  nolabel="1"
124
- /></div>
154
+ />
155
+ </div>
125
156
  </div>
126
157
  </div>
127
158
  <field name="activity_user_type" />
128
159
  <field
129
160
  name="activity_user_id"
130
- attrs="{'invisible': [('activity_user_type', '!=', 'specific')], 'required': [('activity_user_type', '=', 'specific')]}"
161
+ invisible="activity_user_type != 'specific'"
162
+ required="activity_user_type == 'specific'"
131
163
  />
132
164
  <field
133
165
  name="activity_user_field_id"
134
166
  domain="[('model_id', '=', model_id)]"
135
- attrs="{'invisible': [('activity_user_type', '!=', 'generic')], 'required': [('activity_user_type', '=', 'generic')]}"
167
+ invisible="activity_user_type != 'generic'"
168
+ required="activity_user_type == 'generic'"
136
169
  />
137
170
  </group>
138
171
  </group>
@@ -160,11 +193,17 @@
160
193
  <page
161
194
  string="Activity"
162
195
  name="activity"
163
- attrs="{'invisible':[('step_type', '!=', 'activity')]}"
196
+ invisible="step_type != 'activity'"
164
197
  >
165
198
  <group>
166
199
  <field name="activity_summary" />
167
200
  <field name="activity_note" />
201
+ <field
202
+ name="activity_verification_domain"
203
+ widget="domain"
204
+ options="{'foldable': True, 'model': 'model'}"
205
+ />
206
+ <field name="activity_verification_domain_error" />
168
207
  </group>
169
208
  </page>
170
209
  <page name="action" string="Server Action">
@@ -173,7 +212,6 @@
173
212
  </group>
174
213
  </page>
175
214
  </notebook>
176
-
177
215
  </sheet>
178
216
  </form>
179
217
  </field>
@@ -197,5 +235,4 @@
197
235
  </tree>
198
236
  </field>
199
237
  </record>
200
-
201
238
  </odoo>
@@ -2,7 +2,6 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_filter_form_view">
7
6
  <field name="model">automation.filter</field>
8
7
  <field name="arch" type="xml">
@@ -50,7 +49,7 @@
50
49
  <record model="ir.actions.act_window" id="automation_filter_act_window">
51
50
  <field name="name">Filters</field>
52
51
  <field name="res_model">automation.filter</field>
53
- <field name="view_mode">tree,form</field>
52
+ <field name="view_mode">list,form</field>
54
53
  <field name="domain">[]</field>
55
54
  <field name="context">{}</field>
56
55
  </record>
@@ -61,5 +60,4 @@
61
60
  <field name="action" ref="automation_filter_act_window" />
62
61
  <field name="sequence" eval="20" />
63
62
  </record>
64
-
65
63
  </odoo>
@@ -2,7 +2,6 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_record_form_view">
7
6
  <field name="model">automation.record</field>
8
7
  <field name="arch" type="xml">
@@ -15,25 +14,27 @@
15
14
  name="web_ribbon"
16
15
  title="Test"
17
16
  bg_color="text-bg-danger"
18
- attrs="{'invisible': [('is_test', '=', False)]}"
17
+ invisible="not is_test"
19
18
  />
20
19
 
21
20
  <div class="oe_title">
22
- <div attrs="{'invisible': [('is_orphan_record', '=', False)]}">
21
+ <div invisible="not is_orphan_record">
23
22
  <field name="is_orphan_record" invisible="1" />
24
- <h1><span>This record is an orphan record</span></h1>
23
+ <h1>
24
+ <span>This record is an orphan record</span>
25
+ </h1>
25
26
  <group>
26
27
  <field name="model" />
27
28
  </group>
28
29
  </div>
29
30
 
30
- <h1
31
- attrs="{'invisible': [('is_orphan_record', '=', True)]}"
32
- ><field
31
+ <h1 invisible="is_orphan_record">
32
+ <field
33
33
  name="resource_ref"
34
34
  required="1"
35
35
  options="{'hide_model': True}"
36
- /></h1>
36
+ />
37
+ </h1>
37
38
  </div>
38
39
  <group>
39
40
  <field name="configuration_id" />
@@ -45,7 +46,7 @@
45
46
  mode="kanban"
46
47
  class="o_automation_kanban"
47
48
  >
48
- <kanban limit="1000">
49
+ <kanban>
49
50
  <field name="id" />
50
51
  <field name="name" />
51
52
  <field name="step_type" />
@@ -131,7 +132,8 @@
131
132
  <span t-else="" class="text-primary">
132
133
  <i
133
134
  t-att-class="record.trigger_type_data.raw_value.icon"
134
- /> <t
135
+ />
136
+ <t
135
137
  t-esc="record.trigger_type_data.raw_value.message"
136
138
  />
137
139
  </span>
@@ -153,11 +155,15 @@
153
155
  <div
154
156
  class="o_automation_kanban_header_title"
155
157
  >
156
- <h3 class="mb0 mt0"><a
158
+ <h3 class="mb0 mt0">
159
+ <a
157
160
  type="edit"
158
161
  class="oe_kanban_action oe_kanban_action_a"
159
162
  t-att-title="record.name.raw_value"
160
- ><field name="name" /></a></h3>
163
+ >
164
+ <field name="name" />
165
+ </a>
166
+ </h3>
161
167
  <div t-esc="record.step_type.value" />
162
168
  </div>
163
169
  <div
@@ -177,6 +183,13 @@
177
183
  title="Cancel"
178
184
  t-if="record.state.raw_value == 'scheduled'"
179
185
  />
186
+ <button
187
+ type="object"
188
+ name="retry"
189
+ class="fa fa-refresh btn-warning o_automation_kanban_header_icon"
190
+ title="Retry"
191
+ t-if="record.state.raw_value == 'cancel' || record.state.raw_value == 'rejected' || record.state.raw_value == 'error' || record.state.raw_value == 'expired'"
192
+ />
180
193
  </div>
181
194
  </div>
182
195
  <div
@@ -196,7 +209,8 @@
196
209
  t-att-title="state.name"
197
210
  role="img"
198
211
  t-att-aria-label="state.name"
199
- /> <t t-esc="state.name" />
212
+ />
213
+ <t t-esc="state.name" />
200
214
  </div>
201
215
  </t>
202
216
  </div>
@@ -242,7 +256,6 @@
242
256
  </field>
243
257
  </record>
244
258
 
245
-
246
259
  <record id="automation_record_graph_view" model="ir.ui.view">
247
260
  <field name="name">automation.record.graph</field>
248
261
  <field name="model">automation.record</field>
@@ -265,9 +278,10 @@
265
278
  </record>
266
279
 
267
280
  <record model="ir.actions.act_window" id="automation_record_act_window">
268
- <field name="name">Automation Record</field> <!-- TODO -->
281
+ <field name="name">Automation Record</field>
282
+ <!-- TODO -->
269
283
  <field name="res_model">automation.record</field>
270
- <field name="view_mode">graph,pivot,tree,form</field>
284
+ <field name="view_mode">graph,pivot,list,form</field>
271
285
  <field name="domain">[]</field>
272
286
  <field name="context">{}</field>
273
287
  </record>
@@ -278,7 +292,7 @@
278
292
  >
279
293
  <field name="name">Records</field>
280
294
  <field name="res_model">automation.record</field>
281
- <field name="view_mode">tree,form</field>
295
+ <field name="view_mode">list,form</field>
282
296
  <field
283
297
  name="domain"
284
298
  >[('configuration_id', '=', active_id), ('is_test', '=', False)]</field>
@@ -290,7 +304,7 @@
290
304
  >
291
305
  <field name="name">Test Records</field>
292
306
  <field name="res_model">automation.record</field>
293
- <field name="view_mode">tree,form</field>
307
+ <field name="view_mode">list,form</field>
294
308
  <field
295
309
  name="domain"
296
310
  >[('configuration_id', '=', active_id), ('is_test', '=', True)]</field>
@@ -303,5 +317,4 @@
303
317
  <field name="action" ref="automation_record_act_window" />
304
318
  <field name="sequence" eval="16" />
305
319
  </record>
306
-
307
320
  </odoo>
@@ -2,7 +2,6 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_record_step_form_view">
7
6
  <field name="model">automation.record.step</field>
8
7
  <field name="arch" type="xml">
@@ -17,16 +16,9 @@
17
16
  <field name="scheduled_date" />
18
17
  <field name="processed_on" />
19
18
  <field name="step_type" />
20
- <field
21
- name="message_id"
22
- attrs="{'invisible': [('message_id', '=', False)]}"
23
- />
19
+ <field name="message_id" invisible="not message_id" />
24
20
  </group>
25
- <group
26
- name="error"
27
- string="Error"
28
- attrs="{'invisible': [('state', '!=', 'error')]}"
29
- >
21
+ <group name="error" string="Error" invisible="state != 'error'">
30
22
  <field name="error_trace" nolabel="1" />
31
23
  </group>
32
24
  </sheet>
@@ -44,7 +36,7 @@
44
36
  name="run"
45
37
  type="object"
46
38
  string="Run"
47
- attrs="{'invisible': [('state', '!=', 'scheduled')]}"
39
+ invisible="state != 'scheduled'"
48
40
  />
49
41
  </tree>
50
42
  </field>
@@ -55,7 +47,6 @@
55
47
  <field name="model">automation.record.step</field>
56
48
  <field name="arch" type="xml">
57
49
  <search>
58
-
59
50
  <field name="configuration_step_id" />
60
51
  <field name="configuration_id" />
61
52
  <field name="record_id" />
@@ -127,7 +118,7 @@
127
118
  <record model="ir.actions.act_window" id="automation_record_step_act_window">
128
119
  <field name="name">Activities</field>
129
120
  <field name="res_model">automation.record.step</field>
130
- <field name="view_mode">graph,pivot,tree,form</field>
121
+ <field name="view_mode">graph,pivot,list,form</field>
131
122
  <field name="domain">[]</field>
132
123
  <field name="context">{}</field>
133
124
  </record>
@@ -138,5 +129,4 @@
138
129
  <field name="action" ref="automation_record_step_act_window" />
139
130
  <field name="sequence" eval="20" />
140
131
  </record>
141
-
142
132
  </odoo>
@@ -2,7 +2,6 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_tag_search_view">
7
6
  <field name="model">automation.tag</field>
8
7
  <field name="arch" type="xml">
@@ -23,9 +22,10 @@
23
22
  </record>
24
23
 
25
24
  <record model="ir.actions.act_window" id="automation_tag_act_window">
26
- <field name="name">Tags</field> <!-- TODO -->
25
+ <field name="name">Tags</field>
26
+ <!-- TODO -->
27
27
  <field name="res_model">automation.tag</field>
28
- <field name="view_mode">tree,form</field>
28
+ <field name="view_mode">list,form</field>
29
29
  <field name="domain">[]</field>
30
30
  <field name="context">{}</field>
31
31
  </record>
@@ -36,5 +36,4 @@
36
36
  <field name="action" ref="automation_tag_act_window" />
37
37
  <field name="sequence" eval="40" />
38
38
  </record>
39
-
40
39
  </odoo>
@@ -1,9 +1,8 @@
1
1
  <?xml version="1.0" encoding="UTF-8" ?>
2
2
  <odoo>
3
-
4
3
  <record id="link_tracker_click_search_view" model="ir.ui.view">
5
4
  <field name="name">link.tracker.click.view.search.inherit.mass_mailing</field>
6
- <field name="model">link.tracker.click</field>
5
+ <field name="model">link.tracker.click</field>
7
6
  <field name="inherit_id" ref="link_tracker.link_tracker_click_view_search" />
8
7
  <field name="arch" type="xml">
9
8
  <xpath expr="//field[@name='country_id']" position="after">
@@ -22,7 +21,7 @@
22
21
  <record model="ir.actions.act_window" id="link_tracker_click_act_window">
23
22
  <field name="name">Clicks</field>
24
23
  <field name="res_model">link.tracker.click</field>
25
- <field name="view_mode">graph,pivot,tree</field>
24
+ <field name="view_mode">graph,pivot,list</field>
26
25
  <field name="domain">[('automation_record_step_id', '!=', False)]</field>
27
26
  <field
28
27
  name="context"
@@ -5,7 +5,6 @@ from odoo import api, fields, models
5
5
 
6
6
 
7
7
  class AutomationConfigurationTest(models.TransientModel):
8
-
9
8
  _name = "automation.configuration.test"
10
9
  _description = "Test automation configuration"
11
10
 
@@ -33,7 +32,7 @@ class AutomationConfigurationTest(models.TransientModel):
33
32
  for record in self:
34
33
  if record.model and record.model in self.env:
35
34
  res = self.env[record.model].search([], limit=1)
36
- record.resource_ref = "%s,%s" % (record.model, res.id)
35
+ record.resource_ref = f"{record.model},{res.id}"
37
36
  else:
38
37
  record.resource_ref = None
39
38
 
@@ -2,19 +2,19 @@
2
2
  <!-- Copyright 2024 Dixmit
3
3
  License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
4
  <odoo>
5
-
6
5
  <record model="ir.ui.view" id="automation_configuration_test_form_view">
7
6
  <field name="model">automation.configuration.test</field>
8
7
  <field name="arch" type="xml">
9
8
  <form string="Test configuration">
10
9
  <sheet>
11
-
12
10
  <div class="oe_title">
13
- <h2><field
11
+ <h2>
12
+ <field
14
13
  name="resource_ref"
15
14
  required="1"
16
15
  options="{'hide_model': True}"
17
- /></h2>
16
+ />
17
+ </h2>
18
18
  </div>
19
19
  <div class="row text-center">
20
20
  On tests, mails will not be sent, but templates will be generated and actions will be executed.
@@ -44,6 +44,4 @@
44
44
  <field name="context">{'default_configuration_id': active_id}</field>
45
45
  <field name="target">new</field>
46
46
  </record>
47
-
48
-
49
47
  </odoo>
@@ -5,13 +5,12 @@ from odoo import fields, models
5
5
 
6
6
 
7
7
  class MailComposeMessage(models.TransientModel):
8
-
9
8
  _inherit = "mail.compose.message"
10
9
 
11
10
  automation_record_step_id = fields.Many2one("automation.record.step")
12
11
 
13
- def get_mail_values(self, res_ids):
14
- result = super().get_mail_values(res_ids)
12
+ def _prepare_mail_values(self, res_ids):
13
+ result = super()._prepare_mail_values(res_ids)
15
14
  if self.automation_record_step_id:
16
15
  for res_id in res_ids:
17
16
  result[res_id][