From ab30b2221072dfdb1ef8e8364ab731a411a62db8 Mon Sep 17 00:00:00 2001 From: momegahed Date: Thu, 7 Jul 2022 14:56:43 +0000 Subject: [PATCH] [ADD] l10n_gcc_invoice_stock_account: SN/LN is not on invoice Steps to reproduce: 1- create a company in saudi arabia 2- install l10n_sa and l10n_gcc_invoice 3- enable LN/SN on invoice from settings 4- configure a product with lot number 5- make a SO with that product 6- create an invoice and post it 7- print the invoice 8- Lot number information is missing on the invoice Bug: the implementation in https://github.com/odoo/odoo/blob/15.0/addons/l10n_gcc_invoice/views/report_invoice.xml#L11-L16 is ignoring the inheritance in https://github.com/odoo/odoo/blob/15.0/addons/stock_account/views/report_invoice.xml so any view inheriting "account.report_invoice_document" will not be called. For stable, it can be solved with a bridge module. For Master or for future versions, I think the implementation in https://github.com/odoo/odoo/blob/15.0/addons/l10n_gcc_invoice/views/report_invoice.xml#L18 should be inheriting "account_report_invoice_document" instead of overriding it. this will help eliminate the need for such bridge modules in the future and reduce redundancy Fix: Create a bridge module between `l10n_gcc_invoice` and `stock_account` OPW-2893130 closes odoo/odoo#96933 X-original-commit: 0d781b636f5fd19408e858323e83c223451adad6 Signed-off-by: Josse Colpaert Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) --- .../__init__.py | 2 + .../__manifest__.py | 20 +++++++ .../views/report_invoice.xml | 55 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 addons/l10n_gcc_invoice_stock_account/__init__.py create mode 100644 addons/l10n_gcc_invoice_stock_account/__manifest__.py create mode 100644 addons/l10n_gcc_invoice_stock_account/views/report_invoice.xml diff --git a/addons/l10n_gcc_invoice_stock_account/__init__.py b/addons/l10n_gcc_invoice_stock_account/__init__.py new file mode 100644 index 00000000000..67dee8c60db --- /dev/null +++ b/addons/l10n_gcc_invoice_stock_account/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/addons/l10n_gcc_invoice_stock_account/__manifest__.py b/addons/l10n_gcc_invoice_stock_account/__manifest__.py new file mode 100644 index 00000000000..0402624f54b --- /dev/null +++ b/addons/l10n_gcc_invoice_stock_account/__manifest__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +{ + 'name': "Gulf Cooperation Council WMS Accounting", + 'version': '1.0', + 'description': """ + Arabic/English for GCC + lot/SN numbers + """, + 'author': "Odoo S.A.", + 'website': "https://www.odoo.com", + 'category': 'Accounting/Localizations', + + 'depends': ['l10n_gcc_invoice', 'stock_account'], + + 'data': [ + 'views/report_invoice.xml', + ], + 'auto_install': True, + 'license': 'LGPL-3', +} diff --git a/addons/l10n_gcc_invoice_stock_account/views/report_invoice.xml b/addons/l10n_gcc_invoice_stock_account/views/report_invoice.xml new file mode 100644 index 00000000000..b95146192fd --- /dev/null +++ b/addons/l10n_gcc_invoice_stock_account/views/report_invoice.xml @@ -0,0 +1,55 @@ + + + + \ No newline at end of file