odoo-addon-automation-oca 16.0.1.5.0.2__py3-none-any.whl → 16.0.1.5.2__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.
- odoo/addons/automation_oca/README.rst +1 -1
- odoo/addons/automation_oca/__manifest__.py +1 -1
- odoo/addons/automation_oca/models/automation_record_step.py +27 -7
- odoo/addons/automation_oca/static/description/index.html +1 -1
- odoo/addons/automation_oca/tests/test_automation_base.py +61 -0
- odoo/addons/automation_oca/views/automation_configuration.xml +1 -1
- odoo/addons/automation_oca/views/automation_record.xml +1 -1
- {odoo_addon_automation_oca-16.0.1.5.0.2.dist-info → odoo_addon_automation_oca-16.0.1.5.2.dist-info}/METADATA +2 -2
- {odoo_addon_automation_oca-16.0.1.5.0.2.dist-info → odoo_addon_automation_oca-16.0.1.5.2.dist-info}/RECORD +11 -11
- {odoo_addon_automation_oca-16.0.1.5.0.2.dist-info → odoo_addon_automation_oca-16.0.1.5.2.dist-info}/WHEEL +0 -0
- {odoo_addon_automation_oca-16.0.1.5.0.2.dist-info → odoo_addon_automation_oca-16.0.1.5.2.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Automation Oca
|
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
8
|
!! changes will be overwritten. !!
|
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
10
|
+
!! source digest: sha256:f8228197da48ef63f6c812bc2a6912523ee657a854f934dad2a70e2ef71f3c6b
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -17,23 +17,34 @@ class AutomationRecordStep(models.Model):
|
|
|
17
17
|
_description = "Activities done on the record"
|
|
18
18
|
_order = "scheduled_date ASC"
|
|
19
19
|
|
|
20
|
-
name = fields.Char(
|
|
20
|
+
name = fields.Char(compute="_compute_step_data", store=True)
|
|
21
21
|
record_id = fields.Many2one("automation.record", required=True, ondelete="cascade")
|
|
22
|
-
configuration_step_id = fields.Many2one(
|
|
23
|
-
"automation.configuration.step", required=True
|
|
24
|
-
)
|
|
22
|
+
configuration_step_id = fields.Many2one("automation.configuration.step")
|
|
25
23
|
configuration_id = fields.Many2one(
|
|
26
|
-
|
|
24
|
+
"automation.configuration",
|
|
25
|
+
compute="_compute_step_data",
|
|
26
|
+
store=True,
|
|
27
|
+
)
|
|
28
|
+
step_type = fields.Selection(
|
|
29
|
+
selection=lambda r: r.env["automation.configuration.step"]
|
|
30
|
+
._fields["step_type"]
|
|
31
|
+
.selection,
|
|
32
|
+
compute="_compute_step_data",
|
|
27
33
|
store=True,
|
|
28
34
|
)
|
|
29
|
-
step_type = fields.Selection(related="configuration_step_id.step_type", store=True)
|
|
30
35
|
scheduled_date = fields.Datetime(readonly=True)
|
|
31
36
|
do_not_wait = fields.Boolean()
|
|
32
37
|
expiry_date = fields.Datetime(readonly=True)
|
|
33
38
|
processed_on = fields.Datetime(readonly=True)
|
|
34
39
|
parent_id = fields.Many2one("automation.record.step", readonly=True)
|
|
35
40
|
child_ids = fields.One2many("automation.record.step", inverse_name="parent_id")
|
|
36
|
-
trigger_type = fields.Selection(
|
|
41
|
+
trigger_type = fields.Selection(
|
|
42
|
+
selection=lambda r: r.env[
|
|
43
|
+
"automation.configuration.step"
|
|
44
|
+
]._trigger_type_selection(),
|
|
45
|
+
compute="_compute_step_data",
|
|
46
|
+
store=True,
|
|
47
|
+
)
|
|
37
48
|
trigger_type_data = fields.Json(compute="_compute_trigger_type_data")
|
|
38
49
|
step_icon = fields.Char(compute="_compute_step_info")
|
|
39
50
|
step_name = fields.Char(compute="_compute_step_info")
|
|
@@ -73,6 +84,14 @@ class AutomationRecordStep(models.Model):
|
|
|
73
84
|
is_test = fields.Boolean(related="record_id.is_test", store=True)
|
|
74
85
|
step_actions = fields.Json(compute="_compute_step_actions")
|
|
75
86
|
|
|
87
|
+
@api.depends("configuration_step_id")
|
|
88
|
+
def _compute_step_data(self):
|
|
89
|
+
for record in self.filtered(lambda r: r.configuration_step_id):
|
|
90
|
+
record.name = record.configuration_step_id.name
|
|
91
|
+
record.configuration_id = record.configuration_step_id.configuration_id
|
|
92
|
+
record.step_type = record.configuration_step_id.step_type
|
|
93
|
+
record.trigger_type = record.configuration_step_id.trigger_type
|
|
94
|
+
|
|
76
95
|
@api.depends("trigger_type")
|
|
77
96
|
def _compute_trigger_type_data(self):
|
|
78
97
|
trigger_types = self.env["automation.configuration.step"]._trigger_types()
|
|
@@ -125,6 +144,7 @@ class AutomationRecordStep(models.Model):
|
|
|
125
144
|
return self.browse()
|
|
126
145
|
if (
|
|
127
146
|
self.record_id.resource_ref is None
|
|
147
|
+
or not self.configuration_step_id
|
|
128
148
|
or not self.record_id.resource_ref.filtered_domain(
|
|
129
149
|
safe_eval(
|
|
130
150
|
self.configuration_step_id.applied_domain,
|
|
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
368
|
!! changes will be overwritten. !!
|
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:f8228197da48ef63f6c812bc2a6912523ee657a854f934dad2a70e2ef71f3c6b
|
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
372
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/automation/tree/16.0/automation_oca"><img alt="OCA/automation" src="https://img.shields.io/badge/github-OCA%2Fautomation-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/automation-16-0/automation-16-0-automation_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/automation&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
373
|
<p>This module allows to automate several process according to some rules.</p>
|
|
@@ -586,3 +586,64 @@ class TestAutomationBase(AutomationTestCase):
|
|
|
586
586
|
self.assertTrue(
|
|
587
587
|
orphan_record_found, "No record named 'Orphan Record' was found"
|
|
588
588
|
)
|
|
589
|
+
|
|
590
|
+
def test_delete_step_executed(self):
|
|
591
|
+
"""
|
|
592
|
+
Testing that deleting a step will keep the results of the executed related steps
|
|
593
|
+
"""
|
|
594
|
+
activity = self.create_server_action()
|
|
595
|
+
child_activity = self.create_server_action(parent_id=activity.id)
|
|
596
|
+
self.configuration.editable_domain = "[('id', '=', %s)]" % self.partner_01.id
|
|
597
|
+
self.configuration.start_automation()
|
|
598
|
+
self.env["automation.configuration"].cron_automation()
|
|
599
|
+
record_activity = self.env["automation.record.step"].search(
|
|
600
|
+
[("configuration_step_id", "=", activity.id)]
|
|
601
|
+
)
|
|
602
|
+
self.assertEqual("scheduled", record_activity.state)
|
|
603
|
+
self.assertFalse(
|
|
604
|
+
self.env["automation.record.step"].search(
|
|
605
|
+
[("configuration_step_id", "=", child_activity.id)]
|
|
606
|
+
)
|
|
607
|
+
)
|
|
608
|
+
self.env["automation.record.step"]._cron_automation_steps()
|
|
609
|
+
self.assertEqual("done", record_activity.state)
|
|
610
|
+
record_child_activity = self.env["automation.record.step"].search(
|
|
611
|
+
[("configuration_step_id", "=", child_activity.id)]
|
|
612
|
+
)
|
|
613
|
+
self.assertEqual("scheduled", record_child_activity.state)
|
|
614
|
+
self.env["automation.record.step"]._cron_automation_steps()
|
|
615
|
+
self.assertEqual("done", record_child_activity.state)
|
|
616
|
+
child_activity.unlink()
|
|
617
|
+
child_activity.flush_recordset()
|
|
618
|
+
self.assertEqual("action", record_child_activity.step_type)
|
|
619
|
+
|
|
620
|
+
def test_delete_step_to_execute(self):
|
|
621
|
+
"""
|
|
622
|
+
Testing that deleting a step will make pending actions related
|
|
623
|
+
to be rejected
|
|
624
|
+
"""
|
|
625
|
+
activity = self.create_server_action()
|
|
626
|
+
child_activity = self.create_server_action(parent_id=activity.id)
|
|
627
|
+
self.configuration.editable_domain = "[('id', '=', %s)]" % self.partner_01.id
|
|
628
|
+
self.configuration.start_automation()
|
|
629
|
+
self.env["automation.configuration"].cron_automation()
|
|
630
|
+
record_activity = self.env["automation.record.step"].search(
|
|
631
|
+
[("configuration_step_id", "=", activity.id)]
|
|
632
|
+
)
|
|
633
|
+
self.assertEqual("scheduled", record_activity.state)
|
|
634
|
+
self.assertFalse(
|
|
635
|
+
self.env["automation.record.step"].search(
|
|
636
|
+
[("configuration_step_id", "=", child_activity.id)]
|
|
637
|
+
)
|
|
638
|
+
)
|
|
639
|
+
self.env["automation.record.step"]._cron_automation_steps()
|
|
640
|
+
self.assertEqual("done", record_activity.state)
|
|
641
|
+
record_child_activity = self.env["automation.record.step"].search(
|
|
642
|
+
[("configuration_step_id", "=", child_activity.id)]
|
|
643
|
+
)
|
|
644
|
+
self.assertEqual("scheduled", record_child_activity.state)
|
|
645
|
+
child_activity.unlink()
|
|
646
|
+
child_activity.flush_recordset()
|
|
647
|
+
self.assertEqual("action", record_child_activity.step_type)
|
|
648
|
+
self.env["automation.record.step"]._cron_automation_steps()
|
|
649
|
+
self.assertEqual("rejected", record_child_activity.state)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-automation_oca
|
|
3
|
-
Version: 16.0.1.5.
|
|
3
|
+
Version: 16.0.1.5.2
|
|
4
4
|
Summary: Automate actions in threaded models
|
|
5
5
|
Home-page: https://github.com/OCA/automation
|
|
6
6
|
Author: Dixmit,Odoo Community Association (OCA)
|
|
@@ -22,7 +22,7 @@ Automation Oca
|
|
|
22
22
|
!! This file is generated by oca-gen-addon-readme !!
|
|
23
23
|
!! changes will be overwritten. !!
|
|
24
24
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
25
|
-
!! source digest: sha256:
|
|
25
|
+
!! source digest: sha256:f8228197da48ef63f6c812bc2a6912523ee657a854f934dad2a70e2ef71f3c6b
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
27
|
|
|
28
28
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
odoo/addons/automation_oca/README.rst,sha256=
|
|
1
|
+
odoo/addons/automation_oca/README.rst,sha256=Lpp3S8i65DRy95qIt8sK-FnnACacoqv1-0WM2ziv3lE,6962
|
|
2
2
|
odoo/addons/automation_oca/__init__.py,sha256=dnUeA_K1torbiMNF3tt2dtECdk-FkWm01DByr9MBMIA,69
|
|
3
|
-
odoo/addons/automation_oca/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/automation_oca/__manifest__.py,sha256=GuT5wF_Md0MbTDfG3uDBIeHqiwuW6haD62SLA5i4xrE,1181
|
|
4
4
|
odoo/addons/automation_oca/controllers/__init__.py,sha256=4KFqEP2QHFbPN66eQJMdGsmNz2v7ywWv_FR1pW_kkLk,19
|
|
5
5
|
odoo/addons/automation_oca/controllers/main.py,sha256=DRL6AJKy18ekRPaKtmRoEh5i6fNQDWpoq2GTHztKOKI,2355
|
|
6
6
|
odoo/addons/automation_oca/data/cron.xml,sha256=viAGNb5X619yXQyfpO_HcJOAiQGzEE-m6Sp4y6F4gDs,1297
|
|
@@ -14,7 +14,7 @@ odoo/addons/automation_oca/models/automation_configuration.py,sha256=VaWXg_6EnUn
|
|
|
14
14
|
odoo/addons/automation_oca/models/automation_configuration_step.py,sha256=euIPXQ8OFPPLKJrxSUbyQJQqdj9jo1rh8_mdbHYpZOs,20752
|
|
15
15
|
odoo/addons/automation_oca/models/automation_filter.py,sha256=W8VM977yXH_hZUKCO8ZDKsvzIjYegoIGMN1QLEvikOY,706
|
|
16
16
|
odoo/addons/automation_oca/models/automation_record.py,sha256=LYZ1fkijB2R3QjBoJN_gnsPzqjkp-Gk_6LyPywMQAQA,7172
|
|
17
|
-
odoo/addons/automation_oca/models/automation_record_step.py,sha256=
|
|
17
|
+
odoo/addons/automation_oca/models/automation_record_step.py,sha256=dC0L1Rk7w4z-dm6psEU1Vhb-HxUmapIhVPaGGhbphvs,16955
|
|
18
18
|
odoo/addons/automation_oca/models/automation_tag.py,sha256=mIsuTsLQv8ZLLdykBmvLQ6fLKHJMKZ8qfAwaVibw78c,488
|
|
19
19
|
odoo/addons/automation_oca/models/link_tracker.py,sha256=F8TxTsq5Mzd1H18RygZn4YDjZs8WIPO-B9o1EhaADYg,1745
|
|
20
20
|
odoo/addons/automation_oca/models/mail_activity.py,sha256=OTC8RJ3ZYMPFGixMmIWFPNzHi110trdadf7GVFoulQ0,841
|
|
@@ -29,7 +29,7 @@ odoo/addons/automation_oca/security/security.xml,sha256=pT37-cLbQIP--Tzp0fljiyvN
|
|
|
29
29
|
odoo/addons/automation_oca/static/description/configuration.png,sha256=W8cAn7-cQEVhf7Zy979xMDHi1cKWbDH7uyWkjvGi9gc,55863
|
|
30
30
|
odoo/addons/automation_oca/static/description/icon.png,sha256=abhQ1HbvsatZ_WVS_G6qroJgWNa1Hppd961RD7vrAug,37729
|
|
31
31
|
odoo/addons/automation_oca/static/description/icon.svg,sha256=NkJAwQ9YAXML6VIKe90VZzKUZb58-zGNL029-GC8Pm4,4641
|
|
32
|
-
odoo/addons/automation_oca/static/description/index.html,sha256=
|
|
32
|
+
odoo/addons/automation_oca/static/description/index.html,sha256=VQj-Bcm-A4EtFrLLZffDIVX3Ev-cXk5g5mzSUJ-Ijfc,18215
|
|
33
33
|
odoo/addons/automation_oca/static/src/fields/automation_activity/automation_activity.esm.js,sha256=pbzjSHVYdYcMOXzXtC-lyVYrydk_1YRtMVh88XpTo-E,1779
|
|
34
34
|
odoo/addons/automation_oca/static/src/fields/automation_graph/automation_graph.esm.js,sha256=vbPRaNzH1_wbB0gEBhZvm0gT0VXdgtElQIYeAOJZuNM,3214
|
|
35
35
|
odoo/addons/automation_oca/static/src/fields/automation_graph/automation_graph.xml,sha256=86VqoFswW3ZppaR0KFG4_giKPeT8vgdC1A1vpBtPjFk,297
|
|
@@ -41,13 +41,13 @@ odoo/addons/automation_oca/tests/__init__.py,sha256=5VS2h2Hl3gUzMQqKgPUYnq-_Wkk7
|
|
|
41
41
|
odoo/addons/automation_oca/tests/common.py,sha256=Zu5AcWGMgoDKdsQ4VMyhHTnot1f7Hunh4tDH9CSHbXw,3558
|
|
42
42
|
odoo/addons/automation_oca/tests/test_automation_action.py,sha256=GT7Kja9l1Z-9MzWhKPuDc1a5-IkdHNgABtNVX50Sr24,8994
|
|
43
43
|
odoo/addons/automation_oca/tests/test_automation_activity.py,sha256=OLJs-D3hAUzVHX8EtnEE4_1e5XIJQ2JVoFrlpSA52Ls,10549
|
|
44
|
-
odoo/addons/automation_oca/tests/test_automation_base.py,sha256=
|
|
44
|
+
odoo/addons/automation_oca/tests/test_automation_base.py,sha256=SjBtUxD7JRvG0neCWpPi36fcxafV3nR4IKg9jmNvFcw,28453
|
|
45
45
|
odoo/addons/automation_oca/tests/test_automation_mail.py,sha256=zOzRfhH0-Zz0Jm1TX15efgXibjj7Au19597DZWvAQGc,24704
|
|
46
46
|
odoo/addons/automation_oca/tests/test_automation_security.py,sha256=iazrh9TJDCLaK1vXKXMNqBf0bizedBd3QxUwCodjesY,3883
|
|
47
|
-
odoo/addons/automation_oca/views/automation_configuration.xml,sha256=
|
|
47
|
+
odoo/addons/automation_oca/views/automation_configuration.xml,sha256=d6jypvuN2wjNLadVZ7cDEEiPIN5ukXYv6oQztm1eIG4,25999
|
|
48
48
|
odoo/addons/automation_oca/views/automation_configuration_step.xml,sha256=x2ZfzH1xa4lk4Sz8CSxpThFvhWDws7QrInZnp69CftE,9936
|
|
49
49
|
odoo/addons/automation_oca/views/automation_filter.xml,sha256=Mx0SBoVk2U3QY-hseKymbOphlK-hOjHdFzLtPgU2jok,2271
|
|
50
|
-
odoo/addons/automation_oca/views/automation_record.xml,sha256=
|
|
50
|
+
odoo/addons/automation_oca/views/automation_record.xml,sha256=ebHj_9Ioks9xWykw8QtPVZ8jgfDMQXVntQoKhhtoibk,16047
|
|
51
51
|
odoo/addons/automation_oca/views/automation_record_step.xml,sha256=cBao3BLIo9Db_Mv4VpyugpnTfzMmjLXQ5Eu2aYwD9uE,5263
|
|
52
52
|
odoo/addons/automation_oca/views/automation_tag.xml,sha256=Cm-L0rtrgxxtDt5_MRRFLgz3QQzaOjoxFq4ivLejs6M,1358
|
|
53
53
|
odoo/addons/automation_oca/views/link_tracker_clicks.xml,sha256=uSYTtxlNBBHvFEi2XAA3JW4x7fPSqoxdgPeRkkEIO1s,1668
|
|
@@ -56,7 +56,7 @@ odoo/addons/automation_oca/wizards/__init__.py,sha256=1yOQpQirzOswywec7gg_gshvEP
|
|
|
56
56
|
odoo/addons/automation_oca/wizards/automation_configuration_test.py,sha256=YK0HD6Ds6B4PMaI97MUpVQaB-wsVTmw6Hpbh532tU-g,1363
|
|
57
57
|
odoo/addons/automation_oca/wizards/automation_configuration_test.xml,sha256=r9lUzD3SeFSLStlc07iXxO1b9e9RbZdUCrvMA46zfm8,1916
|
|
58
58
|
odoo/addons/automation_oca/wizards/mail_compose_message.py,sha256=XL6UGz8_fEwniXM80DhQXink4SMnWg7HHR0kHLekMyc,612
|
|
59
|
-
odoo_addon_automation_oca-16.0.1.5.
|
|
60
|
-
odoo_addon_automation_oca-16.0.1.5.
|
|
61
|
-
odoo_addon_automation_oca-16.0.1.5.
|
|
62
|
-
odoo_addon_automation_oca-16.0.1.5.
|
|
59
|
+
odoo_addon_automation_oca-16.0.1.5.2.dist-info/METADATA,sha256=6vIaqr58IL3m2qkSUXytNI04Y1tdrzbT5EiBGCPFSok,7479
|
|
60
|
+
odoo_addon_automation_oca-16.0.1.5.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
61
|
+
odoo_addon_automation_oca-16.0.1.5.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
62
|
+
odoo_addon_automation_oca-16.0.1.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|