From 30e0a295e4a3ed33eecdc09be30934c341e667c3 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Fri, 15 Nov 2019 13:08:54 +0100 Subject: [PATCH 01/43] [12.0][IMP] - manage different report layouts by brand --- brand_external_report_layout/README.rst | 89 ++++ brand_external_report_layout/__init__.py | 1 + brand_external_report_layout/__manifest__.py | 16 + .../models/__init__.py | 1 + .../models/res_brand.py | 64 +++ .../readme/CONTRIBUTORS.rst | 1 + .../readme/CREDITS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + brand_external_report_layout/readme/USAGE.rst | 6 + .../static/description/index.html | 438 ++++++++++++++++++ .../static/img/res_brand_logo.png | Bin 0 -> 15310 bytes .../views/report_template.xml | 24 + .../views/res_brand.xml | 54 +++ 13 files changed, 697 insertions(+) create mode 100644 brand_external_report_layout/README.rst create mode 100644 brand_external_report_layout/__init__.py create mode 100644 brand_external_report_layout/__manifest__.py create mode 100644 brand_external_report_layout/models/__init__.py create mode 100644 brand_external_report_layout/models/res_brand.py create mode 100644 brand_external_report_layout/readme/CONTRIBUTORS.rst create mode 100644 brand_external_report_layout/readme/CREDITS.rst create mode 100644 brand_external_report_layout/readme/DESCRIPTION.rst create mode 100644 brand_external_report_layout/readme/USAGE.rst create mode 100644 brand_external_report_layout/static/description/index.html create mode 100644 brand_external_report_layout/static/img/res_brand_logo.png create mode 100644 brand_external_report_layout/views/report_template.xml create mode 100644 brand_external_report_layout/views/res_brand.xml diff --git a/brand_external_report_layout/README.rst b/brand_external_report_layout/README.rst new file mode 100644 index 000000000..2910abe69 --- /dev/null +++ b/brand_external_report_layout/README.rst @@ -0,0 +1,89 @@ +============================ +Brand External Report Layout +============================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fbrand-lightgray.png?logo=github + :target: https://github.com/OCA/brand/tree/12.0/brand_external_report_layout + :alt: OCA/brand +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/brand-12-0/brand-12-0-brand_external_report_layout + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/284/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to have a different layout by brand for your external +reports. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Go to Settings > Users & Companies > Brands +#. Add a new brand or select an existing one +#. Enter brand information and select the a layout +#. Go to any branded object abd print the PDF report. It includes the information of the brand. + +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 +~~~~~~~ + +* CSONE SA/NV + +Contributors +~~~~~~~~~~~~ + +* Souheil Bejaoui + +Other credits +~~~~~~~~~~~~~ + +* ACSONE SA/NV + +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/brand `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/brand_external_report_layout/__init__.py b/brand_external_report_layout/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/brand_external_report_layout/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/brand_external_report_layout/__manifest__.py b/brand_external_report_layout/__manifest__.py new file mode 100644 index 000000000..dd2521b02 --- /dev/null +++ b/brand_external_report_layout/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Brand External Report Layout', + 'summary': """ + This module allows you to have a different layout by brand for your + external reports.""", + 'version': '12.0.1.0.0', + 'license': 'AGPL-3', + 'author': 'ACSONE SA/NV,' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/brand', + 'depends': ['base', 'brand', 'web'], + 'data': ['views/res_brand.xml', 'views/report_template.xml'], +} diff --git a/brand_external_report_layout/models/__init__.py b/brand_external_report_layout/models/__init__.py new file mode 100644 index 000000000..3dc20cced --- /dev/null +++ b/brand_external_report_layout/models/__init__.py @@ -0,0 +1 @@ +from . import res_brand diff --git a/brand_external_report_layout/models/res_brand.py b/brand_external_report_layout/models/res_brand.py new file mode 100644 index 000000000..4ecde643f --- /dev/null +++ b/brand_external_report_layout/models/res_brand.py @@ -0,0 +1,64 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import base64 +import os +from odoo import api, fields, models, tools, _ + + +class ResBrand(models.Model): + + _inherit = 'res.brand' + + def _get_logo(self): + return base64.b64encode( + open( + os.path.join( + tools.config['root_path'], + 'addons', + 'brand_external_report_layout', + 'static', + 'img', + 'res_brand_logo.png', + ), + 'rb', + ).read() + ) + + logo = fields.Binary( + related='partner_id.image', + default=_get_logo, + string="Brand Logo", + readonly=False, + ) + external_report_layout_id = fields.Many2one( + comodel_name='ir.ui.view', string='Document Template' + ) + report_header = fields.Text( + string='Brand Tagline', + help='Appears by default on the top right corner of your printed ' + 'documents (report header).', + ) + report_footer = fields.Text( + string='Report Footer', + translate=True, + help='Footer text displayed at the bottom of all reports.', + ) + + @api.multi + def change_report_template(self): + self.ensure_one() + form_view = self.env.ref( + 'brand_external_report_layout.res_brand_document_template_form' + ) + return { + 'name': _('Choose Your Document Layout'), + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form', + 'res_id': self.id, + 'res_model': 'res.brand', + 'views': [(form_view.id, 'form')], + 'view_id': form_view.id, + 'target': 'new', + } diff --git a/brand_external_report_layout/readme/CONTRIBUTORS.rst b/brand_external_report_layout/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..50e6298db --- /dev/null +++ b/brand_external_report_layout/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Souheil Bejaoui diff --git a/brand_external_report_layout/readme/CREDITS.rst b/brand_external_report_layout/readme/CREDITS.rst new file mode 100644 index 000000000..ae7e5fb13 --- /dev/null +++ b/brand_external_report_layout/readme/CREDITS.rst @@ -0,0 +1 @@ +* ACSONE SA/NV diff --git a/brand_external_report_layout/readme/DESCRIPTION.rst b/brand_external_report_layout/readme/DESCRIPTION.rst new file mode 100644 index 000000000..4b2e05d7b --- /dev/null +++ b/brand_external_report_layout/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows you to have a different layout by brand for your external +reports. diff --git a/brand_external_report_layout/readme/USAGE.rst b/brand_external_report_layout/readme/USAGE.rst new file mode 100644 index 000000000..2f55c0ec8 --- /dev/null +++ b/brand_external_report_layout/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +#. Go to Settings > Users & Companies > Brands +#. Add a new brand or select an existing one +#. Enter brand information and select the a layout +#. Go to any branded object abd print the PDF report. It includes the information of the brand. diff --git a/brand_external_report_layout/static/description/index.html b/brand_external_report_layout/static/description/index.html new file mode 100644 index 000000000..25044158b --- /dev/null +++ b/brand_external_report_layout/static/description/index.html @@ -0,0 +1,438 @@ + + + + + + +Brand External Report Layout + + + +
+

Brand External Report Layout

+ + +

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

+

This module allows you to have a different layout by brand for your external +reports.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Settings > Users & Companies > Brands
  2. +
  3. Add a new brand or select an existing one
  4. +
  5. Enter brand information and select the a layout
  6. +
  7. Go to any branded object abd print the PDF report. It includes the information of the brand.
  8. +
+
+
+

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

+
    +
  • CSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+ +
+
+

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/brand project on GitHub.

+

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

+
+
+
+ + diff --git a/brand_external_report_layout/static/img/res_brand_logo.png b/brand_external_report_layout/static/img/res_brand_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..99a0afa06fb33cf8b19ba94d8a4043f4307ccf6a GIT binary patch literal 15310 zcma*OcT`i$_xDc;kkBE3^iHAzk_ZAO7^*zWoYy;CLrsx_l$jI{5064wNlp_F55EO> z?FJ;qeVU>67jRzyOKDYUJiM|fvP&}}JUnEuvYfQG8~z_}(02~`k9OO%Kwbeevd8;U z+D#xkw{J5ty?8<+ra?jzBl!HM#q_wgVYDizRJ7&3vjUB_wke~6UO)?V0#Js4 zn6T|9uDw6C($D%6Zg+6{ zN>aX!5wX@h`GDLWkI9yY(Vzup=ul-%VJQLOrVHG2=j7HXI6)X2%4+A~VuY|hIH3Bs ztHEm5M}DMDcLjBj2KOV?8^rnfIRbTD7UiM|gjmy{0dZmY!Rpfqw=qD-J%WJ zaIkuiy0awIR*?tpa0^ZRrN3l8K)E{Ys6qhnO>EMNhm<374A=|kh+rBbL5vQTQ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@JeKD8vOQgNt+j)vcZ(;pT+kbcECt3LYZd3<5(Adol2=kM;tY zxi}$G$^XR&bIlhQfV`X;!V2ZP!KPCrR(Yw6t${Ir$xbV+8|M?#P0de-|IX|G{oH?L cX4jI@87NnQZ^ZRDfi9l1yqa8zjA_9C0Se%-cmMzZ literal 0 HcmV?d00001 diff --git a/brand_external_report_layout/views/report_template.xml b/brand_external_report_layout/views/report_template.xml new file mode 100644 index 000000000..2e160dc57 --- /dev/null +++ b/brand_external_report_layout/views/report_template.xml @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/brand_external_report_layout/views/res_brand.xml b/brand_external_report_layout/views/res_brand.xml new file mode 100644 index 000000000..d64c30dae --- /dev/null +++ b/brand_external_report_layout/views/res_brand.xml @@ -0,0 +1,54 @@ + + + + + + + res.brand.document.template.form + res.brand + 9999 + +
+ + + + + + + +
+
+
+
+
+ + + res.brand + + + +
+
+ +
+
+
+ + +
From 18a990a7a5cfc2833fd6d7d29f3727dd76131e4c Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Fri, 15 Nov 2019 14:51:44 +0100 Subject: [PATCH 02/43] [12.0][IMP] - Add unit tests --- brand_external_report_layout/__init__.py | 1 + .../models/res_brand.py | 4 ++-- .../static/img/res_brand_logo.png | Bin 15310 -> 0 bytes .../tests/__init__.py | 1 + .../test_brand_external_report_layout.py | 22 ++++++++++++++++++ 5 files changed, 26 insertions(+), 2 deletions(-) delete mode 100644 brand_external_report_layout/static/img/res_brand_logo.png create mode 100644 brand_external_report_layout/tests/__init__.py create mode 100644 brand_external_report_layout/tests/test_brand_external_report_layout.py diff --git a/brand_external_report_layout/__init__.py b/brand_external_report_layout/__init__.py index 0650744f6..0ee8b5073 100644 --- a/brand_external_report_layout/__init__.py +++ b/brand_external_report_layout/__init__.py @@ -1 +1,2 @@ from . import models +from . import tests diff --git a/brand_external_report_layout/models/res_brand.py b/brand_external_report_layout/models/res_brand.py index 4ecde643f..35469c944 100644 --- a/brand_external_report_layout/models/res_brand.py +++ b/brand_external_report_layout/models/res_brand.py @@ -16,10 +16,10 @@ def _get_logo(self): os.path.join( tools.config['root_path'], 'addons', - 'brand_external_report_layout', + 'base', 'static', 'img', - 'res_brand_logo.png', + 'res_company_logo.png', ), 'rb', ).read() diff --git a/brand_external_report_layout/static/img/res_brand_logo.png b/brand_external_report_layout/static/img/res_brand_logo.png deleted file mode 100644 index 99a0afa06fb33cf8b19ba94d8a4043f4307ccf6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15310 zcma*OcT`i$_xDc;kkBE3^iHAzk_ZAO7^*zWoYy;CLrsx_l$jI{5064wNlp_F55EO> z?FJ;qeVU>67jRzyOKDYUJiM|fvP&}}JUnEuvYfQG8~z_}(02~`k9OO%Kwbeevd8;U z+D#xkw{J5ty?8<+ra?jzBl!HM#q_wgVYDizRJ7&3vjUB_wke~6UO)?V0#Js4 zn6T|9uDw6C($D%6Zg+6{ zN>aX!5wX@h`GDLWkI9yY(Vzup=ul-%VJQLOrVHG2=j7HXI6)X2%4+A~VuY|hIH3Bs ztHEm5M}DMDcLjBj2KOV?8^rnfIRbTD7UiM|gjmy{0dZmY!Rpfqw=qD-J%WJ zaIkuiy0awIR*?tpa0^ZRrN3l8K)E{Ys6qhnO>EMNhm<374A=|kh+rBbL5vQTQ}}SG}bWOZn7R!b3vb3Wy zpu1dFvI=IGUHqko(F~+bA;IZMg%-9IWG!PzFdcfjR~0uf<00^to#-ly6XO77^2qB@ zvks^c=E&iA`Oaf+V;hOfoaauvSJ`PqR4FC}r3yLsrRTLhW5Y<#!@#EG+e(V_w1Tliy&r`gPq zGNzbh?H3%RY4@sAc~*KJIV4d37M6Se#IRMV}*L5MOY zp<#MYNs49TDp1Gc7Ty(y|3AV@&?d%sN{FK$c?um+WL#tZq+4f3CKxr`Z&{Sc&eCH>DMA4s2D5RaasVZX8y zH~Ot0VjM5X4d9l=t7!P`<(pS1Bkpw~`4rr~#3RY+YcB zFE>i5jDhANciogo#sD$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3$Gz9vhaJ4ddx@OIvN5G6S#{c>RWH~` zGiDusyNnfRIRn7BcS=2^5K*zi*W@_fmN&%jg45QL(To-xq%FPA;zO z{xaZaBS}ZD^=7|<^?VX%wKZPg_@@WBMs0R|El^SBE4zP|kC6M=wkik?;OnOLoT3eI zhqlYfL=$|0bN#GTHkOb|F4vsRSP1Ckhga6_hVO#DJ+wyJSqfpu)zNjX<7T0Dy&kxC zfTNFHto~x5wf|={zK77V#H9csur|;yj=ztyyg$AzlQII69K2b zn9`EqJFfscS&FF| z<-xQ?je${nrEFwaAXbho{t#-X{>TRQS9^%4UPH-{y4D? zj9*74nu9rH*X3A%lK#Ob(}ltw984*9A~%S&;w9b==)_}~)S-)8vcxzeDyNmvqbTWo zK2LW)(I8WtJdXir5|tZ68Ek5UC&e|M@Rw*n@A3Z@(A;T->Oa`XeL4`@=1@%1=~k^& zfomNMAIZQ`F=4g|dHPkhIJsLJ)8kX#4%yN;E{}2=RT^4lN39UrHJFl zbqxQK>ui-;o*%ADy!hq?!G|l8Q1#)IPHAi#$e*73OP%%9YUtuUy#iC(QjvL_?Cu>X z=Z|7U6G(wl@fUM+Uh! zgp-RXv*Mp9pZ{%7K^N48OyXBloaK^|-pfSeWF*`JI2lQWDe)+MPm?)8qOdfMi_IK5 zEYgO-yI-*e{8xVcZ@JeKD8vOQgNt+j)vcZ(;pT+kbcECt3LYZd3<5(Adol2=kM;tY zxi}$G$^XR&bIlhQfV`X;!V2ZP!KPCrR(Yw6t${Ir$xbV+8|M?#P0de-|IX|G{oH?L cX4jI@87NnQZ^ZRDfi9l1yqa8zjA_9C0Se%-cmMzZ diff --git a/brand_external_report_layout/tests/__init__.py b/brand_external_report_layout/tests/__init__.py new file mode 100644 index 000000000..d2250bfcf --- /dev/null +++ b/brand_external_report_layout/tests/__init__.py @@ -0,0 +1 @@ +from . import test_brand_external_report_layout diff --git a/brand_external_report_layout/tests/test_brand_external_report_layout.py b/brand_external_report_layout/tests/test_brand_external_report_layout.py new file mode 100644 index 000000000..dc3f23d79 --- /dev/null +++ b/brand_external_report_layout/tests/test_brand_external_report_layout.py @@ -0,0 +1,22 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestBrandExternalReportLayout(TransactionCase): + def setUp(self): + super(TestBrandExternalReportLayout, self).setUp() + self.brand = self.env['res.brand'].create({'name': 'brand'}) + + def test_change_report_template(self): + self.brand.change_report_template() + self.assertEqual( + self.env.ref( + 'brand_external_report_layout.res_brand_document_template_form' + ).id, + self.brand.change_report_template()['view_id'], + ) + + def test_get_logo(self): + self.assertEqual(self.brand.logo, self.brand._get_logo()) From 0561d0a3cd31f92732dc2ae0687c8eef06ef1f2d Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Fri, 15 Nov 2019 15:32:04 +0100 Subject: [PATCH 03/43] [12.0][IMP] - Add ROADMAP file to readme --- brand_external_report_layout/README.rst | 21 +++++++++- .../readme/ROADMAP.rst | 15 +++++++ .../static/description/index.html | 41 +++++++++++++------ 3 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 brand_external_report_layout/readme/ROADMAP.rst diff --git a/brand_external_report_layout/README.rst b/brand_external_report_layout/README.rst index 2910abe69..ce9486fc5 100644 --- a/brand_external_report_layout/README.rst +++ b/brand_external_report_layout/README.rst @@ -43,6 +43,25 @@ To use this module, you need to: #. Enter brand information and select the a layout #. Go to any branded object abd print the PDF report. It includes the information of the brand. +Known issues / Roadmap +====================== + +To simplify the customization of the external layout we replaced the variable +company that odoo compute in the external_layout view by the object brand. + +With this module, all custom layouts will display brand information out of the box. + +This was possible and easy to implement as the company and the brand models +inherit from partner model and share the same informational fields. + +The computed variable company is used to set report header and footer. It's not +meant to be used in the report business logic itself. But in that case +(if a custom layout use the variable company for some-reason other then header +and footer) this module can cause an issue because the used field can be +missing in the brand model or not correctly set. + +In this case, we recommend to always use document field company for this use-end. + Bug Tracker =========== @@ -59,7 +78,7 @@ Credits Authors ~~~~~~~ -* CSONE SA/NV +* ACSONE SA/NV Contributors ~~~~~~~~~~~~ diff --git a/brand_external_report_layout/readme/ROADMAP.rst b/brand_external_report_layout/readme/ROADMAP.rst new file mode 100644 index 000000000..479e35039 --- /dev/null +++ b/brand_external_report_layout/readme/ROADMAP.rst @@ -0,0 +1,15 @@ +To simplify the customization of the external layout we replaced the variable +company that odoo compute in the external_layout view by the object brand. + +With this module, all custom layouts will display brand information out of the box. + +This was possible and easy to implement as the company and the brand models +inherit from partner model and share the same informational fields. + +The computed variable company is used to set report header and footer. It's not +meant to be used in the report business logic itself. But in that case +(if a custom layout use the variable company for some-reason other then header +and footer) this module can cause an issue because the used field can be +missing in the brand model or not correctly set. + +In this case, we recommend to always use document field company for this use-end. \ No newline at end of file diff --git a/brand_external_report_layout/static/description/index.html b/brand_external_report_layout/static/description/index.html index 25044158b..0d28eacc6 100644 --- a/brand_external_report_layout/static/description/index.html +++ b/brand_external_report_layout/static/description/index.html @@ -374,12 +374,13 @@

Brand External Report Layout

+
+

Known issues / Roadmap

+

To simplify the customization of the external layout we replaced the variable +company that odoo compute in the external_layout view by the object brand.

+

With this module, all custom layouts will display brand information out of the box.

+

This was possible and easy to implement as the company and the brand models +inherit from partner model and share the same informational fields.

+

The computed variable company is used to set report header and footer. It’s not +meant to be used in the report business logic itself. But in that case +(if a custom layout use the variable company for some-reason other then header +and footer) this module can cause an issue because the used field can be +missing in the brand model or not correctly set.

+

In this case, we recommend to always use document field company for this use-end.

+
-

Bug Tracker

+

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 @@ -403,27 +418,27 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

    -
  • CSONE SA/NV
  • +
  • ACSONE SA/NV
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose From d84492f40d7b49c8831724d268baa7cbe3b3434f Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Sat, 16 Nov 2019 09:57:27 +0100 Subject: [PATCH 04/43] [12.0][RMV] - Remove useless section in readme --- brand_external_report_layout/README.rst | 5 ----- brand_external_report_layout/models/res_brand.py | 4 ++-- brand_external_report_layout/readme/CREDITS.rst | 1 - .../static/description/index.html | 11 ++--------- .../tests/test_brand_external_report_layout.py | 4 ++-- 5 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 brand_external_report_layout/readme/CREDITS.rst diff --git a/brand_external_report_layout/README.rst b/brand_external_report_layout/README.rst index ce9486fc5..a6524a121 100644 --- a/brand_external_report_layout/README.rst +++ b/brand_external_report_layout/README.rst @@ -85,11 +85,6 @@ Contributors * Souheil Bejaoui -Other credits -~~~~~~~~~~~~~ - -* ACSONE SA/NV - Maintainers ~~~~~~~~~~~ diff --git a/brand_external_report_layout/models/res_brand.py b/brand_external_report_layout/models/res_brand.py index 35469c944..6dcb4cc16 100644 --- a/brand_external_report_layout/models/res_brand.py +++ b/brand_external_report_layout/models/res_brand.py @@ -10,7 +10,7 @@ class ResBrand(models.Model): _inherit = 'res.brand' - def _get_logo(self): + def _get_default_brand_logo(self): return base64.b64encode( open( os.path.join( @@ -27,7 +27,7 @@ def _get_logo(self): logo = fields.Binary( related='partner_id.image', - default=_get_logo, + default=_get_default_brand_logo, string="Brand Logo", readonly=False, ) diff --git a/brand_external_report_layout/readme/CREDITS.rst b/brand_external_report_layout/readme/CREDITS.rst deleted file mode 100644 index ae7e5fb13..000000000 --- a/brand_external_report_layout/readme/CREDITS.rst +++ /dev/null @@ -1 +0,0 @@ -* ACSONE SA/NV diff --git a/brand_external_report_layout/static/description/index.html b/brand_external_report_layout/static/description/index.html index 0d28eacc6..3797b63c2 100644 --- a/brand_external_report_layout/static/description/index.html +++ b/brand_external_report_layout/static/description/index.html @@ -379,8 +379,7 @@

Brand External Report Layout

  • Credits
  • @@ -431,14 +430,8 @@

    Contributors

  • Souheil Bejaoui <souheil.bejaoui@acsone.eu>
  • -
    -

    Other credits

    - -
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association

    OCA, or the Odoo Community Association, is a nonprofit organization whose diff --git a/brand_external_report_layout/tests/test_brand_external_report_layout.py b/brand_external_report_layout/tests/test_brand_external_report_layout.py index dc3f23d79..547b44061 100644 --- a/brand_external_report_layout/tests/test_brand_external_report_layout.py +++ b/brand_external_report_layout/tests/test_brand_external_report_layout.py @@ -18,5 +18,5 @@ def test_change_report_template(self): self.brand.change_report_template()['view_id'], ) - def test_get_logo(self): - self.assertEqual(self.brand.logo, self.brand._get_logo()) + def test_get_default_brand_logo(self): + self.assertEqual(self.brand.logo, self.brand._get_default_brand_logo()) From 550397139e6463229f1d9c52ccfffbd2ddca92ea Mon Sep 17 00:00:00 2001 From: Bejaoui Souheil Date: Sat, 16 Nov 2019 09:58:43 +0100 Subject: [PATCH 05/43] [12.0][IMP] - Change field label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Stéphane Bidoul (ACSONE) --- .../i18n/brand_external_report_layout.pot | 96 +++++++++++++++++++ .../models/res_brand.py | 2 +- .../static/description/index.html | 2 +- 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 brand_external_report_layout/i18n/brand_external_report_layout.pot diff --git a/brand_external_report_layout/i18n/brand_external_report_layout.pot b/brand_external_report_layout/i18n/brand_external_report_layout.pot new file mode 100644 index 000000000..c134ca1bb --- /dev/null +++ b/brand_external_report_layout/i18n/brand_external_report_layout.pot @@ -0,0 +1,96 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * brand_external_report_layout +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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: brand_external_report_layout +#: model:ir.model.fields,help:brand_external_report_layout.field_res_brand__report_header +msgid "Appears by default on the top right corner of your printed documents (report header)." +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model,name:brand_external_report_layout.model_res_brand +msgid "Brand" +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,field_description:brand_external_report_layout.field_res_brand__logo +msgid "Brand Logo" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "Cancel" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_form_view +msgid "Change Document Template" +msgstr "" + +#. module: brand_external_report_layout +#: code:addons/brand_external_report_layout/models/res_brand.py:55 +#, python-format +msgid "Choose Your Document Layout" +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,field_description:brand_external_report_layout.field_res_brand__external_report_layout_id +msgid "Document Template" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "Footer" +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,help:brand_external_report_layout.field_res_brand__report_footer +msgid "Footer text displayed at the bottom of all reports." +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,field_description:brand_external_report_layout.field_res_brand__report_footer +msgid "Report Footer" +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,field_description:brand_external_report_layout.field_res_brand__report_header +msgid "Report Header" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "Save" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "Template" +msgstr "" + +#. module: brand_external_report_layout +#: model:ir.model.fields,help:brand_external_report_layout.field_res_brand__logo +msgid "This field holds the image used as avatar for this contact, limited to 1024x1024px" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "e.g. Global Business Solutions" +msgstr "" + +#. module: brand_external_report_layout +#: model_terms:ir.ui.view,arch_db:brand_external_report_layout.res_brand_document_template_form +msgid "e.g. Opening hours, bank accounts (one per line)" +msgstr "" + diff --git a/brand_external_report_layout/models/res_brand.py b/brand_external_report_layout/models/res_brand.py index 6dcb4cc16..24ad48655 100644 --- a/brand_external_report_layout/models/res_brand.py +++ b/brand_external_report_layout/models/res_brand.py @@ -35,7 +35,7 @@ def _get_default_brand_logo(self): comodel_name='ir.ui.view', string='Document Template' ) report_header = fields.Text( - string='Brand Tagline', + string='Report Header', help='Appears by default on the top right corner of your printed ' 'documents (report header).', ) diff --git a/brand_external_report_layout/static/description/index.html b/brand_external_report_layout/static/description/index.html index 3797b63c2..2eeb7498d 100644 --- a/brand_external_report_layout/static/description/index.html +++ b/brand_external_report_layout/static/description/index.html @@ -3,7 +3,7 @@ - + Brand External Report Layout