mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-26 23:52:05 +00:00
28 lines
832 B
Python
28 lines
832 B
Python
|
# Copyright 2021 Akretion France (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 flectra import fields, models
|
||
|
|
||
|
|
||
|
class SaleReport(models.Model):
|
||
|
_inherit = "sale.report"
|
||
|
|
||
|
payment_mode_id = fields.Many2one(
|
||
|
"account.payment.mode",
|
||
|
string="Payment Mode",
|
||
|
readonly=True,
|
||
|
)
|
||
|
|
||
|
def _query(self, with_clause="", fields=None, groupby="", from_clause=""):
|
||
|
if fields is None:
|
||
|
fields = {}
|
||
|
fields["payment_mode_id"] = ", s.payment_mode_id as payment_mode_id"
|
||
|
groupby += ", s.payment_mode_id"
|
||
|
return super()._query(
|
||
|
with_clause=with_clause,
|
||
|
fields=fields,
|
||
|
groupby=groupby,
|
||
|
from_clause=from_clause,
|
||
|
)
|