[FIX] ir.ui.view: creating custom views in backend did not compute view type
When creating new records in backend all field values are sent to the server, including empty fields.
This commit is contained in:
@@ -178,7 +178,7 @@ class view(osv.osv):
|
||||
cr.execute('CREATE INDEX ir_ui_view_model_type_inherit_id ON ir_ui_view (model, inherit_id)')
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
if 'type' not in values:
|
||||
if not values.get('type'):
|
||||
if values.get('inherit_id'):
|
||||
values['type'] = self.browse(cr, uid, values['inherit_id'], context).type
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user