تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1038 أدوات العرض

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



الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أبريل 25
1131
1
مايو 25
1041
1
مايو 25
2348
1
أبريل 25
3381
1
أبريل 25
4189