diff --git a/pos_custom_report_session/__init__.py b/pos_custom_report_session/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/pos_custom_report_session/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/pos_custom_report_session/__manifest__.py b/pos_custom_report_session/__manifest__.py new file mode 100644 index 000000000..8df5711bd --- /dev/null +++ b/pos_custom_report_session/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2023 Akretion (https://www.akretion.com). +# @author Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "POS Custom Report Session", + "version": "14.0.1.0.0", + "category": "Point Of Sale", + "author": "Akretion", + "website": "https://github.com/akretion/ak-odoo-incubator", + "license": "AGPL-3", + "depends": [ + "pos_report_session_summary", + "pos_sale_order", + ], + "data": [ + "views/report_session_summary.xml", + ], + "qweb": [], + "installable": True, +} diff --git a/pos_custom_report_session/models/__init__.py b/pos_custom_report_session/models/__init__.py new file mode 100644 index 000000000..eb94fb45f --- /dev/null +++ b/pos_custom_report_session/models/__init__.py @@ -0,0 +1,2 @@ +from . import account_statement_line +from . import pos_payment diff --git a/pos_custom_report_session/models/account_statement_line.py b/pos_custom_report_session/models/account_statement_line.py new file mode 100644 index 000000000..51a8931d0 --- /dev/null +++ b/pos_custom_report_session/models/account_statement_line.py @@ -0,0 +1,13 @@ +# Copyright 2023 Akretion (https://www.akretion.com). +# @author Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountBankStatementLine(models.Model): + _inherit = "account.bank.statement.line" + + pos_payment_ids = fields.One2many( + "pos.payment", "statement_line_id", "Pos Payments" + ) diff --git a/pos_custom_report_session/models/pos_payment.py b/pos_custom_report_session/models/pos_payment.py new file mode 100644 index 000000000..4b9959a62 --- /dev/null +++ b/pos_custom_report_session/models/pos_payment.py @@ -0,0 +1,11 @@ +# Copyright 2023 Akretion (https://www.akretion.com). +# @author Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class PosPayment(models.Model): + _inherit = "pos.payment" + + statement_line_id = fields.Many2one("account.bank.statement.line", "Statement Line") diff --git a/pos_custom_report_session/views/report_session_summary.xml b/pos_custom_report_session/views/report_session_summary.xml new file mode 100644 index 000000000..890c7d1fe --- /dev/null +++ b/pos_custom_report_session/views/report_session_summary.xml @@ -0,0 +1,55 @@ + + + + diff --git a/setup/pos_custom_report_session/odoo/addons/pos_custom_report_session b/setup/pos_custom_report_session/odoo/addons/pos_custom_report_session new file mode 120000 index 000000000..85144ac64 --- /dev/null +++ b/setup/pos_custom_report_session/odoo/addons/pos_custom_report_session @@ -0,0 +1 @@ +../../../../pos_custom_report_session \ No newline at end of file diff --git a/setup/pos_custom_report_session/setup.py b/setup/pos_custom_report_session/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/pos_custom_report_session/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)