diff --git a/addons/accounting_pdf_reports/wizard/account_partner_ledger.py b/addons/accounting_pdf_reports/wizard/account_partner_ledger.py new file mode 100644 index 0000000..1629d18 --- /dev/null +++ b/addons/accounting_pdf_reports/wizard/account_partner_ledger.py @@ -0,0 +1,24 @@ +from odoo import fields, models, api, _ + + +class AccountPartnerLedger(models.TransientModel): + _name = "account.report.partner.ledger" + _inherit = "account.common.partner.report" + _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 _get_report_data(self, data): + data = self.pre_print_report(data) + data['form'].update({'reconciled': self.reconciled, + 'amount_currency': self.amount_currency}) + return data + + def _print_report(self, data): + data = self._get_report_data(data) + return self.env.ref('accounting_pdf_reports.action_report_partnerledger').with_context(landscape=True).\ + report_action(self, data=data)