Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1057 Visualizzazioni

Hi everybody.


I have a button box in the upper right corner of the form view that opens to a tree view. I am opening this form view on a popup. The problem I am having is that when I click on this button box, the tree view is opened but the popup is not turned off.

I have a solution that will add an onclick action to this button box to close the popup. But I don't know how to add onclick to button in js of odoo16.


Please share with me a solution to add an onclick to the button of the form view. Or is there any solution that can close popup without adding onlick.


Thank you everyone for your help.

This is the return tree view function on python

def action_open_work_entry_compensation(self): 
self.ensure_one()
vals = {
'name': _('name'),
'domain': [('id', 'in', self.x_work_entry_ids.ids)],
'res_model': 'hr.work.entry',
'type': 'ir.actions.act_window',
'view_id': self.env.ref('hr_work_entry.hr_work_entry_view_tree').id,
'views': [(self.env.ref('hr_work_entry.hr_work_entry_view_tree').id, 'tree'), (False, 'form')],
'view_mode': 'tree,form',
}
return vals



Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
apr 25
1140
1
mag 25
1072
1
mag 25
2400
1
apr 25
3425
1
apr 25
4242