odoo-addon-automation-oca 16.0.1.0.0.10__py3-none-any.whl → 16.0.1.1.0__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/demo/demo.xml +3 -1
- odoo/addons/automation_oca/i18n/automation_oca.pot +25 -2
- odoo/addons/automation_oca/models/automation_configuration.py +42 -4
- odoo/addons/automation_oca/static/description/index.html +8 -5
- {odoo_addon_automation_oca-16.0.1.0.0.10.dist-info → odoo_addon_automation_oca-16.0.1.1.0.dist-info}/METADATA +2 -2
- {odoo_addon_automation_oca-16.0.1.0.0.10.dist-info → odoo_addon_automation_oca-16.0.1.1.0.dist-info}/RECORD +10 -10
- {odoo_addon_automation_oca-16.0.1.0.0.10.dist-info → odoo_addon_automation_oca-16.0.1.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_automation_oca-16.0.1.0.0.10.dist-info → odoo_addon_automation_oca-16.0.1.1.0.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:93005cb66ccbe8be7829365fbd1d3ccb74bf7ccd1e7cd51f6e342410dd4f4cf1
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -36,7 +36,9 @@ for record in records.filtered(lambda r: not r.is_blacklisted):
|
|
|
36
36
|
eval="[(4, ref('demo_tag_process')), (4, ref('demo_tag_demo'))]"
|
|
37
37
|
/>
|
|
38
38
|
<field name="field_id" ref="base.field_res_partner__email" />
|
|
39
|
-
<field
|
|
39
|
+
<field
|
|
40
|
+
name="editable_domain"
|
|
41
|
+
>[ ("email", "!=", False), ("create_date", "<=", datetime.datetime.now())]</field>
|
|
40
42
|
</record>
|
|
41
43
|
<record id="demo_configuration_welcome_send" model="automation.configuration.step">
|
|
42
44
|
<field name="name">Send email</field>
|
|
@@ -13,6 +13,19 @@ msgstr ""
|
|
|
13
13
|
"Content-Transfer-Encoding: \n"
|
|
14
14
|
"Plural-Forms: \n"
|
|
15
15
|
|
|
16
|
+
#. module: automation_oca
|
|
17
|
+
#: model:ir.model.fields,help:automation_oca.field_automation_configuration__domain
|
|
18
|
+
msgid ""
|
|
19
|
+
"\n"
|
|
20
|
+
" Filter to apply\n"
|
|
21
|
+
" Following special variable can be used in filter :\n"
|
|
22
|
+
" * datetime\n"
|
|
23
|
+
" * dateutil\n"
|
|
24
|
+
" * time\n"
|
|
25
|
+
" * user\n"
|
|
26
|
+
" * ref "
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
16
29
|
#. module: automation_oca
|
|
17
30
|
#. odoo-python
|
|
18
31
|
#: code:addons/automation_oca/models/automation_configuration_step.py:0
|
|
@@ -526,12 +539,22 @@ msgid "Filter Domain"
|
|
|
526
539
|
msgstr ""
|
|
527
540
|
|
|
528
541
|
#. module: automation_oca
|
|
529
|
-
#: model:ir.model.fields,help:automation_oca.field_automation_configuration__domain
|
|
530
|
-
#: model:ir.model.fields,help:automation_oca.field_automation_configuration__editable_domain
|
|
531
542
|
#: model:ir.model.fields,help:automation_oca.field_automation_filter__domain
|
|
532
543
|
msgid "Filter to apply"
|
|
533
544
|
msgstr ""
|
|
534
545
|
|
|
546
|
+
#. module: automation_oca
|
|
547
|
+
#: model:ir.model.fields,help:automation_oca.field_automation_configuration__editable_domain
|
|
548
|
+
msgid ""
|
|
549
|
+
"Filter to apply\n"
|
|
550
|
+
" Following special variable can be used in filter :\n"
|
|
551
|
+
" * datetime\n"
|
|
552
|
+
" * dateutil\n"
|
|
553
|
+
" * time\n"
|
|
554
|
+
" * user\n"
|
|
555
|
+
" * ref "
|
|
556
|
+
msgstr ""
|
|
557
|
+
|
|
535
558
|
#. module: automation_oca
|
|
536
559
|
#: model:ir.model.fields,help:automation_oca.field_automation_configuration_step__domain
|
|
537
560
|
msgid "Filter to apply specifically"
|
|
@@ -5,7 +5,12 @@ from collections import defaultdict
|
|
|
5
5
|
|
|
6
6
|
from odoo import _, api, fields, models
|
|
7
7
|
from odoo.exceptions import ValidationError
|
|
8
|
-
from odoo.tools.safe_eval import
|
|
8
|
+
from odoo.tools.safe_eval import (
|
|
9
|
+
datetime as safe_datetime,
|
|
10
|
+
dateutil as safe_dateutil,
|
|
11
|
+
safe_eval,
|
|
12
|
+
time as safe_time,
|
|
13
|
+
)
|
|
9
14
|
|
|
10
15
|
|
|
11
16
|
class AutomationConfiguration(models.Model):
|
|
@@ -19,9 +24,29 @@ class AutomationConfiguration(models.Model):
|
|
|
19
24
|
tag_ids = fields.Many2many("automation.tag")
|
|
20
25
|
company_id = fields.Many2one("res.company")
|
|
21
26
|
domain = fields.Char(
|
|
22
|
-
required=True,
|
|
27
|
+
required=True,
|
|
28
|
+
default="[]",
|
|
29
|
+
compute="_compute_domain",
|
|
30
|
+
help="""
|
|
31
|
+
Filter to apply
|
|
32
|
+
Following special variable can be used in filter :
|
|
33
|
+
* datetime
|
|
34
|
+
* dateutil
|
|
35
|
+
* time
|
|
36
|
+
* user
|
|
37
|
+
* ref """,
|
|
38
|
+
)
|
|
39
|
+
editable_domain = fields.Char(
|
|
40
|
+
required=True,
|
|
41
|
+
default="[]",
|
|
42
|
+
help="""Filter to apply
|
|
43
|
+
Following special variable can be used in filter :
|
|
44
|
+
* datetime
|
|
45
|
+
* dateutil
|
|
46
|
+
* time
|
|
47
|
+
* user
|
|
48
|
+
* ref """,
|
|
23
49
|
)
|
|
24
|
-
editable_domain = fields.Char(required=True, default="[]", help="Filter to apply")
|
|
25
50
|
model_id = fields.Many2one(
|
|
26
51
|
"ir.model",
|
|
27
52
|
domain=[("is_mail_thread", "=", True)],
|
|
@@ -184,6 +209,18 @@ class AutomationConfiguration(models.Model):
|
|
|
184
209
|
for record in self.search([("state", "=", "periodic")]):
|
|
185
210
|
record.run_automation()
|
|
186
211
|
|
|
212
|
+
def _get_eval_context(self):
|
|
213
|
+
"""Prepare the context used when evaluating python code
|
|
214
|
+
:returns: dict -- evaluation context given to safe_eval
|
|
215
|
+
"""
|
|
216
|
+
return {
|
|
217
|
+
"ref": self.env.ref,
|
|
218
|
+
"user": self.env.user,
|
|
219
|
+
"time": safe_time,
|
|
220
|
+
"datetime": safe_datetime,
|
|
221
|
+
"dateutil": safe_dateutil,
|
|
222
|
+
}
|
|
223
|
+
|
|
187
224
|
def _get_automation_records_to_create(self):
|
|
188
225
|
"""
|
|
189
226
|
We will find all the records that fulfill the domain but don't have a record created.
|
|
@@ -191,7 +228,8 @@ class AutomationConfiguration(models.Model):
|
|
|
191
228
|
|
|
192
229
|
In order to do this, we will add some extra joins on the query of the domain
|
|
193
230
|
"""
|
|
194
|
-
|
|
231
|
+
eval_context = self._get_eval_context()
|
|
232
|
+
domain = safe_eval(self.domain, eval_context)
|
|
195
233
|
Record = self.env[self.model_id.model]
|
|
196
234
|
if self.company_id and "company_id" in Record._fields:
|
|
197
235
|
# In case of company defined, we add only if the records have company field
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
:Author: David Goodger (goodger@python.org)
|
|
11
|
-
:Id: $Id: html4css1.css
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
13
|
|
|
14
14
|
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
15
16
|
|
|
16
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
17
18
|
customize this style sheet.
|
|
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
|
274
275
|
margin-left: 2em ;
|
|
275
276
|
margin-right: 2em }
|
|
276
277
|
|
|
277
|
-
pre.code .ln { color:
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
278
279
|
pre.code, code { background-color: #eeeeee }
|
|
279
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
|
280
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
@@ -300,7 +301,7 @@ span.option {
|
|
|
300
301
|
span.pre {
|
|
301
302
|
white-space: pre }
|
|
302
303
|
|
|
303
|
-
span.problematic {
|
|
304
|
+
span.problematic, pre.problematic {
|
|
304
305
|
color: red }
|
|
305
306
|
|
|
306
307
|
span.section-subtitle {
|
|
@@ -366,7 +367,7 @@ ul.auto-toc {
|
|
|
366
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
368
|
!! changes will be overwritten. !!
|
|
368
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:93005cb66ccbe8be7829365fbd1d3ccb74bf7ccd1e7cd51f6e342410dd4f4cf1
|
|
370
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
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>
|
|
372
373
|
<p>This module allows to automate several process according to some rules.</p>
|
|
@@ -515,7 +516,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
515
516
|
<div class="section" id="maintainers">
|
|
516
517
|
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
|
|
517
518
|
<p>This module is maintained by the OCA.</p>
|
|
518
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
|
519
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
520
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
521
|
+
</a>
|
|
519
522
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
520
523
|
mission is to support the collaborative development of Odoo features and
|
|
521
524
|
promote its widespread use.</p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-automation_oca
|
|
3
|
-
Version: 16.0.1.
|
|
3
|
+
Version: 16.0.1.1.0
|
|
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:93005cb66ccbe8be7829365fbd1d3ccb74bf7ccd1e7cd51f6e342410dd4f4cf1
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
27
|
|
|
28
28
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
odoo/addons/automation_oca/README.rst,sha256=
|
|
1
|
+
odoo/addons/automation_oca/README.rst,sha256=CDklCSmhrhBLSvOt7aEGc3OxpOoCWDBrFE1JHDzx_xk,6847
|
|
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=qixAVbFuZj8IdnQbkCnRuKy2Azo1PI8vjmAk-EKugrw,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
|
|
7
|
-
odoo/addons/automation_oca/demo/demo.xml,sha256=
|
|
8
|
-
odoo/addons/automation_oca/i18n/automation_oca.pot,sha256=
|
|
7
|
+
odoo/addons/automation_oca/demo/demo.xml,sha256=beyrfyRzVTDZ1Mm2sL5Y57W4GDsUvj9gOMUlrEMM1M8,2838
|
|
8
|
+
odoo/addons/automation_oca/i18n/automation_oca.pot,sha256=G0iWZHFL9Li145ptixggWaD51JIliePQozLosFD49Ak,49784
|
|
9
9
|
odoo/addons/automation_oca/i18n/es.po,sha256=ITYPPlKx04bdZhV1JxWUnDZczRfFt4F1oyQTvvpnmMc,54977
|
|
10
10
|
odoo/addons/automation_oca/i18n/fr.po,sha256=2GTkV0pr2J0ux6eQz8SRjrES3Wu-OSvSjiIQt-Kr1DU,52798
|
|
11
11
|
odoo/addons/automation_oca/i18n/it.po,sha256=2E5aeB73AqBIOhZEH1icC5R94GXmYq_emNSnVddRoCY,54675
|
|
12
12
|
odoo/addons/automation_oca/models/__init__.py,sha256=gRWvgicyFDELSeVnpRow1mGuWjfm3ima2Lo-NqlymKg,318
|
|
13
|
-
odoo/addons/automation_oca/models/automation_configuration.py,sha256=
|
|
13
|
+
odoo/addons/automation_oca/models/automation_configuration.py,sha256=VaWXg_6EnUnTdLDV_eZnWKXXVU27nGmZR_lnGIeKstA,12086
|
|
14
14
|
odoo/addons/automation_oca/models/automation_configuration_step.py,sha256=lb94_rlFgp8OV-N3MmG6xkSGdc8Rc9mdl-fMVFRIE7M,19197
|
|
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=3EGcSvtULRtkdRN48PoT3QgQN7TMUrjdeZz4pbdi3g0,6619
|
|
@@ -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=FQYpv38rGV328V2-6fn8s3oCPVUyNKGuOPxmEYhTBe8,18045
|
|
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
|
|
@@ -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.
|
|
60
|
-
odoo_addon_automation_oca-16.0.1.
|
|
61
|
-
odoo_addon_automation_oca-16.0.1.
|
|
62
|
-
odoo_addon_automation_oca-16.0.1.
|
|
59
|
+
odoo_addon_automation_oca-16.0.1.1.0.dist-info/METADATA,sha256=f-xdUXTC3b4avJTUlqxmfkACEB3q0Jrwzfa751ajl-Y,7365
|
|
60
|
+
odoo_addon_automation_oca-16.0.1.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
61
|
+
odoo_addon_automation_oca-16.0.1.1.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
62
|
+
odoo_addon_automation_oca-16.0.1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|