Skip to content

Commit

Permalink
[BKP] account_ux: add get_invoice_report() from v16 to process pdf re…
Browse files Browse the repository at this point in the history
…ports

closes #443

Signed-off-by: augusto-weiss <awe@adhoc.com.ar>
  • Loading branch information
ALopez-Adhoc committed Aug 23, 2023
1 parent b46226b commit 17ebb20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion account_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Account UX',
'version': "15.0.1.9.0",
'version': "15.0.2.9.0",
'category': 'Accounting',
'sequence': 14,
'summary': '',
Expand Down
5 changes: 5 additions & 0 deletions account_ux/models/account_move.py
Expand Up @@ -17,6 +17,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.ref('account.account_invoices')._render_qweb_pdf([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 17ebb20

Please sign in to comment.