flectra/addons/account/wizard/account_report_partner_ledger.py

19 lines
771 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from odoo import fields, models, _
from odoo.exceptions import UserError
class AccountPartnerLedger(models.TransientModel):
_inherit = "account.common.partner.report"
_name = "account.report.partner.ledger"
_description = "Account Partner Ledger"
amount_currency = fields.Boolean("With Currency", help="It adds the currency column on report if the currency differs from the company currency.")
reconciled = fields.Boolean('Reconciled Entries')
def _print_report(self, data):
data = self.pre_print_report(data)
data['form'].update({'reconciled': self.reconciled, 'amount_currency': self.amount_currency})
return self.env.ref('account.action_report_partnerledger').report_action(self, data=data)