콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1049 화면

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
4월 25
1139
1
5월 25
1063
1
5월 25
2384
1
4월 25
3418
1
4월 25
4224