Good morning,
I have an action that should take me to the tree view (account.invoice_tree) and then when clicking on an invoice, go to the form view (account.invoice_form)
I'm trying this code, but when I click the button, it doesn't do anything to me. At the top there is a message that indicates loading, but it stays on the same screen without redirecting me.
That may be wrong.
Thank you.
@api.multi
def action_boleta_venta4(self):
tree_view_id = self.env.ref("account.invoice_tree")
form_view_id = self.env.ref("account.invoice_form")
views = [(tree_view_id, 'tree'),(form_view_id, 'form')]
return {
"name": _('Invoice'),
"res_model": "account.invoice",
"views": views,
"view_id": False,
"view_type": "form",
"view_mode": "tree,form",
"context": {
'type': 'out_invoice',
'journal_type': 'sale',
'type_code': '08',
'default_number': 'Nota de Débito'
}
}