From 6c80680a3cf3f9e2d9cf2bcec96f76a7b30d2148 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 5 Jan 2023 07:45:47 +0630 Subject: [PATCH 01/10] [ADD] purchase_report_shipping_address --- purchase_report_shipping_address/README.rst | 79 ++++ purchase_report_shipping_address/__init__.py | 1 + .../__manifest__.py | 17 + .../models/__init__.py | 1 + .../models/stock_warehouse.py | 12 + .../readme/CONFIGURE.rst | 3 + .../readme/DESCRIPTION.rst | 5 + .../reports/purchase_order_templates.xml | 26 ++ .../reports/purchase_quotation_templates.xml | 26 ++ .../static/description/index.html | 422 ++++++++++++++++++ .../views/stock_warehouse_views.xml | 13 + 11 files changed, 605 insertions(+) create mode 100644 purchase_report_shipping_address/README.rst create mode 100644 purchase_report_shipping_address/__init__.py create mode 100644 purchase_report_shipping_address/__manifest__.py create mode 100644 purchase_report_shipping_address/models/__init__.py create mode 100644 purchase_report_shipping_address/models/stock_warehouse.py create mode 100644 purchase_report_shipping_address/readme/CONFIGURE.rst create mode 100644 purchase_report_shipping_address/readme/DESCRIPTION.rst create mode 100644 purchase_report_shipping_address/reports/purchase_order_templates.xml create mode 100644 purchase_report_shipping_address/reports/purchase_quotation_templates.xml create mode 100644 purchase_report_shipping_address/static/description/index.html create mode 100644 purchase_report_shipping_address/views/stock_warehouse_views.xml diff --git a/purchase_report_shipping_address/README.rst b/purchase_report_shipping_address/README.rst new file mode 100644 index 00000000..d93f62cc --- /dev/null +++ b/purchase_report_shipping_address/README.rst @@ -0,0 +1,79 @@ +================================ +Purchase Report Shipping Address +================================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fpurchase--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-reporting/tree/16.0/purchase_report_shipping_address + :alt: OCA/purchase-reporting +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-reporting-16-0/purchase-reporting-16-0-purchase_report_shipping_address + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/141/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the translatable Warehouse Address Details field in warehouse to show in purchase reports. + +Purchase documents are printed in supplier's language, however Odoo by default does not +come with the ability to present the warehouse address in different languages. +This module intends to take care of this shortcoming. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +#. Go to *Inventory > Configuration > Warehouses* and open a warehouse record for which +the address presentation should be adjusted for purchase reports. +#. Update Warehouse Address Details 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 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/purchase-reporting `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_report_shipping_address/__init__.py b/purchase_report_shipping_address/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/purchase_report_shipping_address/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/purchase_report_shipping_address/__manifest__.py b/purchase_report_shipping_address/__manifest__.py new file mode 100644 index 00000000..fec6c36e --- /dev/null +++ b/purchase_report_shipping_address/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Purchase Report Shipping Address", + "version": "16.0.1.0.0", + "category": "Reporting", + "website": "https://github.com/OCA/purchase-reporting", + "license": "AGPL-3", + "author": "Quartile Limited, Odoo Community Association (OCA)", + "depends": ["purchase_stock"], + "data": [ + "views/stock_warehouse_views.xml", + "reports/purchase_order_templates.xml", + "reports/purchase_quotation_templates.xml", + ], + "installable": True, +} diff --git a/purchase_report_shipping_address/models/__init__.py b/purchase_report_shipping_address/models/__init__.py new file mode 100644 index 00000000..413e27de --- /dev/null +++ b/purchase_report_shipping_address/models/__init__.py @@ -0,0 +1 @@ +from . import stock_warehouse diff --git a/purchase_report_shipping_address/models/stock_warehouse.py b/purchase_report_shipping_address/models/stock_warehouse.py new file mode 100644 index 00000000..58386d25 --- /dev/null +++ b/purchase_report_shipping_address/models/stock_warehouse.py @@ -0,0 +1,12 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class StockWarehouse(models.Model): + _inherit = "stock.warehouse" + + warehouse_address_details = fields.Html( + translate=True, + ) diff --git a/purchase_report_shipping_address/readme/CONFIGURE.rst b/purchase_report_shipping_address/readme/CONFIGURE.rst new file mode 100644 index 00000000..569fed6c --- /dev/null +++ b/purchase_report_shipping_address/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +#. Go to *Inventory > Configuration > Warehouses* and open a warehouse record for which +the address presentation should be adjusted for purchase reports. +#. Update Warehouse Address Details field. diff --git a/purchase_report_shipping_address/readme/DESCRIPTION.rst b/purchase_report_shipping_address/readme/DESCRIPTION.rst new file mode 100644 index 00000000..827bff73 --- /dev/null +++ b/purchase_report_shipping_address/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module adds the translatable Warehouse Address Details field in warehouse to show in purchase reports. + +Purchase documents are printed in supplier's language, however Odoo by default does not +come with the ability to present the warehouse address in different languages. +This module intends to take care of this shortcoming. diff --git a/purchase_report_shipping_address/reports/purchase_order_templates.xml b/purchase_report_shipping_address/reports/purchase_order_templates.xml new file mode 100644 index 00000000..9ffa2128 --- /dev/null +++ b/purchase_report_shipping_address/reports/purchase_order_templates.xml @@ -0,0 +1,26 @@ + + + + diff --git a/purchase_report_shipping_address/reports/purchase_quotation_templates.xml b/purchase_report_shipping_address/reports/purchase_quotation_templates.xml new file mode 100644 index 00000000..9a464603 --- /dev/null +++ b/purchase_report_shipping_address/reports/purchase_quotation_templates.xml @@ -0,0 +1,26 @@ + + + + diff --git a/purchase_report_shipping_address/static/description/index.html b/purchase_report_shipping_address/static/description/index.html new file mode 100644 index 00000000..42a9ecc5 --- /dev/null +++ b/purchase_report_shipping_address/static/description/index.html @@ -0,0 +1,422 @@ + + + + + + +Purchase Report Shipping Address + + + +
+

Purchase Report Shipping Address

+ + +

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

+

This module adds the translatable Warehouse Address Details field in warehouse to show in purchase reports.

+

Purchase documents are printed in supplier’s language, however Odoo by default does not +come with the ability to present the warehouse address in different languages. +This module intends to take care of this shortcoming.

+

Table of contents

+ +
+

Configuration

+

#. Go to Inventory > Configuration > Warehouses and open a warehouse record for which +the address presentation should be adjusted for purchase reports. +#. Update Warehouse Address Details 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 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/purchase-reporting project on GitHub.

+

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

+
+
+
+ + diff --git a/purchase_report_shipping_address/views/stock_warehouse_views.xml b/purchase_report_shipping_address/views/stock_warehouse_views.xml new file mode 100644 index 00000000..2e11c508 --- /dev/null +++ b/purchase_report_shipping_address/views/stock_warehouse_views.xml @@ -0,0 +1,13 @@ + + + + stock.warehouse + stock.warehouse + + + + + + + + From 86afbfa53c0d55637f5aa9367d4d7cfde96d59e4 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 9 Feb 2023 10:05:29 +0630 Subject: [PATCH 02/10] [IMP] purchase_report_shipping_address: change inherit_id --- purchase_report_shipping_address/README.rst | 15 ++++---- .../i18n/purchase_report_shipping_address.pot | 24 +++++++++++++ .../reports/purchase_order_templates.xml | 2 +- .../reports/purchase_quotation_templates.xml | 2 +- .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 34 +++++++++--------- 6 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 purchase_report_shipping_address/i18n/purchase_report_shipping_address.pot create mode 100644 purchase_report_shipping_address/static/description/icon.png diff --git a/purchase_report_shipping_address/README.rst b/purchase_report_shipping_address/README.rst index d93f62cc..060b5057 100644 --- a/purchase_report_shipping_address/README.rst +++ b/purchase_report_shipping_address/README.rst @@ -2,10 +2,13 @@ Purchase Report Shipping Address ================================ -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:fe7289cd5c049ad4bf7f88d3db303a370a8e2d7e0ba3f71d63500a0d7a050e2d + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Purchase Report Shipping Address .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/purchase-reporting-16-0/purchase-reporting-16-0-purchase_report_shipping_address :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/141/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-reporting&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds the translatable Warehouse Address Details field in warehouse to show in purchase reports. @@ -48,7 +51,7 @@ 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 +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. diff --git a/purchase_report_shipping_address/i18n/purchase_report_shipping_address.pot b/purchase_report_shipping_address/i18n/purchase_report_shipping_address.pot new file mode 100644 index 00000000..c32976f5 --- /dev/null +++ b/purchase_report_shipping_address/i18n/purchase_report_shipping_address.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_report_shipping_address +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: purchase_report_shipping_address +#: model:ir.model,name:purchase_report_shipping_address.model_stock_warehouse +msgid "Warehouse" +msgstr "" + +#. module: purchase_report_shipping_address +#: model:ir.model.fields,field_description:purchase_report_shipping_address.field_stock_warehouse__warehouse_address_details +msgid "Warehouse Address Details" +msgstr "" diff --git a/purchase_report_shipping_address/reports/purchase_order_templates.xml b/purchase_report_shipping_address/reports/purchase_order_templates.xml index 9ffa2128..c28bc0ad 100644 --- a/purchase_report_shipping_address/reports/purchase_order_templates.xml +++ b/purchase_report_shipping_address/reports/purchase_order_templates.xml @@ -2,7 +2,7 @@