Hi everyone,
I have wizard in that if i click confirm button data should be saved and it has to able to open the tree view of different table.
<button name="test_dialog" string="Confirm" type="object" class="oe_highlight"/>
@api.multi
def test_dialog(self):
view2 = self.env.ref('asset_management.asset_view_tree')
res = self.env['assets.creation'].search([])
for record in res:
record.hide_button = True
return {
"name": _("Asset Assignment Data Confirmation"),
'tag': 'show_my_dialog',
"view_mode": "tree",
'view_id': view2.id,
'view_type': 'tree',
"res_model": 'assets.creation',
"type": 'ir.actions.act_window',
"target": "current",
}
anyone can u help me with this?
Hi,
i got ans.
@api.multi
def test_dialog(self):
res = self.env['assets.creation'].search([])
for record in res:
record.hide_button = True
return {
"name": _("Asset Details Confirmation"),
'tag': 'show_my_dialog',
'view_mode': 'tree,form',
'view_type': 'form',
"res_model": 'assets.creation',
"type": 'ir.actions.act_window',
"target": "current",
}
Thanks