Fall 5430 Bugfix mit context
parent
bedc4e6bd8
commit
51f0f46ea7
|
|
@ -134,8 +134,6 @@ class AccountInvoice(models.Model):
|
|||
intrastrat_not_set = True
|
||||
if intrastrat_not_set:
|
||||
action = self.env.ref('dp_custom.action_wizard_confirm_print_invoice').read()[0]
|
||||
action['context'] = '{"default_info": "'+info+'"}'
|
||||
action['context'] = str({"default_info": info, "invoice_ids": self.env.context.get("active_ids")})
|
||||
return action
|
||||
return self.env.ref('dp_reports_account.account_invoices_with_intrastat').report_action(self)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class ConfirmPrintInvoice(models.TransientModel):
|
|||
|
||||
def print_invoice(self):
|
||||
self.ensure_one()
|
||||
invoice = self.env['account.invoice'].browse(self.env.context.get('active_ids', []))
|
||||
invoice = self.env['account.invoice'].browse(self.env.context.get('invoice_ids', []))
|
||||
if not invoice:
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
return self.env.ref('dp_reports_account.account_invoices_with_intrastat').report_action(invoice)
|
||||
|
|
|
|||
Loading…
Reference in New Issue