[FIX] fields_view_get super arguments
The context argument needs to be passed as positional argument to avoid issues when surcharging fields_view_get Closes #7933
This commit is contained in:
parent
6b98819948
commit
675d09c005
|
@ -94,7 +94,7 @@ class report_aged_receivable(osv.osv):
|
|||
self._init(cr, user)
|
||||
self.called = True # To make sure that init doesn't get called multiple times
|
||||
|
||||
res = super(report_aged_receivable, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
res = super(report_aged_receivable, self).fields_view_get(cr, user, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
return res
|
||||
|
||||
def _calc_bal(self, cr, uid, ids, name, args, context=None):
|
||||
|
|
|
@ -168,7 +168,7 @@ class account_analytic_plan_instance(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
wiz_id = self.pool.get('ir.actions.act_window').search(cr, uid, [("name","=","analytic.plan.create.model.action")], context=context)
|
||||
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
analytic_plan_obj = self.pool.get('account.analytic.plan')
|
||||
if (res['type']=='form'):
|
||||
|
@ -360,7 +360,7 @@ class account_move_line(osv.osv):
|
|||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
return result
|
||||
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
|
|||
|
||||
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)
|
||||
res = super(ir_model_fields_anonymize_wizard, self).fields_view_get(cr, uid, view_id, view_type, context=context, *args, **kwargs)
|
||||
|
||||
eview = etree.fromstring(res['arch'])
|
||||
placeholder = eview.xpath("group[@name='placeholder1']")
|
||||
|
|
|
@ -164,7 +164,7 @@ class crm_lead(format_address, osv.osv):
|
|||
action = self.get_formview_action(cr, user, context['opportunity_id'], context=context)
|
||||
if action.get('views') and any(view_id for view_id in action['views'] if view_id[1] == view_type):
|
||||
view_id = next(view_id[0] for view_id in action['views'] if view_id[1] == view_type)
|
||||
res = super(crm_lead, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
res = super(crm_lead, self).fields_view_get(cr, user, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
if view_type == 'form':
|
||||
res['arch'] = self.fields_view_get_address(cr, user, res['arch'], context=context)
|
||||
return res
|
||||
|
|
|
@ -456,7 +456,7 @@ class Product(osv.osv):
|
|||
view_id = dict_model['membership_products_form']
|
||||
else:
|
||||
view_id = dict_model['membership_products_tree']
|
||||
return super(Product,self).fields_view_get(cr, user, view_id, view_type, context, toolbar, submenu)
|
||||
return super(Product,self).fields_view_get(cr, user, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
'''Product'''
|
||||
_inherit = 'product.template'
|
||||
|
|
|
@ -844,7 +844,7 @@ class task(osv.osv):
|
|||
users_obj = self.pool.get('res.users')
|
||||
if context is None: context = {}
|
||||
|
||||
res = super(task, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
|
||||
res = super(task, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
# read uom as admin to avoid access rights issues, e.g. for portal/share users,
|
||||
# this should be safe (no context passed to avoid side-effects)
|
||||
|
|
|
@ -91,7 +91,7 @@ class project_task_delegate(osv.osv_memory):
|
|||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
res = super(project_task_delegate, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
|
||||
res = super(project_task_delegate, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
users_pool = self.pool.get('res.users')
|
||||
obj_tm = users_pool.browse(cr, uid, uid, context=context).company_id.project_time_mode_id
|
||||
tm = obj_tm and obj_tm.name or 'Hours'
|
||||
|
|
Loading…
Reference in New Issue