Good afternoon, I have an action that shows me the tree view of the invoices, shows me the values correctly, but when I click on an invoice it shows nothing, it does nothing. The create button also does not perform any action.
also the name of the header appears as: Accounting Dashboard / Unnamed I should say: Accounting Dashboard / Invoice Please your support.
class AccountJournal(models.Model):
_inherit = "account.journal"
@api.multi
def action_boleta_venta2(self):
ref = request.env.ref("account.invoice_tree")
#print( str(self.number[0:4]) + " - " + str(int(self.number[5:len(self.number)])))
return {
"type": "ir.actions.act_window",
"res_model": "account.invoice",
"target": "self",
"view_id": ref.id,
"view_type": "form",
"view_mode": "tree",
"context": {
'type': 'out_invoice',
'journal_type': 'sale',
'type_code': '08',
'default_number': 'Nota de Débito',
'name':_('Invoice')
},
"domain": [('type', 'in', ('out_invoice', 'out_refund')),('state', '=', 'draft')]
}
if i change to view_mode = "tree, form" gives me the error:
Got view modes ['tree', 'form'] and view id 458 for action {'context': {'type_code': '08', 'journal_type': 'sale', 'type': 'out_invoice', 'name ':' Invoice ',' default_number ':' Debit Note '},' target ':' self ',' type ':' ir.actions.act_window ',' domain ': [(' type ',' in ' , ('out_invoice', 'out_refund')), ('state', '=', 'draft')], 'flags': {},' view_mode ':' tree, form ',' res_model ':' account .invoice ',' view_type ':' form ',' view_id ': 458}
Hope this will helps you to customize odoo modules: https://www.scoop.it/t/learn-openerp