From 584d4cc6520115ba2e37d1675f7b7c64b89643c9 Mon Sep 17 00:00:00 2001 From: Marc Poch Date: Thu, 23 Apr 2020 17:30:30 +0200 Subject: [PATCH] [FIX]product_brand_pos_report: Warning overwrite report.pos.order init method --- product_brand_pos_report/__manifest__.py | 2 +- product_brand_pos_report/readme/ROADMAP.rst | 2 ++ product_brand_pos_report/reports/pos_order_report.py | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 product_brand_pos_report/readme/ROADMAP.rst diff --git a/product_brand_pos_report/__manifest__.py b/product_brand_pos_report/__manifest__.py index 9d253628..6f258c72 100644 --- a/product_brand_pos_report/__manifest__.py +++ b/product_brand_pos_report/__manifest__.py @@ -9,7 +9,7 @@ 'description': 'Show product Brand in pos order report', 'category': 'Point Of Sale', 'author': 'PlanetaTIC', - 'website': 'https://www.planetatic.com', + 'website': 'https://www.github.com/OCA/pos', 'license': 'AGPL-3', 'application': False, 'installable': True, diff --git a/product_brand_pos_report/readme/ROADMAP.rst b/product_brand_pos_report/readme/ROADMAP.rst new file mode 100644 index 00000000..2cb205ce --- /dev/null +++ b/product_brand_pos_report/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +The init of report.pos.order model is fully rewritten (no calling its super). +In future versions of pos module it could be great to split init method of report.pos.order model in different methods like "_select" and "_from" to avoid overwrite the full method. diff --git a/product_brand_pos_report/reports/pos_order_report.py b/product_brand_pos_report/reports/pos_order_report.py index fe88da0a..0b11dcad 100644 --- a/product_brand_pos_report/reports/pos_order_report.py +++ b/product_brand_pos_report/reports/pos_order_report.py @@ -18,6 +18,10 @@ class PosOrderReport(models.Model): @api.model_cr def init(self): + # This method is fully rewritten and does not call its super. + # In future versions of pos module it could be great to + # split init method of report.pos.order model in different + # methods like "_select" and "_from" to avoid overwrite the full method tools.drop_view_if_exists(self._cr, 'report_pos_order') self._cr.execute(""" CREATE OR REPLACE VIEW report_pos_order AS (