Odoo 14 Community Edition
I have a customized form view of a customized model.
Inside the model and the view, I have a One2many field. As simple as
<field name="one2many_field"/>
The form view displays this field as a table (tree/list view), which contains records of its data in lines correctly.
When clicking one of the records, the system will popup a window showing the detail of the selected record in a form view window.
I have created a button along with its method to process something, and then I want to close this window when the process is done. How to do it?
I have tried
return {'type': 'ir.actions.act_window_close'}
It displays an error, which means it does not work.
Currently, clicking the button will process everything correctly but the window is still there.