[FIX] create context if None
bzr revid: olt@tinyerp.com-20120920090813-pxb25r4g1zo03jwu
This commit is contained in:
@@ -68,8 +68,10 @@ class ir_model_fields_anonymization(osv.osv):
|
||||
return state
|
||||
|
||||
def _check_write(self, cr, uid, context=None):
|
||||
# check that the field is created from the menu and not from an database update
|
||||
# otherwise the database update can crash:
|
||||
"""check that the field is created from the menu and not from an database update
|
||||
otherwise the database update can crash:"""
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
if context.get('manual'):
|
||||
global_state = self._get_global_state(cr, uid, context=context)
|
||||
@@ -295,10 +297,10 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, *args, **kwargs):
|
||||
state = self.pool.get('ir.model.fields.anonymization')._get_global_state(cr, uid, context=context)
|
||||
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
||||
step = context.get('step', 'new_window')
|
||||
|
||||
res = super(ir_model_fields_anonymize_wizard, self).fields_view_get(cr, uid, view_id, view_type, context, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user