From d70d2df963f0f386603f691045cced7b5e571504 Mon Sep 17 00:00:00 2001 From: Tiago Amaral Date: Wed, 22 May 2024 16:57:56 -0300 Subject: [PATCH] [ADD] Addon: sale_order_pos_report [FIX] 15.0 version --- .pylintrc | 4 +- .pylintrc-mandatory | 2 +- sale_order_pos_report/README.rst | 35 +++ sale_order_pos_report/__init__.py | 0 sale_order_pos_report/__manifest__.py | 18 ++ .../report/report_saleorder_compact.xml | 291 ++++++++++++++++++ sale_order_pos_report/report/sale_report.xml | 33 ++ .../odoo/addons/sale_order_pos_report | 1 + setup/sale_order_pos_report/setup.py | 6 + 9 files changed, 386 insertions(+), 4 deletions(-) create mode 100644 sale_order_pos_report/README.rst create mode 100644 sale_order_pos_report/__init__.py create mode 100644 sale_order_pos_report/__manifest__.py create mode 100644 sale_order_pos_report/report/report_saleorder_compact.xml create mode 100644 sale_order_pos_report/report/sale_report.xml create mode 120000 setup/sale_order_pos_report/odoo/addons/sale_order_pos_report create mode 100644 setup/sale_order_pos_report/setup.py diff --git a/.pylintrc b/.pylintrc index 17fb0f0..f637c46 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,5 +1,3 @@ - - [MASTER] load-plugins=pylint_odoo score=n @@ -10,7 +8,7 @@ manifest_required_authors=KMEE manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=15.0 [MESSAGES CONTROL] disable=all diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index f4b0f7e..157e767 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -9,7 +9,7 @@ manifest_required_authors=KMEE manifest_required_keys=license manifest_deprecated_keys=description,active license_allowed=LGPL-3 -valid_odoo_versions=14.0 +valid_odoo_versions=15.0 [MESSAGES CONTROL] disable=all diff --git a/sale_order_pos_report/README.rst b/sale_order_pos_report/README.rst new file mode 100644 index 0000000..38929e8 --- /dev/null +++ b/sale_order_pos_report/README.rst @@ -0,0 +1,35 @@ +**This file is going to be generated by oca-gen-addon-readme.** + +*Manual changes will be overwritten.* + +Please provide content in the ``readme`` directory: + +* **DESCRIPTION.rst** (required) +* INSTALL.rst (optional) +* CONFIGURE.rst (optional) +* **USAGE.rst** (optional, highly recommended) +* DEVELOP.rst (optional) +* ROADMAP.rst (optional) +* HISTORY.rst (optional, recommended) +* **CONTRIBUTORS.rst** (optional, highly recommended) +* CREDITS.rst (optional) + +Content of this README will also be drawn from the addon manifest, +from keys such as name, authors, maintainers, development_status, +and license. + +A good, one sentence summary in the manifest is also highly recommended. + + +Automatic changelog generation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`HISTORY.rst` can be auto generated using `towncrier `_. + +Just put towncrier compatible changelog fragments into `readme/newsfragments` +and the changelog file will be automatically generated and updated when a new fragment is added. + +Please refer to `towncrier` documentation to know more. + +NOTE: the changelog will be automatically generated when using `/ocabot merge $option`. +If you need to run it manually, refer to `OCA/maintainer-tools README `_. diff --git a/sale_order_pos_report/__init__.py b/sale_order_pos_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sale_order_pos_report/__manifest__.py b/sale_order_pos_report/__manifest__.py new file mode 100644 index 0000000..a9f3700 --- /dev/null +++ b/sale_order_pos_report/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 KMEE +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +{ + "name": "Sale Order Pos Report", + "version": "15.0.1.0.0", + "license": "LGPL-3", + "author": "KMEE", + "website": "https://github.com/KMEE/kmee-odoo-addons", + "depends": [ + "sale", + ], + "data": [ + "report/report_saleorder_compact.xml", + "report/sale_report.xml", + ], + "demo": [], +} diff --git a/sale_order_pos_report/report/report_saleorder_compact.xml b/sale_order_pos_report/report/report_saleorder_compact.xml new file mode 100644 index 0000000..9e17f12 --- /dev/null +++ b/sale_order_pos_report/report/report_saleorder_compact.xml @@ -0,0 +1,291 @@ + + + + + diff --git a/sale_order_pos_report/report/sale_report.xml b/sale_order_pos_report/report/sale_report.xml new file mode 100644 index 0000000..2f22864 --- /dev/null +++ b/sale_order_pos_report/report/sale_report.xml @@ -0,0 +1,33 @@ + + + + Thermal 80mm + + custom + 300 + 80 + Portrait + 3 + 3 + 3 + 3 + + 3 + 80 + + + + Quotation / Order (80mm) + sale.order + qweb-pdf + sale_order_pos_report.report_saleorder_compact + sale_order_pos_report.report_saleorder_compact + (object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name) + + report + + + + diff --git a/setup/sale_order_pos_report/odoo/addons/sale_order_pos_report b/setup/sale_order_pos_report/odoo/addons/sale_order_pos_report new file mode 120000 index 0000000..93a91d9 --- /dev/null +++ b/setup/sale_order_pos_report/odoo/addons/sale_order_pos_report @@ -0,0 +1 @@ +../../../../sale_order_pos_report \ No newline at end of file diff --git a/setup/sale_order_pos_report/setup.py b/setup/sale_order_pos_report/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/sale_order_pos_report/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)