odoo-addon-automation-oca 16.0.1.6.1.2__py3-none-any.whl → 16.0.1.6.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.
@@ -11,7 +11,7 @@ Automation Oca
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:69fb14c7a439c6751286889ba6e2066f2c21764271364f9acfecf97673196f7f
14
+ !! source digest: sha256:d3e48c044c0a3af52cc44e77484a375b51c98c04feefdaa9717f64fd8beeb128
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -5,7 +5,7 @@
5
5
  "name": "Automation Oca",
6
6
  "summary": """
7
7
  Automate actions in threaded models""",
8
- "version": "16.0.1.6.1",
8
+ "version": "16.0.1.6.2",
9
9
  "license": "AGPL-3",
10
10
  "category": "Automation",
11
11
  "author": "Dixmit,Odoo Community Association (OCA)",
@@ -1226,6 +1226,11 @@ msgstr ""
1226
1226
  msgid "Responsible"
1227
1227
  msgstr ""
1228
1228
 
1229
+ #. module: automation_oca
1230
+ #: model_terms:ir.ui.view,arch_db:automation_oca.automation_record_form_view
1231
+ msgid "Retry"
1232
+ msgstr ""
1233
+
1229
1234
  #. module: automation_oca
1230
1235
  #: model_terms:ir.ui.view,arch_db:automation_oca.automation_configuration_search_view
1231
1236
  #: model_terms:ir.ui.view,arch_db:automation_oca.automation_record_form_view
@@ -1536,6 +1541,15 @@ msgstr ""
1536
1541
  msgid "Welcome! Thanks for being part of our database"
1537
1542
  msgstr ""
1538
1543
 
1544
+ #. module: automation_oca
1545
+ #. odoo-python
1546
+ #: code:addons/automation_oca/models/automation_record_step.py:0
1547
+ #, python-format
1548
+ msgid ""
1549
+ "You can only retry a record step in a rejected, expired, cancelled or error "
1550
+ "state."
1551
+ msgstr ""
1552
+
1539
1553
  #. module: automation_oca
1540
1554
  #: model:ir.model,name:automation_oca.model_automation_configuration_export
1541
1555
  msgid "automation.configuration.export"
@@ -479,3 +479,16 @@ class AutomationRecordStep(models.Model):
479
479
  },
480
480
  ]
481
481
  return []
482
+
483
+ def retry(self):
484
+ """
485
+ Retry the record step
486
+ """
487
+ if self.state not in ["error", "rejected", "expired", "cancel"]:
488
+ raise ValidationError(
489
+ _(
490
+ "You can only retry a record step in a rejected, "
491
+ "expired, cancelled or error state."
492
+ )
493
+ )
494
+ self.write({"state": "scheduled", "processed_on": False})
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:69fb14c7a439c6751286889ba6e2066f2c21764271364f9acfecf97673196f7f
375
+ !! source digest: sha256:d3e48c044c0a3af52cc44e77484a375b51c98c04feefdaa9717f64fd8beeb128
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <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/license-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&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
378
  <p>This module allows to automate several process according to some rules.</p>
@@ -221,6 +221,38 @@ class TestAutomationBase(AutomationTestCase):
221
221
  self.env["automation.record.step"]._cron_automation_steps()
222
222
  self.assertEqual("cancel", record_activity.state)
223
223
 
224
+ def test_retry_exception(self):
225
+ """
226
+ Testing that cancelled actions are not executed
227
+ """
228
+ activity = self.create_server_action()
229
+ self.configuration.editable_domain = "[('id', '=', %s)]" % self.partner_01.id
230
+ self.configuration.start_automation()
231
+ self.env["automation.configuration"].cron_automation()
232
+ record_activity = self.env["automation.record.step"].search(
233
+ [("configuration_step_id", "=", activity.id)]
234
+ )
235
+ self.assertEqual("scheduled", record_activity.state)
236
+ with self.assertRaises(ValidationError):
237
+ record_activity.retry()
238
+
239
+ def test_retry(self):
240
+ """
241
+ Testing that cancelled actions are not executed
242
+ """
243
+ activity = self.create_server_action()
244
+ self.configuration.editable_domain = "[('id', '=', %s)]" % self.partner_01.id
245
+ self.configuration.start_automation()
246
+ self.env["automation.configuration"].cron_automation()
247
+ record_activity = self.env["automation.record.step"].search(
248
+ [("configuration_step_id", "=", activity.id)]
249
+ )
250
+ self.assertEqual("scheduled", record_activity.state)
251
+ record_activity.cancel()
252
+ self.assertEqual("cancel", record_activity.state)
253
+ record_activity.retry()
254
+ self.assertEqual("scheduled", record_activity.state)
255
+
224
256
  def test_counter(self):
225
257
  """
226
258
  Check the counter function
@@ -177,6 +177,13 @@
177
177
  title="Cancel"
178
178
  t-if="record.state.raw_value == 'scheduled'"
179
179
  />
180
+ <button
181
+ type="object"
182
+ name="retry"
183
+ class="fa fa-refresh btn-warning o_automation_kanban_header_icon"
184
+ title="Retry"
185
+ t-if="['cancel', 'rejected', 'error', 'expired'].includes(record.state.raw_value)"
186
+ />
180
187
  </div>
181
188
  </div>
182
189
  <div
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-automation_oca
3
- Version: 16.0.1.6.1.2
3
+ Version: 16.0.1.6.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)
@@ -26,7 +26,7 @@ Automation Oca
26
26
  !! This file is generated by oca-gen-addon-readme !!
27
27
  !! changes will be overwritten. !!
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
- !! source digest: sha256:69fb14c7a439c6751286889ba6e2066f2c21764271364f9acfecf97673196f7f
29
+ !! source digest: sha256:d3e48c044c0a3af52cc44e77484a375b51c98c04feefdaa9717f64fd8beeb128
30
30
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
31
 
32
32
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,11 +1,11 @@
1
- odoo/addons/automation_oca/README.rst,sha256=aCKaIl6kWojRjt2fcMVM86l8w7xPbLBsxuGoKgxWVlo,7127
1
+ odoo/addons/automation_oca/README.rst,sha256=HPHTxzdoorQTERdvEWZMPtY-Qn26Xzme2MQox0GMmqM,7127
2
2
  odoo/addons/automation_oca/__init__.py,sha256=dnUeA_K1torbiMNF3tt2dtECdk-FkWm01DByr9MBMIA,69
3
- odoo/addons/automation_oca/__manifest__.py,sha256=4gpDuSCvSkF3qRqJIGr5aTQB_lzrh8gjeOHYsXqF8d8,1236
3
+ odoo/addons/automation_oca/__manifest__.py,sha256=9N0t3Zc2hTMGi-VD8N6PVkukCHHsyhQ1ZI8YMN7QiqE,1236
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
7
7
  odoo/addons/automation_oca/demo/demo.xml,sha256=beyrfyRzVTDZ1Mm2sL5Y57W4GDsUvj9gOMUlrEMM1M8,2838
8
- odoo/addons/automation_oca/i18n/automation_oca.pot,sha256=FvAXMZTnBHqErIoIIDTSgdThCESTQOsoxraQvZqy_Xk,57414
8
+ odoo/addons/automation_oca/i18n/automation_oca.pot,sha256=xOGY58gYw89KLTGkNAT8hWtvML3YYOmSr5d1FRWM_uU,57773
9
9
  odoo/addons/automation_oca/i18n/es.po,sha256=T94_s7EcYzJrtyZQCrnjZ7aKR7OUZZN5S-ttTaWP1uw,64379
10
10
  odoo/addons/automation_oca/i18n/fr.po,sha256=3Q6Y0XmfSmp9zwI67mQt4T4fa2Cu3S6yEAm6kK0jY3o,61005
11
11
  odoo/addons/automation_oca/i18n/it.po,sha256=HeduPOBZ12PPdEbTcoxiA6ZbY2EvZweECHL5rRs8wU8,64987
@@ -14,7 +14,7 @@ odoo/addons/automation_oca/models/automation_configuration.py,sha256=QzJUurcZapv
14
14
  odoo/addons/automation_oca/models/automation_configuration_step.py,sha256=71PuB9UKaIhW0MAolXCsxJeDu57Q26IXccUKjws2j_k,27109
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=nJjuwO1QcsbZ12z8RvKxB92qRip2OUp8exNdXb-X24c,18202
17
+ odoo/addons/automation_oca/models/automation_record_step.py,sha256=161aBF_gsl9YKDftfK5kX4ewsGkalV9AaiovzgxpyYw,18631
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=D5l4CeIM_IvZ_a5g3iMC8qiD1u1iUIYRmGvDRRSHv9o,855
@@ -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=itvIT6s2HKAtfKe0DPGpQAH27iXn7ybVo8kURWiKseE,18438
32
+ odoo/addons/automation_oca/static/description/index.html,sha256=Iy27DNC4HDEzIYzzVoVfNfdm_0DDp70JDhdnlfKLd14,18438
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
@@ -44,14 +44,14 @@ odoo/addons/automation_oca/tests/__init__.py,sha256=oE9pIZZoR1gK1wqlhTipczhOYzqm
44
44
  odoo/addons/automation_oca/tests/common.py,sha256=Zu5AcWGMgoDKdsQ4VMyhHTnot1f7Hunh4tDH9CSHbXw,3558
45
45
  odoo/addons/automation_oca/tests/test_automation_action.py,sha256=GT7Kja9l1Z-9MzWhKPuDc1a5-IkdHNgABtNVX50Sr24,8994
46
46
  odoo/addons/automation_oca/tests/test_automation_activity.py,sha256=K3wMhr-Mb0FvNu0HfNdAZT4Z1m3J4EdQGbyxPEc-7Xw,16938
47
- odoo/addons/automation_oca/tests/test_automation_base.py,sha256=xb1qTY_iN0JbC7Revn-thamJn8cjXxDrSHOxpZl9VGE,29752
47
+ odoo/addons/automation_oca/tests/test_automation_base.py,sha256=cwF7_a02-Xf_v-cIRWBeUWP7rP_cMeJ2RClTT2F3YFk,31125
48
48
  odoo/addons/automation_oca/tests/test_automation_import.py,sha256=4TBu3AJBLEScq2Kw8M2ZDfEv4ODCUmlnzZmbjc4BL2w,4740
49
49
  odoo/addons/automation_oca/tests/test_automation_mail.py,sha256=zOzRfhH0-Zz0Jm1TX15efgXibjj7Au19597DZWvAQGc,24704
50
50
  odoo/addons/automation_oca/tests/test_automation_security.py,sha256=iazrh9TJDCLaK1vXKXMNqBf0bizedBd3QxUwCodjesY,3883
51
51
  odoo/addons/automation_oca/views/automation_configuration.xml,sha256=tGzQ3Z3iqMU3yegw8R7kgGDVIafYFYjKhLRUrn_qmhU,27164
52
52
  odoo/addons/automation_oca/views/automation_configuration_step.xml,sha256=QMGqUKULEINQjLCHc7-DT1OXau0HqHy0Q8ESCasdeII,11988
53
53
  odoo/addons/automation_oca/views/automation_filter.xml,sha256=Mx0SBoVk2U3QY-hseKymbOphlK-hOjHdFzLtPgU2jok,2271
54
- odoo/addons/automation_oca/views/automation_record.xml,sha256=ebHj_9Ioks9xWykw8QtPVZ8jgfDMQXVntQoKhhtoibk,16047
54
+ odoo/addons/automation_oca/views/automation_record.xml,sha256=1fHxCIl4aotsaElQGKTPpkU-Q5qIzY32d4tcZiDECDw,16604
55
55
  odoo/addons/automation_oca/views/automation_record_step.xml,sha256=cBao3BLIo9Db_Mv4VpyugpnTfzMmjLXQ5Eu2aYwD9uE,5263
56
56
  odoo/addons/automation_oca/views/automation_tag.xml,sha256=Cm-L0rtrgxxtDt5_MRRFLgz3QQzaOjoxFq4ivLejs6M,1358
57
57
  odoo/addons/automation_oca/views/link_tracker_clicks.xml,sha256=uSYTtxlNBBHvFEi2XAA3JW4x7fPSqoxdgPeRkkEIO1s,1668
@@ -62,7 +62,7 @@ odoo/addons/automation_oca/wizards/automation_configuration_export.xml,sha256=Fu
62
62
  odoo/addons/automation_oca/wizards/automation_configuration_test.py,sha256=YK0HD6Ds6B4PMaI97MUpVQaB-wsVTmw6Hpbh532tU-g,1363
63
63
  odoo/addons/automation_oca/wizards/automation_configuration_test.xml,sha256=r9lUzD3SeFSLStlc07iXxO1b9e9RbZdUCrvMA46zfm8,1916
64
64
  odoo/addons/automation_oca/wizards/mail_compose_message.py,sha256=XL6UGz8_fEwniXM80DhQXink4SMnWg7HHR0kHLekMyc,612
65
- odoo_addon_automation_oca-16.0.1.6.1.2.dist-info/METADATA,sha256=Q9aG5g8AqIGz_U0sprwXerDRCszby9jgGquC2aCvhNU,7646
66
- odoo_addon_automation_oca-16.0.1.6.1.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
67
- odoo_addon_automation_oca-16.0.1.6.1.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
68
- odoo_addon_automation_oca-16.0.1.6.1.2.dist-info/RECORD,,
65
+ odoo_addon_automation_oca-16.0.1.6.2.dist-info/METADATA,sha256=GanbBsi9jv-tqbcPpMff7DzBcMvyak2eoBni_i1zFQs,7644
66
+ odoo_addon_automation_oca-16.0.1.6.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
67
+ odoo_addon_automation_oca-16.0.1.6.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
68
+ odoo_addon_automation_oca-16.0.1.6.2.dist-info/RECORD,,