From 0aedcd4351548b16af0a98dbfb18f11dc2f4cebf Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Wed, 28 Dec 2022 14:41:11 +0630 Subject: [PATCH] [ADD] report_company_details_translatable --- .../README.rst | 73 +++ .../__init__.py | 1 + .../__manifest__.py | 12 + .../models/__init__.py | 1 + .../models/res_company.py | 13 + .../readme/DESCRIPTION.rst | 6 + .../static/description/index.html | 416 ++++++++++++++++++ .../report_company_details_translatable | 1 + .../setup.py | 6 + 9 files changed, 529 insertions(+) create mode 100644 report_company_details_translatable/README.rst create mode 100644 report_company_details_translatable/__init__.py create mode 100644 report_company_details_translatable/__manifest__.py create mode 100644 report_company_details_translatable/models/__init__.py create mode 100644 report_company_details_translatable/models/res_company.py create mode 100644 report_company_details_translatable/readme/DESCRIPTION.rst create mode 100644 report_company_details_translatable/static/description/index.html create mode 120000 setup/report_company_details_translatable/odoo/addons/report_company_details_translatable create mode 100644 setup/report_company_details_translatable/setup.py diff --git a/report_company_details_translatable/README.rst b/report_company_details_translatable/README.rst new file mode 100644 index 000000000..a80b5497a --- /dev/null +++ b/report_company_details_translatable/README.rst @@ -0,0 +1,73 @@ +=================================== +Report Company Details Translatable +=================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Freporting--engine-lightgray.png?logo=github + :target: https://github.com/OCA/reporting-engine/tree/16.0/report_company_details_translatable + :alt: OCA/reporting-engine +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_company_details_translatable + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/143/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to translate the company details to show in PDF reports. + +In some countries where the dominant language is not based on Roman alphabet, +it is often necessary to be able to print the company details according to the partner's language. +In case of Japan, typically Japanese for domestic transactions, and English for international ones, for example. +This module intends to cater to this requirement. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Quartile Limited + +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/reporting-engine `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_company_details_translatable/__init__.py b/report_company_details_translatable/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/report_company_details_translatable/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/report_company_details_translatable/__manifest__.py b/report_company_details_translatable/__manifest__.py new file mode 100644 index 000000000..92a6d4ad1 --- /dev/null +++ b/report_company_details_translatable/__manifest__.py @@ -0,0 +1,12 @@ +# Copyright 2022 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Report Company Details Translatable", + "version": "16.0.1.0.0", + "category": "Reporting", + "website": "https://github.com/OCA/reporting-engine", + "license": "AGPL-3", + "author": "Quartile Limited, Odoo Community Association (OCA)", + "depends": ["base"], + "installable": True, +} diff --git a/report_company_details_translatable/models/__init__.py b/report_company_details_translatable/models/__init__.py new file mode 100644 index 000000000..aff44f335 --- /dev/null +++ b/report_company_details_translatable/models/__init__.py @@ -0,0 +1 @@ +from . import res_company diff --git a/report_company_details_translatable/models/res_company.py b/report_company_details_translatable/models/res_company.py new file mode 100644 index 000000000..1977d800a --- /dev/null +++ b/report_company_details_translatable/models/res_company.py @@ -0,0 +1,13 @@ +# Copyright 2022 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + company_details = fields.Html( + translate=True, + sanitize=False, + ) diff --git a/report_company_details_translatable/readme/DESCRIPTION.rst b/report_company_details_translatable/readme/DESCRIPTION.rst new file mode 100644 index 000000000..6f3b2de00 --- /dev/null +++ b/report_company_details_translatable/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +This module allows to translate the company details to show in PDF reports. + +In some countries where the dominant language is not based on Roman alphabet, +it is often necessary to be able to print the company details according to the partner's language. +In case of Japan, typically Japanese for domestic transactions, and English for international ones, for example. +This module intends to cater to this requirement. diff --git a/report_company_details_translatable/static/description/index.html b/report_company_details_translatable/static/description/index.html new file mode 100644 index 000000000..583cec089 --- /dev/null +++ b/report_company_details_translatable/static/description/index.html @@ -0,0 +1,416 @@ + + + + + + +Report Company Details Translatable + + + +
+

Report Company Details Translatable

+ + +

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

+

This module allows to translate the company details to show in PDF reports.

+

In some countries where the dominant language is not based on Roman alphabet, +it is often necessary to be able to print the company details according to the partner’s language. +In case of Japan, typically Japanese for domestic transactions, and English for international ones, for example. +This module intends to cater to this requirement.

+

Table of contents

+ +
+

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

+
    +
  • Quartile Limited
  • +
+
+
+

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

+

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

+
+
+
+ + diff --git a/setup/report_company_details_translatable/odoo/addons/report_company_details_translatable b/setup/report_company_details_translatable/odoo/addons/report_company_details_translatable new file mode 120000 index 000000000..29fa8ed6e --- /dev/null +++ b/setup/report_company_details_translatable/odoo/addons/report_company_details_translatable @@ -0,0 +1 @@ +../../../../report_company_details_translatable \ No newline at end of file diff --git a/setup/report_company_details_translatable/setup.py b/setup/report_company_details_translatable/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/report_company_details_translatable/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)