[FIX] point_of_sale,sale: decorate _get_report_values with api.model

The _get_report_values method is an api.model, not an api.multi (on a purely ORM
consideration, it should have no impact on the execution on standard
code).

closes odoo/odoo#39535

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
mreficent
2019-10-31 14:42:31 +00:00
parent 5b438125d1
commit 837403e52c
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -943,6 +943,7 @@ class ReportSaleDetails(models.AbstractModel):
} for (product, price_unit, discount), qty in products_sold.items()], key=lambda l: l['product_name'])
}
@api.model
def _get_report_values(self, docids, data=None):
data = dict(data or {})
configs = self.env['pos.config'].browse(data['config_ids'])
+1
View File
@@ -150,6 +150,7 @@ class SaleOrderReportProforma(models.AbstractModel):
_name = 'report.sale.report_saleproforma'
_description = 'Proforma Report'
@api.model
def _get_report_values(self, docids, data=None):
docs = self.env['sale.order'].browse(docids)
return {