flectra/addons/website_sale/models/sale_report.py
2018-01-29 12:08:45 +05:30

18 lines
509 B
Python

# -*- coding: utf-8 -*-
# Part of flectra. See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models
class SaleReport(models.Model):
_inherit = "sale.report"
website_id = fields.Many2one('website', 'Website', readonly=True)
def _select(self):
return \
super(SaleReport, self)._select() + ", s.website_id as website_id"
def _group_by(self):
res = super(SaleReport, self)._group_by()
return res + ',s.website_id'