Top menustrip not showing in openerp edit form

I am stuck with a problem. I want to open an edit form when a button is clicked, not on the form of the items I have selected from the dropdown.

The edit form opens, but there is no top menu ribbon that has a button save

to save changes made to the form.

The customization 'target':'inline'

in response to the button function opened the form in edit mode.

I'm not sure what I missed. Please let me know if I am missing any attribute or something.

+3


source to share


1 answer


When you talk about a dropdown, I understand that you have a field many2one

and you want to open a specific form when you click on the selected item, instead of opening the default form.

If this is what you wanted, you can do it without calling the python function, you only need to change the XML code:

<field name="your_many2one_field" context="{'form_view_ref': 'your_module.your_specific_form_xml_id',}"/>

      



Otherwise, if I didn't understand you well, try returning the following code in your python function:

return {
    'name': _('Any string you want'),
    'view_type': 'form',
    'view_mode': 'form',
    'view_id': False,
    'views': [(form_view_id, 'form'), ],
    'res_model': 'your.model',
    'type': 'ir.actions.act_window',
    'target': 'current',
    'flags': {'action_buttons': True},
}

      

0


source







All Articles