diff --git a/README.md b/README.md index 46be9315457..a024631dba4 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,13 @@ addon | version | maintainers | summary --- | --- | --- | --- [base_exception](base_exception/) | 17.0.1.0.0 | [![hparfr](https://github.com/hparfr.png?size=30px)](https://github.com/hparfr) [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...) [base_technical_user](base_technical_user/) | 17.0.1.0.0 | | Add a technical user parameter on the company +[base_view_inheritance_extension](base_view_inheritance_extension/) | 17.0.1.0.0 | | Adds more operators for view inheritance [database_cleanup](database_cleanup/) | 17.0.1.0.0 | | Database cleanup [dbfilter_from_header](dbfilter_from_header/) | 17.0.1.0.0 | | Filter databases with HTTP headers [jsonifier](jsonifier/) | 17.0.1.0.0 | | JSON-ify data for all models [module_change_auto_install](module_change_auto_install/) | 17.0.1.0.0 | [![legalsylvain](https://github.com/legalsylvain.png?size=30px)](https://github.com/legalsylvain) | Customize auto installables modules by configuration [onchange_helper](onchange_helper/) | 17.0.1.0.0 | | Technical module that ease execution of onchange in Python code +[scheduler_error_mailer](scheduler_error_mailer/) | 17.0.1.0.0 | | Scheduler Error Mailer Unported addons diff --git a/base_view_inheritance_extension/README.rst b/base_view_inheritance_extension/README.rst new file mode 100644 index 00000000000..407bd79be73 --- /dev/null +++ b/base_view_inheritance_extension/README.rst @@ -0,0 +1,125 @@ +========================= +Extended view inheritance +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:cc3eeb2e6514c28a74085cfaf6c72c75677d641778f0fcf248155f48600ac86f + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png + :target: https://odoo-community.org/page/development-status + :alt: Mature +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/17.0/base_view_inheritance_extension + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_view_inheritance_extension + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module was written to make it simple to add custom operators for +view inheritance. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +**Change a python dictionary (context for example)** + +.. code:: xml + + + + { + "key": "value", + } + + + +Note that views are subject to evaluation of xmlids anyways, so if you +need to refer to some xmlid, say ``%(xmlid)s``. + +**Add text after and/or before than original** + +.. code:: xml + + + $text_before {old_value} $text_after + + +**Add domain with AND/OR join operator (AND if missed) allowing +conditional changes** + +.. code:: xml + + + $domain_to_add + + +Known issues / Roadmap +====================== + +- Support an ``eval`` attribute for our new node types. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Therp BV + +Contributors +------------ + +- Holger Brunn +- Ronald Portier +- `Tecnativa `__: + + - Sergio Teruel + - Carlos Dauden + +- Iván Todorovich + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/server-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_view_inheritance_extension/__init__.py b/base_view_inheritance_extension/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/base_view_inheritance_extension/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/base_view_inheritance_extension/__manifest__.py b/base_view_inheritance_extension/__manifest__.py new file mode 100644 index 00000000000..89b3e2ad61d --- /dev/null +++ b/base_view_inheritance_extension/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2016 Therp BV +# Copyright 2018 Tecnativa - Sergio Teruel +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). +{ + "name": "Extended view inheritance", + "version": "17.0.1.0.0", + "development_status": "Mature", + "author": "Therp BV,Odoo Community Association (OCA)", + "license": "LGPL-3", + "category": "Hidden/Dependency", + "summary": "Adds more operators for view inheritance", + "website": "https://github.com/OCA/server-tools", + "depends": ["base"], + "external_dependencies": {"python": ["astor"]}, + "demo": ["demo/ir_ui_view.xml"], +} diff --git a/base_view_inheritance_extension/demo/ir_ui_view.xml b/base_view_inheritance_extension/demo/ir_ui_view.xml new file mode 100644 index 00000000000..93562cc7a4f --- /dev/null +++ b/base_view_inheritance_extension/demo/ir_ui_view.xml @@ -0,0 +1,29 @@ + + + + res.partner + + + + Partner form + + + + { + "default_email": "info@odoo-community.org", + "default_company_id": allowed_company_ids[0] + } + + + + + parent_id + +
+ + + +
+
+
+
diff --git a/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot b/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot new file mode 100644 index 00000000000..e6ae0e2c8c9 --- /dev/null +++ b/base_view_inheritance_extension/i18n/base_view_inheritance_extension.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "" diff --git a/base_view_inheritance_extension/i18n/ca.po b/base_view_inheritance_extension/i18n/ca.po new file mode 100644 index 00000000000..ed7631af066 --- /dev/null +++ b/base_view_inheritance_extension/i18n/ca.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Marc Tormo i Bochaca , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-19 17:59+0000\n" +"PO-Revision-Date: 2017-04-19 17:59+0000\n" +"Last-Translator: Marc Tormo i Bochaca , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Empresa de " + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" + +#~ msgid "A new page" +#~ msgstr "Una nova pàgina " diff --git a/base_view_inheritance_extension/i18n/de.po b/base_view_inheritance_extension/i18n/de.po new file mode 100644 index 00000000000..fbe56c6ec8a --- /dev/null +++ b/base_view_inheritance_extension/i18n/de.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Niki Waibel , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" diff --git a/base_view_inheritance_extension/i18n/es.po b/base_view_inheritance_extension/i18n/es.po new file mode 100644 index 00000000000..63d575e51bc --- /dev/null +++ b/base_view_inheritance_extension/i18n/es.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Pedro M. Baeza , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2023-09-03 00:14+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Formulario de socio" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "Números de teléfono" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "Búsqueda inteligente" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "Vista" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" diff --git a/base_view_inheritance_extension/i18n/es_AR.po b/base_view_inheritance_extension/i18n/es_AR.po new file mode 100644 index 00000000000..f36856cd13d --- /dev/null +++ b/base_view_inheritance_extension/i18n/es_AR.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-06-09 16:09+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Contacto desde" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "Números de teléfono" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "Búsqueda Inteligente" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "Vista" diff --git a/base_view_inheritance_extension/i18n/hr.po b/base_view_inheritance_extension/i18n/hr.po new file mode 100644 index 00000000000..28c3eb1a7c0 --- /dev/null +++ b/base_view_inheritance_extension/i18n/hr.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-02 18:40+0000\n" +"PO-Revision-Date: 2023-01-04 03:00+0000\n" +"Last-Translator: Bole \n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Forma partnera" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "Brojevi telefona" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "Pogled" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" diff --git a/base_view_inheritance_extension/i18n/it.po b/base_view_inheritance_extension/i18n/it.po new file mode 100644 index 00000000000..07088e18596 --- /dev/null +++ b/base_view_inheritance_extension/i18n/it.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Paolo Valier , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-06 02:25+0000\n" +"PO-Revision-Date: 2023-09-21 16:40+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Form Partner" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "Numeri di telefono" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "Ricerca intelligente" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "Vista" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" diff --git a/base_view_inheritance_extension/i18n/sl.po b/base_view_inheritance_extension/i18n/sl.po new file mode 100644 index 00000000000..c97297cdb1f --- /dev/null +++ b/base_view_inheritance_extension/i18n/sl.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Matjaž Mozetič , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-29 03:39+0000\n" +"PO-Revision-Date: 2016-12-29 03:39+0000\n" +"Last-Translator: Matjaž Mozetič , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "Partnerjev obrazec" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "" + +#~ msgid "A new page" +#~ msgstr "Nova stran" diff --git a/base_view_inheritance_extension/i18n/tr.po b/base_view_inheritance_extension/i18n/tr.po new file mode 100644 index 00000000000..bd0e58da97f --- /dev/null +++ b/base_view_inheritance_extension/i18n/tr.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_view_inheritance_extension +# +# Translators: +# Ahmet Altinisik , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-29 03:39+0000\n" +"PO-Revision-Date: 2016-12-29 03:39+0000\n" +"Last-Translator: Ahmet Altinisik , 2016\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Partner form" +msgstr "İş ortağı formu" + +#. module: base_view_inheritance_extension +#: model_terms:ir.ui.view,arch_db:base_view_inheritance_extension.view_partner_simple_form +msgid "Phone numbers" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model.fields,field_description:base_view_inheritance_extension.field_ir_ui_view__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_view_inheritance_extension +#: model:ir.model,name:base_view_inheritance_extension.model_ir_ui_view +msgid "View" +msgstr "" + +#~ msgid "ir.ui.view" +#~ msgstr "ir.ui.view" + +#~ msgid "A new page" +#~ msgstr "Yeni bir sayfa" diff --git a/base_view_inheritance_extension/models/__init__.py b/base_view_inheritance_extension/models/__init__.py new file mode 100644 index 00000000000..81f52e3bfa6 --- /dev/null +++ b/base_view_inheritance_extension/models/__init__.py @@ -0,0 +1 @@ +from . import ir_ui_view diff --git a/base_view_inheritance_extension/models/ir_ui_view.py b/base_view_inheritance_extension/models/ir_ui_view.py new file mode 100644 index 00000000000..bd43e426e3c --- /dev/null +++ b/base_view_inheritance_extension/models/ir_ui_view.py @@ -0,0 +1,205 @@ +# Copyright 2016 Therp BV +# Copyright 2018 Tecnativa - Sergio Teruel +# Copyright 2021 Camptocamp SA (https://www.camptocamp.com). +# Copyright 2023 Tecnativa - Carlos Dauden +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +import ast +import re + +import astor +from lxml import etree + +from odoo import api, models +from odoo.osv import expression + + +def ast_dict_update(source, update): + """Perform a dict `update` on an ast.Dict + + Behaves similar to :meth:`dict.update`, but on ast.Dict instead. + Only compares string-like ast.Dict keys (ast.Str or ast.Constant). + + :returns: The updated ast.Dict + :rtype: ast.Dict + """ + if not isinstance(source, ast.Dict): + raise TypeError("`source` must be an AST dict") + if not isinstance(update, ast.Dict): + raise TypeError("`update` must be an AST dict") + + def ast_key_eq(k1, k2): + # python < 3.8 uses ast.Str; python >= 3.8 uses ast.Constant + if type(k1) != type(k2): + return False + elif isinstance(k1, ast.Str): + return k1.s == k2.s + elif isinstance(k1, ast.Constant): + return k1.value == k2.value + + toadd_uidx = [] + for uidx, ukey in enumerate(update.keys): + found = False + for sidx, skey in enumerate(source.keys): + if ast_key_eq(ukey, skey): + source.values[sidx] = update.values[uidx] + found = True + break + if not found: + toadd_uidx.append(uidx) + for uidx in toadd_uidx: + source.keys.append(update.keys[uidx]) + source.values.append(update.values[uidx]) + return source + + +class IrUiView(models.Model): + _inherit = "ir.ui.view" + + @api.model + def apply_inheritance_specs(self, source, specs_tree, pre_locate=lambda s: True): + for specs, handled_by in self._iter_inheritance_specs(specs_tree): + pre_locate(specs) + source = handled_by(source, specs) + return source + + @api.model + def _iter_inheritance_specs(self, spec): + if spec.tag == "data": + for child in spec: + for node, handler in self._iter_inheritance_specs(child): + yield node, handler + return + if spec.get("position") == "attributes": + if all(not c.get("operation") for c in spec): + yield spec, self._get_inheritance_handler(spec) + return + for child in spec: + node = etree.Element(spec.tag, **spec.attrib) + node.insert(0, child) + yield node, self._get_inheritance_handler_attributes(child) + return + yield spec, self._get_inheritance_handler(spec) + + @api.model + def _get_inheritance_handler(self, node): + handler = super().apply_inheritance_specs + if hasattr(self, "inheritance_handler_%s" % node.tag): + handler = getattr(self, "inheritance_handler_%s" % node.tag) + return handler + + @api.model + def _get_inheritance_handler_attributes(self, node): + handler = super().apply_inheritance_specs + if hasattr(self, "inheritance_handler_attributes_%s" % node.get("operation")): + handler = getattr( + self, "inheritance_handler_attributes_%s" % node.get("operation") + ) + return handler + + @api.model + def inheritance_handler_attributes_update(self, source, specs): + """Implement dict `update` operation on the attribute node. + + .. code-block:: xml + + + + { + "key": "value", + } + + + """ + node = self.locate_node(source, specs) + for spec in specs: + attr_name = spec.get("name") + # Parse ast from both node and spec + node_attr = (node.get(attr_name) or "{}").strip() + source_ast = ast.parse(node_attr, mode="eval").body + update_ast = ast.parse(spec.text.strip(), mode="eval").body + if not isinstance(source_ast, ast.Dict): + raise TypeError(f"Attribute `{attr_name}` is not a dict") + if not isinstance(update_ast, ast.Dict): + raise TypeError(f"Operation for attribute `{attr_name}` is not a dict") + # Update node ast dict + source_ast = ast_dict_update(source_ast, update_ast) + # Dump the ast back to source + # TODO: once odoo requires python >= 3.9; use `ast.unparse` instead + node.attrib[attr_name] = astor.to_source( + source_ast, + pretty_source=lambda s: "".join(s).strip(), + ) + return source + + @api.model + def inheritance_handler_attributes_text_add(self, source, specs): + """Implement + <$node position="attributes"> + + $text_before {old_value} $text_after + + """ + node = self.locate_node(source, specs) + for attribute_node in specs: + attribute_name = attribute_node.get("name") + old_value = node.get(attribute_name) or "" + node.attrib[attribute_name] = attribute_node.text.format( + old_value=old_value + ) + return source + + @api.model + def inheritance_handler_attributes_domain_add(self, source, specs): + """Implement + <$node position="attributes"> + + $domain_to_add + + """ + node = self.locate_node(source, specs) + for attribute_node in specs: + attribute_name = attribute_node.get("name") + condition = attribute_node.get("condition") + join_operator = attribute_node.get("join_operator") or "AND" + old_value = node.get(attribute_name) or "" + if old_value: + old_domain = ast.literal_eval( + self.var2str_domain_text(old_value.strip()) + ) + new_domain = ast.literal_eval( + self.var2str_domain_text(attribute_node.text.strip()) + ) + if join_operator == "OR": + new_value = str(expression.OR([old_domain, new_domain])) + else: + new_value = str(expression.AND([old_domain, new_domain])) + new_value = self.str2var_domain_text(new_value) + else: + # We must ensure that the domain definition has not line breaks because + # in update mode the domain cause an invalid syntax error + new_value = attribute_node.text.strip() + if condition: + new_value = f"{condition} and {new_value} or {old_value or []}" + node.attrib[attribute_name] = new_value + return source + + @api.model + def var2str_domain_text(self, domain_str): + """Replaces var names with str names to allow eval without defined vars""" + # Replace fields in 2 steps because 1 step returns "parent_sufix"."var_sufix" + regex_parent = re.compile(r"parent\.(\b\w+\b)") + domain_str = re.sub( + regex_parent, r"'parent.\1_is_a_var_to_replace'", domain_str + ) + regex = re.compile(r"(?\> +- Ronald Portier \<\> +- [Tecnativa](https://www.tecnativa.com): + - Sergio Teruel + - Carlos Dauden +- Iván Todorovich \<\> diff --git a/base_view_inheritance_extension/readme/DESCRIPTION.md b/base_view_inheritance_extension/readme/DESCRIPTION.md new file mode 100644 index 00000000000..4fc9dc0a49d --- /dev/null +++ b/base_view_inheritance_extension/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module was written to make it simple to add custom operators for +view inheritance. diff --git a/base_view_inheritance_extension/readme/ROADMAP.md b/base_view_inheritance_extension/readme/ROADMAP.md new file mode 100644 index 00000000000..f2dc1c6a7b3 --- /dev/null +++ b/base_view_inheritance_extension/readme/ROADMAP.md @@ -0,0 +1 @@ +- Support an `eval` attribute for our new node types. diff --git a/base_view_inheritance_extension/readme/USAGE.md b/base_view_inheritance_extension/readme/USAGE.md new file mode 100644 index 00000000000..e4bda1aa927 --- /dev/null +++ b/base_view_inheritance_extension/readme/USAGE.md @@ -0,0 +1,32 @@ +**Change a python dictionary (context for example)** + +``` xml + + + { + "key": "value", + } + + +``` + +Note that views are subject to evaluation of xmlids anyways, so if you +need to refer to some xmlid, say `%(xmlid)s`. + +**Add text after and/or before than original** + +``` xml + + $text_before {old_value} $text_after + +``` + +**Add domain with AND/OR join operator (AND if missed) allowing +conditional changes** + +``` xml + + $domain_to_add + +``` diff --git a/base_view_inheritance_extension/static/description/icon.png b/base_view_inheritance_extension/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/base_view_inheritance_extension/static/description/icon.png differ diff --git a/base_view_inheritance_extension/static/description/index.html b/base_view_inheritance_extension/static/description/index.html new file mode 100644 index 00000000000..0e985b5f083 --- /dev/null +++ b/base_view_inheritance_extension/static/description/index.html @@ -0,0 +1,465 @@ + + + + + +Extended view inheritance + + + +
+

Extended view inheritance

+ + +

Mature License: LGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

This module was written to make it simple to add custom operators for +view inheritance.

+

Table of contents

+ +
+

Usage

+

Change a python dictionary (context for example)

+
+<field position="attributes">
+    <attribute name="context" operation="update">
+        {
+            "key": "value",
+        }
+    </attribute>
+</field>
+
+

Note that views are subject to evaluation of xmlids anyways, so if you +need to refer to some xmlid, say %(xmlid)s.

+

Add text after and/or before than original

+
+<attribute name="$attribute" operation="text_add">
+    $text_before {old_value} $text_after
+</attribute>
+
+

Add domain with AND/OR join operator (AND if missed) allowing +conditional changes

+
+<attribute name="$attribute" operation="domain_add"
+           condition="$field_condition" join_operator="OR">
+    $domain_to_add
+</attribute>
+
+
+
+

Known issues / Roadmap

+
    +
  • Support an eval attribute for our new node types.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/server-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/base_view_inheritance_extension/tests/__init__.py b/base_view_inheritance_extension/tests/__init__.py new file mode 100644 index 00000000000..261fddfad36 --- /dev/null +++ b/base_view_inheritance_extension/tests/__init__.py @@ -0,0 +1 @@ +from . import test_base_view_inheritance_extension diff --git a/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py b/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py new file mode 100644 index 00000000000..baf7497607f --- /dev/null +++ b/base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py @@ -0,0 +1,242 @@ +# Copyright 2016 Therp BV +# Copyright 2021 Camptocamp SA (https://www.camptocamp.com). +# @author Iván Todorovich +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from lxml import etree + +from odoo.tests.common import TransactionCase + + +class TestBaseViewInheritanceExtension(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.maxDiff = None + + def test_base_view_inheritance_extension(self): + view_id = self.env.ref("base.view_partner_simple_form").id + arch, view = self.env["res.partner"]._get_view(view_id=view_id) + # Verify normal attributes work + self.assertEqual(arch.xpath("//form")[0].get("string"), "Partner form") + # Verify our extra context key worked + self.assertTrue( + "'default_email': 'info@odoo-community.org'" + in arch.xpath('//field[@name="parent_id"]')[0].get("context") + ) + self.assertTrue( + "'default_company_id': allowed_company_ids[0]" + in arch.xpath('//field[@name="parent_id"]')[0].get("context") + ) + + def test_update_context_default(self): + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + {"default_company_id": company_id} + + + """ + ) + res = self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + self.assertEqual( + res.xpath('//field[@name="account_move_id"]')[0].attrib["context"], + "{'default_journal_id': journal_id, 'default_company_id': company_id}", + ) + + def test_update_context_complex(self): + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + { + "default_product_id": product_id, + "default_cost_center_id": ( + context.get("handle_mrp_cost") and cost_center_id or False + ), + } + + + """ + ) + res = self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + expected_items = [ + "'default_type': context.get('default_type')", + "'journal_id': journal_id", + "'default_partner_id': commercial_partner_id", + ( + "'default_currency_id': " + "currency_id != company_currency_id and currency_id or False" + ), + "'default_name': 'The company name'", + "'default_product_id': product_id", + ( + "'default_cost_center_id': " + "context.get('handle_mrp_cost') and cost_center_id or False" + ), + ] + self.assertEqual( + res.xpath('//field[@name="invoice_line_ids"]')[0].attrib["context"], + "{%s}" % ", ".join(expected_items), + ) + + def test_update_attrs_new_key(self): + """Test that we can add new keys to an existing dict""" + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + { + "required": [("state", "!=", "draft")], + } + + + """ + ) + res = self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + self.assertEqual( + res.xpath('//field[@name="ref"]')[0].attrib["attrs"], + "{'invisible': [('state', '=', 'draft')], " + "'required': [('state', '!=', 'draft')]}", + ) + + def test_update_attrs_replace(self): + """Test that we can replace an existing dict key""" + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + { + "required": [('state', '!=', 'draft')], + } + + + """ + ) + res = self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + self.assertEqual( + res.xpath('//field[@name="ref"]')[0].attrib["attrs"], + "{'invisible': [('state', '=', 'draft')], " + "'required': [('state', '!=', 'draft')]}", + ) + + def test_update_empty_source_dict(self): + """Test that we can add new keys by creating the dict if it's missing""" + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + { + "required": [('state', '!=', 'draft')], + } + + + """ + ) + res = self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + self.assertEqual( + res.xpath('//field[@name="ref"]')[0].attrib["attrs"], + "{'required': [('state', '!=', 'draft')]}", + ) + + def test_update_operation_not_a_dict(self): + """We should get an error if we try to update a dict with a non-dict spec""" + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + ["not", "a", "dict"] + + + """ + ) + with self.assertRaisesRegex( + TypeError, "Operation for attribute `attrs` is not a dict" + ): + self.env["ir.ui.view"].apply_inheritance_specs(source, specs) + + def test_update_source_not_a_dict(self): + """We should get an error if we try to update a non-dict attribute""" + source = etree.fromstring( + """ +
+ + + """ + ) + specs = etree.fromstring( + """ + + + { + "required": [('state', '!=', 'draft')], + } + + + """ + ) + with self.assertRaisesRegex(TypeError, "Attribute `domain` is not a dict"): + self.env["ir.ui.view"].apply_inheritance_specs(source, specs) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000000..f0e2006cc32 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +astor diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst new file mode 100644 index 00000000000..1db6b4bf814 --- /dev/null +++ b/scheduler_error_mailer/README.rst @@ -0,0 +1,99 @@ +====================== +Scheduler Error Mailer +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f13d86592670711096f7ef648335a713566dde20d34a0de5a2be7855b46624ef + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/17.0/scheduler_error_mailer + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-scheduler_error_mailer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the possibility to send an e-mail when a scheduler +raises an error. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to: + +1. Go to Settings -> Technical -> Automation -> Scheduled Actions +2. Choose the scheduled Actions you want to send the error email and + select the E-mail Template in the Error E-mail Template field. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Akretion +* Sodexis + +Contributors +------------ + +- Sébastien BEAU +- David Beal +- Alexis de Lattre +- Sodexis +- Achraf Mhadhbi +- `Tecnativa `__: + + - Cristina Martin R. + - Víctor Martínez + +- `Komit `__: + + - Cuong NGUYEN MINH TRAN MANH + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/server-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py new file mode 100644 index 00000000000..e309f38992e --- /dev/null +++ b/scheduler_error_mailer/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models +from .hooks import post_init_hook diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py new file mode 100644 index 00000000000..d1309fc0902 --- /dev/null +++ b/scheduler_error_mailer/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# Copyright 2016 Sodexis +# Copyright 2018 bloopark systems () +# Copyright 2019 Tecnativa - Cristina Martin R. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Scheduler Error Mailer", + "version": "17.0.1.0.0", + "category": "Extra Tools", + "license": "AGPL-3", + "author": "Akretion,Sodexis,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/server-tools", + "depends": ["mail"], + "data": ["data/ir_cron_email_tpl.xml", "views/ir_cron.xml"], + "demo": ["demo/ir_cron_demo.xml"], + "images": ["images/scheduler_error_mailer.jpg"], + "installable": True, + "post_init_hook": "post_init_hook", +} diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml new file mode 100644 index 00000000000..53f8efd0999 --- /dev/null +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -0,0 +1,44 @@ + + + + + Scheduler Error + {{object.user_id.email or ''}} + {{object.user_id.email or ''}} + [DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED + + + + + +

Odoo tried to run the scheduler in the database but it failed. Here is the error message :

+ + + + + +

You may check the logs of the Odoo server to get more information about this failure.

+ +

Properties of the scheduler :

+
    +
  • Model :
  • +
  • Python code :
  • +
  • Interval :
  • +
  • Number of calls :
  • +
  • Repeat missed :
  • +
  • User :
  • +
+ +

+--
+Automatic e-mail sent by Odoo. Do not reply.
+Database : +

+ + ]]> +
+
+
diff --git a/scheduler_error_mailer/demo/ir_cron_demo.xml b/scheduler_error_mailer/demo/ir_cron_demo.xml new file mode 100644 index 00000000000..cb850e0369b --- /dev/null +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -0,0 +1,27 @@ + + + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + + code + model._test_scheduler_failure() + + + diff --git a/scheduler_error_mailer/hooks.py b/scheduler_error_mailer/hooks.py new file mode 100644 index 00000000000..92b911be031 --- /dev/null +++ b/scheduler_error_mailer/hooks.py @@ -0,0 +1,14 @@ +# Copyright 2023 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import SUPERUSER_ID, api + + +def post_init_hook(env): + env = api.Environment(env.cr, SUPERUSER_ID, {}) + env["ir.cron"].with_context(active_test=False).search([]).write( + { + "email_template_id": env.ref( + "scheduler_error_mailer.scheduler_error_mailer" + ).id + } + ) diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po new file mode 100644 index 00000000000..ff350513278 --- /dev/null +++ b/scheduler_error_mailer/i18n/de.po @@ -0,0 +1,116 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-08 03:37+0000\n" +"PO-Revision-Date: 2017-02-08 03:37+0000\n" +"Last-Translator: Niki Waibel , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Fehler e-Mail Vorlage" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Wähle die e-Mail Vorlage welche bei einem Fehler dieses Schedulers gesendet " +"wird." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Task Fehler von UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FEHLER" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Fehler e-Mail Vorlage" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po new file mode 100644 index 00000000000..ee6d297b73b --- /dev/null +++ b/scheduler_error_mailer/i18n/es.po @@ -0,0 +1,152 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2017 +# Fernando Lara , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-22 00:55+0000\n" +"PO-Revision-Date: 2023-09-03 00:15+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo intentó ejecutar el programador en la base de datos pero " +"falló. Aquí está el mensaje de error:

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

Puedes consultar los registros del servidor Odoo para obtener más " +"información sobre este fallo.

\n" +"\n" +"

Propiedades del planificador ::\n" +"

    \n" +"
  • Modelo:
  • \n" +"
  • Código Python:
  • \n" +"
  • Intervalo:
  • \n" +"
  • Número de llamadas:
  • \n" +"
  • Repetición perdida:
  • \n" +"
  • Usuario:
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Correo electrónico automático enviado por Odoo. No respondas.
\n" +"Base de datos: \n" +"

\n" +"
\n" +" \n" +" " + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Plantilla de correo electrónico de error" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Acciones programadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "Error de programación" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Seleccione la plantilla de correo electrónico que se enviará cuando falla " +"este planificador." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "Búsqueda inteligente" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Error de Tarea con UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Programador de pruebas Error Mailer" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "[DB {{ctx.get('dbname')}}] Programador '{{object.name or ''}}' FALLÓ" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Plantilla de correo electrónico de error" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/es_AR.po b/scheduler_error_mailer/i18n/es_AR.po new file mode 100644 index 00000000000..d872f3485a5 --- /dev/null +++ b/scheduler_error_mailer/i18n/es_AR.po @@ -0,0 +1,222 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-06-09 16:09+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo trató de ejecutar el planificador en la base de datos pero " +"falló. Acá está el mensaje de error :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

Puede consultar los registros del servidor Odoo para obtener más " +"información sobre esta falla.

\n" +"\n" +"

Propiedad del planificador :\n" +"

    \n" +"
  • Modelo :
  • \n" +"
  • Código Python :
  • \n" +"
  • Intervalo :
  • \n" +"
  • Número de ejecuciones :
  • \n" +"
  • Repetir perdidos :
  • \n" +"
  • Usuario :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Email enviado automáticamente por Odoo. No responder.
\n" +"Base de datos : \n" +"

\n" +"
\n" +" \n" +" " + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Plantilla de correo electrónico del error" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Acciones Automatizadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "Error del Planificador" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Seleccione la plantilla de correo electrónico que se enviará cuando falla " +"este planificador." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "Búsqueda Inteligente" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Error de Tarea con UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Probar el Mail de Errores del Planificador" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" +"[DB {{ctx.get('dbname')}}] Planificador '{{object.name or ''}}' FALLIDO" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') or 'Failed to get the error message from the " +#~ "context.'}\n" +#~ "\n" +#~ "\n" +#~ "

You may check the logs of the Odoo server to get more information " +#~ "about this failure.

\n" +#~ "\n" +#~ "

Properties of the scheduler ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Model : ${object.model_id.name or ''}
  • \n" +#~ "
  • Python code : ${object.code or ''}
  • \n" +#~ "
  • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
  • \n" +#~ "
  • Number of calls : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repeat missed : ${object.doall}
  • \n" +#~ "
  • User : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
\n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tried to run the scheduler ${object.name or ''} en la " +#~ "base de datos ${ctx.get('dbname')} pero falló. Acá está el " +#~ "mensaje de error:

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') or 'No se pudo obtener el mensaje de error del " +#~ "contexto.'}\n" +#~ "\n" +#~ "\n" +#~ "

Puede revisar los registros del servidor de Odoo para obtener más " +#~ "información acerca de este fallo.

\n" +#~ "\n" +#~ "

Propiedades del planificador ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Modelo : ${object.model_id.name or ''}
  • \n" +#~ "
  • Código de Python : ${object.code or ''}
  • \n" +#~ "
  • Intervalo : ${object.interval_number or '0'} ${object.interval_type " +#~ "or ''}
  • \n" +#~ "
  • Número de llamados : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repetir perdidos : ${object.doall}
  • \n" +#~ "
  • Usuario : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Email enviado automáticamente por Odoo. No responder.
\n" +#~ "Base de datos : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] Planificador '${object.name or ''}' FALLÓ" diff --git a/scheduler_error_mailer/i18n/fr.po b/scheduler_error_mailer/i18n/fr.po new file mode 100644 index 00000000000..acb08b28ede --- /dev/null +++ b/scheduler_error_mailer/i18n/fr.po @@ -0,0 +1,187 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-20 11:12+0000\n" +"Last-Translator: Yann Papouin \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Modèle d’e-mail d’erreur" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Actions planifiées" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Sélectionnez le modèle d’e-mail qui sera envoyé en cas d’échec de ce " +"planificateur." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Échec de la tâche avec UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Test du mailer d’erreur du planificateur" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "" +#~ "[DB ${ctx.get('dbname')}] Planificateur '${object.name or ''}' ECHEC" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed " +#~ "to get the error message from the context.'}\n" +#~ "\n" +#~ "\n" +#~ "

You may check the logs of the Odoo server to get more information " +#~ "about this failure.

\n" +#~ "\n" +#~ "

Properties of the scheduler ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Model : ${object.model or ''}
  • \n" +#~ "
  • Method : ${object.function or ''}
  • \n" +#~ "
  • Arguments : ${object.args or ''}
  • \n" +#~ "
  • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
  • \n" +#~ "
  • Number of calls : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repeat missed : ${object.doall}
  • \n" +#~ "
  • User : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
\n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo a essayé d’exécuter le planificateur ${object.name ou ''} dans la base de données ${ctx.get('dbname')} mais cela a " +#~ "échoué. Voici le message d’erreur :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') et ctx.get('job_exception').value ou " +#~ "'Impossible d’obtenir le message d’erreur du contexte.'}\n" +#~ "\n" +#~ "\n" +#~ "

Vous pouvez consulter les journaux du serveur Odoo pour obtenir plus " +#~ "d’informations sur cette défaillance.

\n" +#~ "\n" +#~ "

Propriétés du planificateur ${object.name ou ''} :

\n" +#~ "
    \n" +#~ "
  • Modèle : ${object.model ou ''}
  • \n" +#~ "
  • Méthode : ${object.function ou ''}
  • \n" +#~ "
  • Arguments : ${object.args ou ''}
  • \n" +#~ "
  • Intervalle : ${object.interval_number ou '0'} ${object.interval_type " +#~ "ou ''}
  • \n" +#~ "
  • Nombre d’appels : ${object.numbercall ou '0'}
  • \n" +#~ "
  • Recommencer les manqués : ${object.doall}
  • \n" +#~ "
  • Utilisateur : ${object.user_id.name ou ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "E-mail automatique envoyé par Odoo. Ne pas répondre.
\n" +#~ "Base de données : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po new file mode 100644 index 00000000000..a94e5feb273 --- /dev/null +++ b/scheduler_error_mailer/i18n/hr.po @@ -0,0 +1,108 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-02 18:41+0000\n" +"PO-Revision-Date: 2018-03-02 18:41+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po new file mode 100644 index 00000000000..46fdfeb25ff --- /dev/null +++ b/scheduler_error_mailer/i18n/pt.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-14 12:44+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.7.1\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Modelo do E-mail de Erro" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Ações Agendadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Selecione o modelo de email que será enviado quando este agendador falhar." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Falha na tarefa com UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Testar o Envio de E-mails de Erro do Agendador" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po new file mode 100644 index 00000000000..086ddad7bad --- /dev/null +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -0,0 +1,193 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-06 02:49+0000\n" +"PO-Revision-Date: 2019-09-03 01:23+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.8\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Modelo de Erro de E-mail" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Ações Agendadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Selecione o modelo de email que será enviado quando o agendador falhar." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Tarefa falhou com UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Teste Agendado de Erro do Remetente" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] Agendador '${object.name or ''}' FALHOU" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed " +#~ "to get the error message from the context.'}\n" +#~ "\n" +#~ "\n" +#~ "

You may check the logs of the Odoo server to get more information " +#~ "about this failure.

\n" +#~ "\n" +#~ "

Properties of the scheduler ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Model : ${object.model or ''}
  • \n" +#~ "
  • Method : ${object.function or ''}
  • \n" +#~ "
  • Arguments : ${object.args or ''}
  • \n" +#~ "
  • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
  • \n" +#~ "
  • Number of calls : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repeat missed : ${object.doall}
  • \n" +#~ "
  • User : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
\n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tentou executar o agendador${object.name ou ''}no banco " +#~ "de dados${ctx.get ('dbname')}, mas falhou. Aqui está a mensagem " +#~ "de erro:

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get ('job_exception') e ctx.get ('job_exception'). value ou 'Falha " +#~ "ao obter a mensagem de erro do contexto.'}\n" +#~ "\n" +#~ "\n" +#~ "

Você pode verificar os logs do servidor Odoo para obter mais " +#~ "informações sobre esta falha.

\n" +#~ "\n" +#~ "

Propriedades do planejador${object.name ou''}:

\n" +#~ "
    \n" +#~ "
  • Modelo: ${object.model ou ''}
  • \n" +#~ "
  • Método: ${object.function ou ''}
  • \n" +#~ "
  • Argumentos: ${object.args ou ''}
  • \n" +#~ "
  • Intervalo: ${object.interval_number ou '0'} ${object.interval_type " +#~ "ou ''}
  • \n" +#~ "
  • Número de chamadas: ${object.numbercall ou '0'}
  • \n" +#~ "
  • Repetição perdida: ${object.doall}
  • \n" +#~ "
  • Usuário: ${object.user_id.name ou ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Email automático enviado pelo Odoo. Não responda.
\n" +#~ "Banco de Dados: ${ctx.get ('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Modelo de Erro de E-mail" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot new file mode 100644 index 00000000000..065678977ae --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler in the database but it failed. Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about this failure.

\n" +"\n" +"

Properties of the scheduler :

\n" +"
    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +msgid "Test Scheduler Error Mailer" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po new file mode 100644 index 00000000000..96c574d66ab --- /dev/null +++ b/scheduler_error_mailer/i18n/sl.po @@ -0,0 +1,113 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-06 02:49+0000\n" +"PO-Revision-Date: 2016-08-06 02:49+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Predloga obvestila o napaki" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "Izberite predlogo za razpošiljanje ob napakah razporejevalca." + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Napaka pri opravilu UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "" +#~ "[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Predloga obvestila o napaki" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po new file mode 100644 index 00000000000..33dc588e034 --- /dev/null +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -0,0 +1,190 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Jeffery Chenn , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-31 11:58+0000\n" +"PO-Revision-Date: 2019-08-31 06:18+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo tried to run the scheduler " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

You may check the logs of the Odoo server to get more information about " +"this failure.

\n" +"\n" +"

Properties of the scheduler :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "错误E-mail 模板" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "安排的动作" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "选择此调度程序失败时将发送的电子邮件模板。" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search +msgid "Smart Search" +msgstr "" + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "任务失败 UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "测试调度程序错误邮件程序" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" +msgstr "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] 调度'${object.name or ''}' 失败" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed " +#~ "to get the error message from the context.'}\n" +#~ "\n" +#~ "\n" +#~ "

You may check the logs of the Odoo server to get more information " +#~ "about this failure.

\n" +#~ "\n" +#~ "

Properties of the scheduler ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Model : ${object.model or ''}
  • \n" +#~ "
  • Method : ${object.function or ''}
  • \n" +#~ "
  • Arguments : ${object.args or ''}
  • \n" +#~ "
  • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
  • \n" +#~ "
  • Number of calls : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repeat missed : ${object.doall}
  • \n" +#~ "
  • User : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
\n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ " \n" +#~ "
\n" +#~ "\n" +#~ "

Odoo试图运行调度程序 ${object.name or ''} 在数据库中 " +#~ "${ctx.get('dbname')} 但它失败了。这是错误消息 :

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or '无法从上" +#~ "下文中获取错误消息.'}\n" +#~ "\n" +#~ "\n" +#~ "

您可以检查Odoo服务器的日志以获取有关此故障的更多信息.

\n" +#~ "\n" +#~ "

调度程序的属性 ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • 模型: ${object.model or ''}
  • \n" +#~ "
  • 方法 : ${object.function or ''}
  • \n" +#~ "
  • 参数: ${object.args or ''}
  • \n" +#~ "
  • 间隔: ${object.interval_number or '0'} ${object.interval_type or ''}\n" +#~ "
  • 通话次数: ${object.numbercall or '0'}
  • \n" +#~ "
  • 重复错过了: ${object.doall}
  • \n" +#~ "
  • 用户: ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Odoo发送的自动电子邮件。请勿回复。
\n" +#~ "数据库: ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "错误E-mail 模板" diff --git a/scheduler_error_mailer/images/scheduler_error_mailer.jpg b/scheduler_error_mailer/images/scheduler_error_mailer.jpg new file mode 100644 index 00000000000..a8a3af766a5 Binary files /dev/null and b/scheduler_error_mailer/images/scheduler_error_mailer.jpg differ diff --git a/scheduler_error_mailer/models/__init__.py b/scheduler_error_mailer/models/__init__.py new file mode 100644 index 00000000000..b365c0e973b --- /dev/null +++ b/scheduler_error_mailer/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ir_cron diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py new file mode 100644 index 00000000000..7bb8f6c70bd --- /dev/null +++ b/scheduler_error_mailer/models/ir_cron.py @@ -0,0 +1,52 @@ +# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# Copyright 2016 Sodexis +# Copyright 2018 bloopark systems () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class IrCron(models.Model): + _inherit = "ir.cron" + + email_template_id = fields.Many2one( + comodel_name="mail.template", + domain=[("model_id.model", "=", "ir.cron")], + string="Error E-mail Template", + help="Select the email template that will be sent when " + "this scheduler fails.", + default=lambda self: self.env.ref( + "scheduler_error_mailer.scheduler_error_mailer", False + ), + ) + + @api.model + def _handle_callback_exception( + self, cron_name, server_action_id, job_id, job_exception + ): + res = super()._handle_callback_exception( + cron_name, server_action_id, job_id, job_exception + ) + my_cron = self.browse(job_id) + + if my_cron.email_template_id: + # we put the job_exception in context to be able to print it inside + # the email template + context = {"job_exception": str(job_exception), "dbname": self._cr.dbname} + + _logger.debug("Sending scheduler error email with context=%s", context) + + template = my_cron.email_template_id.with_context(**context).sudo() + template.send_mail(my_cron.id, force_send=True) + + return res + + @api.model + def _test_scheduler_failure(self): + """This function is used to test and debug this module.""" + raise UserError(_("Task failure with UID = %d.") % self._uid) diff --git a/scheduler_error_mailer/pyproject.toml b/scheduler_error_mailer/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/scheduler_error_mailer/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/scheduler_error_mailer/readme/CONFIGURE.md b/scheduler_error_mailer/readme/CONFIGURE.md new file mode 100644 index 00000000000..292ab0e0604 --- /dev/null +++ b/scheduler_error_mailer/readme/CONFIGURE.md @@ -0,0 +1,5 @@ +To configure this module, you need to: + +1. Go to Settings -\> Technical -\> Automation -\> Scheduled Actions +2. Choose the scheduled Actions you want to send the error email and + select the E-mail Template in the Error E-mail Template field. diff --git a/scheduler_error_mailer/readme/CONTRIBUTORS.md b/scheduler_error_mailer/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..e252e92acbd --- /dev/null +++ b/scheduler_error_mailer/readme/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +- Sébastien BEAU \<\> +- David Beal \<\> +- Alexis de Lattre \<\> +- Sodexis \<\> +- Achraf Mhadhbi \<\> +- [Tecnativa](https://www.tecnativa.com): + - Cristina Martin R. + - Víctor Martínez +- [Komit](https://komit-consulting.com): + - Cuong NGUYEN MINH TRAN MANH diff --git a/scheduler_error_mailer/readme/DESCRIPTION.md b/scheduler_error_mailer/readme/DESCRIPTION.md new file mode 100644 index 00000000000..b47434046ba --- /dev/null +++ b/scheduler_error_mailer/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds the possibility to send an e-mail when a scheduler +raises an error. diff --git a/scheduler_error_mailer/static/description/icon.png b/scheduler_error_mailer/static/description/icon.png new file mode 100644 index 00000000000..6b22abf9732 Binary files /dev/null and b/scheduler_error_mailer/static/description/icon.png differ diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html new file mode 100644 index 00000000000..56d78ac465a --- /dev/null +++ b/scheduler_error_mailer/static/description/index.html @@ -0,0 +1,445 @@ + + + + + +Scheduler Error Mailer + + + +
+

Scheduler Error Mailer

+ + +

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

This module adds the possibility to send an e-mail when a scheduler +raises an error.

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Settings -> Technical -> Automation -> Scheduled Actions
  2. +
  3. Choose the scheduled Actions you want to send the error email and +select the E-mail Template in the Error E-mail Template field.
  4. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
  • Sodexis
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/server-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/scheduler_error_mailer/tests/__init__.py b/scheduler_error_mailer/tests/__init__.py new file mode 100644 index 00000000000..6bd49cac1b7 --- /dev/null +++ b/scheduler_error_mailer/tests/__init__.py @@ -0,0 +1 @@ +from . import test_scheduler_error_mailer diff --git a/scheduler_error_mailer/tests/test_scheduler_error_mailer.py b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py new file mode 100644 index 00000000000..f01d2eeb622 --- /dev/null +++ b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py @@ -0,0 +1,31 @@ +# Copyright 2023 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from unittest.mock import patch + +from odoo.tests.common import TransactionCase + +from odoo.addons.scheduler_error_mailer.hooks import post_init_hook + + +class TestSchedulerErrorMailer(TransactionCase): + def setUp(self): + super().setUp() + self.cron = self.env.ref("scheduler_error_mailer.test_scheduler_error_mailer") + + def test_error_cron(self): + with self.assertLogs( + "odoo.addons.scheduler_error_mailer.models.ir_cron", "DEBUG" + ), patch.object(self.env.cr, "rollback"): + self.env["ir.cron"]._handle_callback_exception( + self.cron.name, + self.cron.ir_actions_server_id.id, + self.cron.id, + Exception("hello world"), + ) + + def test_init_hook(self): + post_init_hook(self.env) + self.assertFalse( + self.env["ir.cron"].search([("email_template_id", "=", False)]) + ) diff --git a/scheduler_error_mailer/views/ir_cron.xml b/scheduler_error_mailer/views/ir_cron.xml new file mode 100644 index 00000000000..d22099c7427 --- /dev/null +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -0,0 +1,20 @@ + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + + diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 19a615d8d35..679155a9949 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,14 +1,16 @@ [project] name = "odoo-addons-oca-server-tools" -version = "17.0.20240202.2" +version = "17.0.20240202.4" dependencies = [ "odoo-addon-base_exception>=17.0dev,<17.1dev", "odoo-addon-base_technical_user>=17.0dev,<17.1dev", + "odoo-addon-base_view_inheritance_extension>=17.0dev,<17.1dev", "odoo-addon-database_cleanup>=17.0dev,<17.1dev", "odoo-addon-dbfilter_from_header>=17.0dev,<17.1dev", "odoo-addon-jsonifier>=17.0dev,<17.1dev", "odoo-addon-module_change_auto_install>=17.0dev,<17.1dev", "odoo-addon-onchange_helper>=17.0dev,<17.1dev", + "odoo-addon-scheduler_error_mailer>=17.0dev,<17.1dev", ] classifiers=[ "Programming Language :: Python",