Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1078 Widoki

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



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
kwi 25
1145
1
maj 25
1102
1
maj 25
2441
1
kwi 25
3462
1
kwi 25
4286