# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class SaleReport(models.Model):
    _inherit = 'sale.report'

    margin = fields.Float(string='Margin', readonly=True)

    def _select(self):
        select_str = super(SaleReport, self)._select()
        select_str += ", SUM(l.margin_company_currency) AS margin"
        return select_str

ab00170de27e70e7d4a739dd6c38cbc8711eb0d0
<mask token>


class SaleReport(models.Model):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class SaleReport(models.Model):
    <mask token>
    <mask token>

    def _select(self):
        select_str = super(SaleReport, self)._select()
        select_str += ', SUM(l.margin_company_currency) AS margin'
        return select_str

<mask token>


class SaleReport(models.Model):
    _inherit = 'sale.report'
    margin = fields.Float(string='Margin', readonly=True)

    def _select(self):
        select_str = super(SaleReport, self)._select()
        select_str += ', SUM(l.margin_company_currency) AS margin'
        return select_str

from odoo import fields, models


class SaleReport(models.Model):
    _inherit = 'sale.report'
    margin = fields.Float(string='Margin', readonly=True)

    def _select(self):
        select_str = super(SaleReport, self)._select()
        select_str += ', SUM(l.margin_company_currency) AS margin'
        return select_str

# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class SaleReport(models.Model):
    _inherit = 'sale.report'

    margin = fields.Float(string='Margin', readonly=True)

    def _select(self):
        select_str = super(SaleReport, self)._select()
        select_str += ", SUM(l.margin_company_currency) AS margin"
        return select_str
