diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index f9ebade..022e993 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -28,7 +28,7 @@ class Project(models.Model): class InheritProjectProductEmployeeMap(models.Model): _inherit = 'project.sale.line.employee.map' - employee_price = fields.Float("Consultant Price") + employee_price = fields.Monetary(string="Consultant Price", related="employee_id.timesheet_cost", readonly=True) budgeted_qty = fields.Float(string='Budgeted Qty', related='sale_line_id.product_uom_qty', readonly=True) budgeted_uom = fields.Many2one('uom.uom', string='Budgeted UOM', related='sale_line_id.product_uom', readonly=True) timesheet_hour = fields.Float("Timesheet Hour", compute='_compute_timesheet_hour', default=0.0) diff --git a/cor_custom/wizard/__init__.py b/cor_custom/wizard/__init__.py old mode 100644 new mode 100755 diff --git a/cor_custom/wizard/project_create_sale_order.py b/cor_custom/wizard/project_create_sale_order.py old mode 100644 new mode 100755 diff --git a/cor_custom/wizard/project_create_sale_order_views.xml b/cor_custom/wizard/project_create_sale_order_views.xml old mode 100644 new mode 100755 diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst new file mode 100755 index 0000000..9adf930 --- /dev/null +++ b/mail_debrand/README.rst @@ -0,0 +1,103 @@ +============ +Mail Debrand +============ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |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%2Fsocial-lightgray.png?logo=github + :target: https://github.com/OCA/social/tree/13.0/mail_debrand + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_debrand + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/205/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module modifies the functionality of emails to remove the Odoo branding, +specifically the 'using Odoo' of notifications or the 'Powered by Odoo' + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Install it. +* Send an email. +* Nobody will know it comes from Odoo. + +Changelog +========= + +12.0.1.0.0 (2018-11-06) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [NEW] Initial V12 version. Complete rewrite from v11. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa +* Eficent +* Onestein + +Contributors +~~~~~~~~~~~~ + +* Pedro M. Baeza +* Lois Rilo +* Graeme Gellatly + +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. + +.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px + :target: https://github.com/pedrobaeza + :alt: pedrobaeza + +Current `maintainer `__: + +|maintainer-pedrobaeza| + +This module is part of the `OCA/social `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_debrand/__init__.py b/mail_debrand/__init__.py new file mode 100755 index 0000000..0650744 --- /dev/null +++ b/mail_debrand/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_debrand/__manifest__.py b/mail_debrand/__manifest__.py new file mode 100755 index 0000000..181256b --- /dev/null +++ b/mail_debrand/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2016 Tecnativa - Jairo Llopis +# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2019 Eficent Business and IT Consulting Services S.L. +# - Lois Rilo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Mail Debrand", + "summary": "Remove Odoo branding in sent emails", + "version": "13.0.2.0.1", + "category": "Social Network", + "website": "https://github.com/OCA/social/", + "author": "Tecnativa, Eficent, Onestein, Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "depends": ["mail"], + "development_status": "Production/Stable", + "maintainers": ["pedrobaeza"], +} diff --git a/mail_debrand/__pycache__/__init__.cpython-36.pyc b/mail_debrand/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..1025e52 Binary files /dev/null and b/mail_debrand/__pycache__/__init__.cpython-36.pyc differ diff --git a/mail_debrand/i18n/fr.po b/mail_debrand/i18n/fr.po new file mode 100755 index 0000000..7483801 --- /dev/null +++ b/mail_debrand/i18n/fr.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-08-12 17:59+0000\n" +"Last-Translator: Weblate Admin \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 3.10\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Modèles d'emails" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "Discussion par email" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "Odoo" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "Propulsé par" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "utilisant" diff --git a/mail_debrand/i18n/mail_debrand.pot b/mail_debrand/i18n/mail_debrand.pot new file mode 100755 index 0000000..7d25532 --- /dev/null +++ b/mail_debrand/i18n/mail_debrand.pot @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.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: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/nl.po b/mail_debrand/i18n/nl.po new file mode 100755 index 0000000..f300aac --- /dev/null +++ b/mail_debrand/i18n/nl.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-04-30 11:19+0000\n" +"Last-Translator: Raf Ven \n" +"Language-Team: none\n" +"Language: nl\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.10\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "Aangeboden door" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/pt.po b/mail_debrand/i18n/pt.po new file mode 100755 index 0000000..cfef66e --- /dev/null +++ b/mail_debrand/i18n/pt.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-02 17:13+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.10\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Modelos de Email" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "Thread do email" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/sl.po b/mail_debrand/i18n/sl.po new file mode 100755 index 0000000..0dc0471 --- /dev/null +++ b/mail_debrand/i18n/sl.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-19 10:13+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\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" +"X-Generator: Weblate 3.10\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Predloge e-pošte" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "E-poštna nit" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "Odoo" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "Powered by" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "z uporabo" diff --git a/mail_debrand/i18n/sr_Latn.po b/mail_debrand/i18n/sr_Latn.po new file mode 100755 index 0000000..4d97db0 --- /dev/null +++ b/mail_debrand/i18n/sr_Latn.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sr_Latn\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: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_thread +msgid "Email Thread" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "Powered by" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:0 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/models/__init__.py b/mail_debrand/models/__init__.py new file mode 100755 index 0000000..89e090b --- /dev/null +++ b/mail_debrand/models/__init__.py @@ -0,0 +1,2 @@ +from . import mail_template +from . import mail_thread diff --git a/mail_debrand/models/__pycache__/__init__.cpython-36.pyc b/mail_debrand/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..4eff49b Binary files /dev/null and b/mail_debrand/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/mail_debrand/models/__pycache__/mail_template.cpython-36.pyc b/mail_debrand/models/__pycache__/mail_template.cpython-36.pyc new file mode 100644 index 0000000..0522fe0 Binary files /dev/null and b/mail_debrand/models/__pycache__/mail_template.cpython-36.pyc differ diff --git a/mail_debrand/models/__pycache__/mail_thread.cpython-36.pyc b/mail_debrand/models/__pycache__/mail_thread.cpython-36.pyc new file mode 100644 index 0000000..cd0dd58 Binary files /dev/null and b/mail_debrand/models/__pycache__/mail_thread.cpython-36.pyc differ diff --git a/mail_debrand/models/mail_template.py b/mail_debrand/models/mail_template.py new file mode 100755 index 0000000..a846eca --- /dev/null +++ b/mail_debrand/models/mail_template.py @@ -0,0 +1,51 @@ +# Copyright 2019 O4SB - Graeme Gellatly +# Copyright 2019 Tecnativa - Ernesto Tejeda +# Copyright 2020 Onestein - Andrea Stirpe +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import re + +from lxml import html as htmltree + +from odoo import _, api, models + + +class MailTemplate(models.Model): + _inherit = "mail.template" + + @api.model + def _debrand_translated_words(self): + def _get_translated(word): + return self.env["ir.translation"]._get_source( + "ir.ui.view,arch_db", "model_terms", self.env.lang, word + ) + + odoo_word = _get_translated("Odoo") or _("Odoo") + powered_by = _get_translated("Powered by") or _("Powered by") + using_word = _get_translated("using") or _("using") + return odoo_word, powered_by, using_word + + @api.model + def _debrand_body(self, html): + odoo_word, powered_by, using_word = self._debrand_translated_words() + html = re.sub(using_word + "(.*)[\r\n]*(.*)>" + odoo_word + r"", "", html) + if powered_by not in html: + return html + root = htmltree.fromstring(html) + powered_by_elements = root.xpath("//*[text()[contains(.,'%s')]]" % powered_by) + for elem in powered_by_elements: + # make sure it isn't a spurious powered by + if any( + [ + "www.odoo.com" in child.get("href", "") + for child in elem.getchildren() + ] + ): + for child in elem.getchildren(): + elem.remove(child) + elem.text = None + return htmltree.tostring(root).decode("utf-8") + + @api.model + def render_post_process(self, html): + html = super().render_post_process(html) + return self._debrand_body(html) diff --git a/mail_debrand/models/mail_thread.py b/mail_debrand/models/mail_thread.py new file mode 100755 index 0000000..7fc6f0a --- /dev/null +++ b/mail_debrand/models/mail_thread.py @@ -0,0 +1,14 @@ +# Copyright 2019 Eficent Business and IT Consulting Services S.L. +# Lois Rilo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class MailThread(models.AbstractModel): + _inherit = "mail.thread" + + def _replace_local_links(self, html, base_url=None): + html = super()._replace_local_links(html, base_url=base_url) + html_debranded = self.env["mail.template"]._debrand_body(html) + return html_debranded diff --git a/mail_debrand/readme/CONTRIBUTORS.rst b/mail_debrand/readme/CONTRIBUTORS.rst new file mode 100755 index 0000000..b5f7ce7 --- /dev/null +++ b/mail_debrand/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Pedro M. Baeza +* Lois Rilo +* Graeme Gellatly diff --git a/mail_debrand/readme/DESCRIPTION.rst b/mail_debrand/readme/DESCRIPTION.rst new file mode 100755 index 0000000..51b2b49 --- /dev/null +++ b/mail_debrand/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module modifies the functionality of emails to remove the Odoo branding, +specifically the 'using Odoo' of notifications or the 'Powered by Odoo' diff --git a/mail_debrand/readme/HISTORY.rst b/mail_debrand/readme/HISTORY.rst new file mode 100755 index 0000000..ad209cc --- /dev/null +++ b/mail_debrand/readme/HISTORY.rst @@ -0,0 +1,4 @@ +12.0.1.0.0 (2018-11-06) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [NEW] Initial V12 version. Complete rewrite from v11. diff --git a/mail_debrand/readme/USAGE.rst b/mail_debrand/readme/USAGE.rst new file mode 100755 index 0000000..2a57dc0 --- /dev/null +++ b/mail_debrand/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module, you need to: + +* Install it. +* Send an email. +* Nobody will know it comes from Odoo. diff --git a/mail_debrand/static/description/icon.png b/mail_debrand/static/description/icon.png new file mode 100755 index 0000000..06a30af Binary files /dev/null and b/mail_debrand/static/description/icon.png differ diff --git a/mail_debrand/static/description/icon.svg b/mail_debrand/static/description/icon.svg new file mode 100755 index 0000000..6609694 --- /dev/null +++ b/mail_debrand/static/description/icon.svg @@ -0,0 +1,248 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mail_debrand/static/description/index.html b/mail_debrand/static/description/index.html new file mode 100755 index 0000000..6db863b --- /dev/null +++ b/mail_debrand/static/description/index.html @@ -0,0 +1,449 @@ + + + + + + +Mail Debrand + + + +
+

Mail Debrand

+ + +

Production/Stable License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

This module modifies the functionality of emails to remove the Odoo branding, +specifically the ‘using Odoo’ of notifications or the ‘Powered by Odoo’

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Install it.
  • +
  • Send an email.
  • +
  • Nobody will know it comes from Odoo.
  • +
+
+
+

Changelog

+
+

12.0.1.0.0 (2018-11-06)

+
    +
  • [NEW] Initial V12 version. Complete rewrite from v11.
  • +
+
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
  • Eficent
  • +
  • Onestein
  • +
+
+
+

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.

+

Current maintainer:

+

pedrobaeza

+

This module is part of the OCA/social project on GitHub.

+

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

+
+
+
+ + diff --git a/mail_debrand/tests/__init__.py b/mail_debrand/tests/__init__.py new file mode 100755 index 0000000..e7ef9cb --- /dev/null +++ b/mail_debrand/tests/__init__.py @@ -0,0 +1 @@ +from . import test_mail_debrand diff --git a/mail_debrand/tests/test_mail_debrand.py b/mail_debrand/tests/test_mail_debrand.py new file mode 100755 index 0000000..3067c5e --- /dev/null +++ b/mail_debrand/tests/test_mail_debrand.py @@ -0,0 +1,38 @@ +# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2020 Onestein - Andrea Stirpe +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common +from odoo.tools.misc import mute_logger + + +class TestMailDebrand(common.TransactionCase): + def setUp(self): + super().setUp() + self.default_arch = self.env.ref("mail.message_notification_email").arch + self.paynow_arch = self.env.ref("mail.mail_notification_paynow").arch + + def test_default_debrand(self): + self.assertIn("using", self.default_arch) + res = self.env["mail.template"]._debrand_body(self.default_arch) + self.assertNotIn("using", res) + + def test_paynow_debrand(self): + self.assertIn("Powered by", self.paynow_arch) + res = self.env["mail.template"]._debrand_body(self.paynow_arch) + self.assertNotIn("Powered by", res) + + def test_lang_paynow_debrand(self): + with mute_logger("odoo.addons.base.models.ir_translation"): + self.env["base.language.install"].create( + {"lang": "nl_NL", "overwrite": True} + ).lang_install() + with mute_logger("odoo.tools.translate"): + self.env["base.update.translations"].create({"lang": "nl_NL"}).act_update() + + ctx = dict(lang="nl_NL") + paynow_template = self.env.ref("mail.mail_notification_paynow") + paynow_arch = paynow_template.with_context(ctx).arch + self.assertIn("Aangeboden door", paynow_arch) + res = self.env["mail.template"].with_context(ctx)._debrand_body(paynow_arch) + self.assertNotIn("Aangeboden door", res) diff --git a/odoo-debrand/README.rst b/odoo-debrand/README.rst old mode 100644 new mode 100755 diff --git a/odoo-debrand/__init__.py b/odoo-debrand/__init__.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/__manifest__.py b/odoo-debrand/__manifest__.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/controllers/__init__.py b/odoo-debrand/controllers/__init__.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/controllers/controllers.py b/odoo-debrand/controllers/controllers.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/doc/RELEASE_NOTES.md b/odoo-debrand/doc/RELEASE_NOTES.md old mode 100644 new mode 100755 diff --git a/odoo-debrand/models/__init__.py b/odoo-debrand/models/__init__.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/models/models.py b/odoo-debrand/models/models.py old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/banner.gif b/odoo-debrand/static/description/banner.gif old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/banner_old.png b/odoo-debrand/static/description/banner_old.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/cybro_logo.png b/odoo-debrand/static/description/cybro_logo.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/icon.png b/odoo-debrand/static/description/icon.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/checked.png b/odoo-debrand/static/description/images/checked.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/cybrosys.png b/odoo-debrand/static/description/images/cybrosys.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-01.png b/odoo-debrand/static/description/images/debranding-01.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-02.png b/odoo-debrand/static/description/images/debranding-02.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-03.png b/odoo-debrand/static/description/images/debranding-03.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-04.png b/odoo-debrand/static/description/images/debranding-04.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-05.png b/odoo-debrand/static/description/images/debranding-05.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding-06.png b/odoo-debrand/static/description/images/debranding-06.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/debranding_1.gif b/odoo-debrand/static/description/images/debranding_1.gif old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/odoo debranding.png b/odoo-debrand/static/description/images/odoo debranding.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/odoo-debrand.png b/odoo-debrand/static/description/images/odoo-debrand.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/order_types_in_pos.png b/odoo-debrand/static/description/images/order_types_in_pos.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/pos_book_order.gif b/odoo-debrand/static/description/images/pos_book_order.gif old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/pos_combo_products.png b/odoo-debrand/static/description/images/pos_combo_products.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/pos_lot_expiry_warning.png b/odoo-debrand/static/description/images/pos_lot_expiry_warning.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/pos_product_addons.png b/odoo-debrand/static/description/images/pos_product_addons.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/pos_return.jpeg b/odoo-debrand/static/description/images/pos_return.jpeg old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/images/remove_orders.png b/odoo-debrand/static/description/images/remove_orders.png old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/description/index.html b/odoo-debrand/static/description/index.html old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/src/js/title.js b/odoo-debrand/static/src/js/title.js old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/src/xml/base.xml b/odoo-debrand/static/src/xml/base.xml old mode 100644 new mode 100755 diff --git a/odoo-debrand/static/src/xml/res_config_edition.xml b/odoo-debrand/static/src/xml/res_config_edition.xml old mode 100644 new mode 100755 diff --git a/odoo-debrand/views/database_manager_extend.html b/odoo-debrand/views/database_manager_extend.html old mode 100644 new mode 100755 diff --git a/odoo-debrand/views/ir_module_views.xml b/odoo-debrand/views/ir_module_views.xml old mode 100644 new mode 100755 diff --git a/odoo-debrand/views/res_config_views.xml b/odoo-debrand/views/res_config_views.xml old mode 100644 new mode 100755 diff --git a/odoo-debrand/views/views.xml b/odoo-debrand/views/views.xml old mode 100644 new mode 100755 diff --git a/project_maintenance/__pycache__/__init__.cpython-36.pyc b/project_maintenance/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..3e046b7 Binary files /dev/null and b/project_maintenance/__pycache__/__init__.cpython-36.pyc differ diff --git a/project_maintenance/models/__pycache__/__init__.cpython-36.pyc b/project_maintenance/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..0869ca3 Binary files /dev/null and b/project_maintenance/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/project_maintenance/models/__pycache__/maintenance.cpython-36.pyc b/project_maintenance/models/__pycache__/maintenance.cpython-36.pyc new file mode 100644 index 0000000..ab53358 Binary files /dev/null and b/project_maintenance/models/__pycache__/maintenance.cpython-36.pyc differ diff --git a/project_maintenance/models/__pycache__/project.cpython-36.pyc b/project_maintenance/models/__pycache__/project.cpython-36.pyc new file mode 100644 index 0000000..0f811bb Binary files /dev/null and b/project_maintenance/models/__pycache__/project.cpython-36.pyc differ diff --git a/project_maintenance/report/__pycache__/__init__.cpython-36.pyc b/project_maintenance/report/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..21cd559 Binary files /dev/null and b/project_maintenance/report/__pycache__/__init__.cpython-36.pyc differ diff --git a/project_maintenance/report/__pycache__/maintenance_report.cpython-36.pyc b/project_maintenance/report/__pycache__/maintenance_report.cpython-36.pyc new file mode 100644 index 0000000..356ee8c Binary files /dev/null and b/project_maintenance/report/__pycache__/maintenance_report.cpython-36.pyc differ diff --git a/project_report/wizard/project_create_expenses.py b/project_report/wizard/project_create_expenses.py old mode 100644 new mode 100755 diff --git a/project_report/wizard/project_create_expenses_views.xml b/project_report/wizard/project_create_expenses_views.xml old mode 100644 new mode 100755 diff --git a/sub_project/__pycache__/__init__.cpython-36.pyc b/sub_project/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..07b288b Binary files /dev/null and b/sub_project/__pycache__/__init__.cpython-36.pyc differ diff --git a/sub_project/models/__pycache__/__init__.cpython-36.pyc b/sub_project/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..db5f834 Binary files /dev/null and b/sub_project/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/sub_project/models/__pycache__/sub_project.cpython-36.pyc b/sub_project/models/__pycache__/sub_project.cpython-36.pyc new file mode 100644 index 0000000..04b8db2 Binary files /dev/null and b/sub_project/models/__pycache__/sub_project.cpython-36.pyc differ