From e2ef0e2c9da1da736380240d4411bc2c4a425b89 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 --- .pylintrc | 5 - .pylintrc-mandatory | 5 - sale_order_pos_report/__init__.py | 1 + sale_order_pos_report/__manifest__.py | 18 ++ sale_order_pos_report/models/__init__.py | 1 + sale_order_pos_report/models/sale_order.py | 9 + .../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 + 10 files changed, 360 insertions(+), 10 deletions(-) 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/models/__init__.py create mode 100644 sale_order_pos_report/models/sale_order.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 a55b79b..b62bfe9 100644 --- a/.pylintrc +++ b/.pylintrc @@ -9,13 +9,8 @@ readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/templat manifest_required_authors=KMEE manifest_required_keys=license manifest_deprecated_keys=description,active -<<<<<<< before updating -license_allowed=LGPL-3 -valid_odoo_versions=14.0 -======= license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 valid_odoo_versions=15.0 ->>>>>>> after updating [MESSAGES CONTROL] disable=all diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 2ada975..ac98777 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -8,13 +8,8 @@ readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/templat manifest_required_authors=KMEE manifest_required_keys=license manifest_deprecated_keys=description,active -<<<<<<< before updating -license_allowed=LGPL-3 -valid_odoo_versions=14.0 -======= license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 valid_odoo_versions=15.0 ->>>>>>> after updating [MESSAGES CONTROL] disable=all diff --git a/sale_order_pos_report/__init__.py b/sale_order_pos_report/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/sale_order_pos_report/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_order_pos_report/__manifest__.py b/sale_order_pos_report/__manifest__.py new file mode 100644 index 0000000..699d769 --- /dev/null +++ b/sale_order_pos_report/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024 KMEE +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Sale Order Pos Report", + "version": "15.0.1.0.0", + "license": "AGPL-3", + "author": "KMEE", + "website": "https://github.com/KMEE/kmee-odoo-addons", + "depends": [ + "l10n_br_sale", + ], + "data": [ + "report/report_saleorder_compact.xml", + "report/sale_report.xml", + ], + "demo": [], +} diff --git a/sale_order_pos_report/models/__init__.py b/sale_order_pos_report/models/__init__.py new file mode 100644 index 0000000..6aacb75 --- /dev/null +++ b/sale_order_pos_report/models/__init__.py @@ -0,0 +1 @@ +from . import sale_order diff --git a/sale_order_pos_report/models/sale_order.py b/sale_order_pos_report/models/sale_order.py new file mode 100644 index 0000000..f4c94d3 --- /dev/null +++ b/sale_order_pos_report/models/sale_order.py @@ -0,0 +1,9 @@ +# Copyright 2024 KMEE +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class SaleOrder(models.Model): + + _inherit = "sale.order" 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..dd131d9 --- /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..481a43c --- /dev/null +++ b/sale_order_pos_report/report/sale_report.xml @@ -0,0 +1,33 @@ + + + + Compact + + custom + 300 + 80 + Portrait + 3 + 3 + 3 + 3 + + 3 + 80 + + + + Quotation / Order (compact) + 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, +)