Browse Source

[FIX]product_brand_pos_report: Warning overwrite report.pos.order init

method
pull/479/head
Marc Poch 5 years ago
parent
commit
584d4cc652
  1. 2
      product_brand_pos_report/__manifest__.py
  2. 2
      product_brand_pos_report/readme/ROADMAP.rst
  3. 4
      product_brand_pos_report/reports/pos_order_report.py

2
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,

2
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.

4
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 (

Loading…
Cancel
Save