diff --git a/base_comment_template/README.rst b/base_comment_template/README.rst index 16a15ad58..cfb55db7c 100644 --- a/base_comment_template/README.rst +++ b/base_comment_template/README.rst @@ -13,14 +13,14 @@ Base Comments Templates .. |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%2Faccount--invoice--reporting-lightgray.png?logo=github - :target: https://github.com/OCA/account-invoice-reporting/tree/14.0/base_comment_template - :alt: OCA/account-invoice-reporting +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github + :target: https://github.com/OCA/reporting-engine/tree/14.0/base_comment_template + :alt: OCA/reporting-engine .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-invoice-reporting-12-0/account-invoice-reporting-12-0-base_comment_template + :target: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-base_comment_template :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/94/14.0 + :target: https://runbot.odoo-community.org/runbot/143/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -37,7 +37,7 @@ This module is the base module for following modules: * sale_comment_template * purchase_comment_template * invoice_comment_template - +* stock_picking_comment_template **Table of contents** @@ -47,10 +47,10 @@ This module is the base module for following modules: Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -70,7 +70,6 @@ Contributors * Yannick Vaucher * Guewen Baconnier * Simone Rubino -* Simone Rubino * `DynApps `_: * Raf Ven @@ -78,7 +77,7 @@ Contributors * `Druidoo `_: * Iván Todorovich - +* Pierre Verkest Maintainers ~~~~~~~~~~~ @@ -93,6 +92,6 @@ 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/account-invoice-reporting `_ project on GitHub. +This module is part of the `OCA/reporting-engine `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_comment_template/__manifest__.py b/base_comment_template/__manifest__.py index f5408320e..9a4af1bfc 100644 --- a/base_comment_template/__manifest__.py +++ b/base_comment_template/__manifest__.py @@ -6,7 +6,7 @@ "summary": "Comments templates on documents", "version": "14.0.1.0.0", "category": "Sale", - "website": "https://github.com/OCA/account-invoice-reporting", + "website": "https://github.com/OCA/reporting-engine", "author": "Camptocamp, Odoo Community Association (OCA)", "license": "AGPL-3", "installable": True, diff --git a/base_comment_template/i18n/base_comment_template.pot b/base_comment_template/i18n/base_comment_template.pot index 65b70a9b8..649f377da 100644 --- a/base_comment_template/i18n/base_comment_template.pot +++ b/base_comment_template/i18n/base_comment_template.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * base_comment_template +# * base_comment_template # msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgid "Active" msgstr "" #. module: base_comment_template -#: selection:base.comment.template,position:0 +#: model:ir.model.fields.selection,name:base_comment_template.selection__base_comment_template__position__after_lines msgid "After lines" msgstr "" @@ -29,7 +29,7 @@ msgid "Base comment template" msgstr "" #. module: base_comment_template -#: selection:base.comment.template,position:0 +#: model:ir.model.fields.selection,name:base_comment_template.selection__base_comment_template__position__before_lines msgid "Before lines" msgstr "" @@ -79,11 +79,13 @@ msgstr "" #. module: base_comment_template #: model:ir.model.fields,field_description:base_comment_template.field_base_comment_template__display_name +#: model:ir.model.fields,field_description:base_comment_template.field_res_partner__display_name msgid "Display Name" msgstr "" #. module: base_comment_template #: model:ir.model.fields,field_description:base_comment_template.field_base_comment_template__id +#: model:ir.model.fields,field_description:base_comment_template.field_res_partner__id msgid "ID" msgstr "" @@ -94,6 +96,7 @@ msgstr "" #. module: base_comment_template #: model:ir.model.fields,field_description:base_comment_template.field_base_comment_template____last_update +#: model:ir.model.fields,field_description:base_comment_template.field_res_partner____last_update msgid "Last Modified on" msgstr "" @@ -121,4 +124,3 @@ msgstr "" #: model:ir.model.fields,help:base_comment_template.field_base_comment_template__position msgid "Position on document" msgstr "" - diff --git a/base_comment_template/models/comment.py b/base_comment_template/models/comment.py index f139c60e6..a8b6c85b0 100644 --- a/base_comment_template/models/comment.py +++ b/base_comment_template/models/comment.py @@ -45,4 +45,4 @@ class BaseCommentTemplate(models.Model): lang = None if partner_id: lang = self.env["res.partner"].browse(partner_id).lang - return self.with_context({"lang": lang}).text + return self.with_context(lang=lang).text diff --git a/base_comment_template/readme/CONTRIBUTORS.rst b/base_comment_template/readme/CONTRIBUTORS.rst index 22be356ca..b53942768 100644 --- a/base_comment_template/readme/CONTRIBUTORS.rst +++ b/base_comment_template/readme/CONTRIBUTORS.rst @@ -3,7 +3,6 @@ * Yannick Vaucher * Guewen Baconnier * Simone Rubino -* Simone Rubino * `DynApps `_: * Raf Ven diff --git a/base_comment_template/readme/DESCRIPTION.rst b/base_comment_template/readme/DESCRIPTION.rst old mode 100755 new mode 100644 index 291a014cf..4b538a9f8 --- a/base_comment_template/readme/DESCRIPTION.rst +++ b/base_comment_template/readme/DESCRIPTION.rst @@ -10,3 +10,4 @@ This module is the base module for following modules: * sale_comment_template * purchase_comment_template * invoice_comment_template +* stock_picking_comment_template diff --git a/base_comment_template/static/description/index.html b/base_comment_template/static/description/index.html index bd1523680..354d7e202 100644 --- a/base_comment_template/static/description/index.html +++ b/base_comment_template/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-invoice-reporting Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runbot

Add a new model to define templates of comments to print on documents.

Two positions are available for the comments: @@ -378,6 +378,7 @@ documents.

  • sale_comment_template
  • purchase_comment_template
  • invoice_comment_template
  • +
  • stock_picking_comment_template
  • Table of contents

    @@ -393,10 +394,10 @@ documents.

    Bug Tracker

    -

    Bugs are tracked on GitHub Issues. +

    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.

    +feedback.

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

    @@ -415,7 +416,6 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Yannick Vaucher <yannick.vaucher@camptocamp.com>
  • Guewen Baconnier <guewen.baconnier@camptocamp.com>
  • Simone Rubino <simone.rubino@agilebg.com>
  • -
  • Simone Rubino <simone.rubino@agilebg.com>
  • DynApps: @@ -424,6 +424,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Iván Todorovich <ivan.todorovich@druidoo.io>
  • +
  • Pierre Verkest <pierreverkest84@gmail.com>
  • @@ -433,7 +434,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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/account-invoice-reporting project on GitHub.

    +

    This module is part of the OCA/reporting-engine project on GitHub.

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

    diff --git a/base_comment_template/tests/test_base_comment_template.py b/base_comment_template/tests/test_base_comment_template.py index 319fab336..a803974c1 100644 --- a/base_comment_template/tests/test_base_comment_template.py +++ b/base_comment_template/tests/test_base_comment_template.py @@ -9,7 +9,7 @@ class TestResPartner(TransactionCase): { "name": "Comment before lines", "position": "before_lines", - "text": "Text before lines", + "text": "

    Text before lines

    ", } ) @@ -20,3 +20,18 @@ class TestResPartner(TransactionCase): # Test childs propagation of commercial partner field for child_id in partner_id.child_ids: self.assertEqual(child_id.property_comment_template_id, self.template_id) + + def test_get_value_without_partner(self): + self.assertEqual(self.template_id.get_value(), "

    Text before lines

    ") + + def test_get_value_with_partner(self): + self.env["res.lang"]._activate_lang("fr_BE") + partner = self.env.ref("base.res_partner_12") + partner.write({"lang": "fr_BE"}) + self.template_id.with_context(lang="fr_BE").write( + {"text": "

    Testing translated fr_BE

    "} + ) + self.assertEqual( + self.template_id.get_value(partner_id=partner.id), + "

    Testing translated fr_BE

    ", + )