Skip to content

Commit

Permalink
[TMP] account_ux: add method to access invoice document by API
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-weiss committed Jun 2, 2023
1 parent 93116ea commit df5f1c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions account_ux/models/account_move.py
Expand Up @@ -16,6 +16,11 @@ class AccountMove(models.Model):
)
other_currency = fields.Boolean(compute='_compute_other_currency')

def get_invoice_report(self):
self.ensure_one()
bin_data, __ = self.env['ir.actions.report']._render_qweb_pdf('account.account_invoices', self.id)
return bin_data, __

@api.depends('company_currency_id', 'currency_id')
def _compute_other_currency(self):
other_currency = self.filtered(lambda x: x.company_currency_id != x.currency_id)
Expand Down

0 comments on commit df5f1c9

Please sign in to comment.