ir.model: mutable argument fix

bzr revid: p_christ@hol.gr-20101123154032-tuoe1aiy9wpnjp2y
This commit is contained in:
P. Christeas
2010-11-23 17:40:32 +02:00
parent 04c05faf9b
commit a62f0bede4
+3 -1
View File
@@ -75,10 +75,12 @@ class ir_model(osv.osv):
fnct_search=_search_osv_memory,
help="Indicates whether this object model lives in memory only, i.e. is not persisted (osv.osv_memory)")
}
_defaults = {
'model': lambda *a: 'x_',
'state': lambda self,cr,uid,ctx={}: (ctx and ctx.get('manual',False)) and 'manual' or 'base',
'state': lambda self,cr,uid,ctx=None: (ctx and ctx.get('manual',False)) and 'manual' or 'base',
}
def _check_model_name(self, cr, uid, ids):
for model in self.browse(cr, uid, ids):
if model.state=='manual':