[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:
Olivier Dony
2014-10-07 13:12:38 +02:00
parent f305b9e95b
commit 4202ea7c19
+1 -1
View File
@@ -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: