Community: Framework mailing list archives

Re: Configuration settings - creates a new record every time.

Maxim Litnitskiy
- 09/25/2014 20:25:08
I left playing with res.config.settings seems it's for module configurations.

What I am trying to do now is just to have one record of confoguration model.
For that I created a form view and action with with_mode=form.
The only thing I am trying to get is to open it with res_id = 1.
But I cannot do it.
When I click in menuitem my action always opens in create mode.
I am trying to overwrite fields_view_get, but no use.

def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
        res = super(server_settings, self).fields_view_get(cr, uid, view_type=view_type, view_id=view_id, context=context, toolbar=toolbar, submenu=submenu)
        print res
        res['res_id'] = 1
        return res

Can anyone help?