[IMP] Base: Forwarding missing model context
This change allows us to get the model context in order to know if we have a lead or an opportunity which is important to display the right word.
This commit is contained in:
@@ -196,7 +196,12 @@ class IrActionsActWindow(models.Model):
|
||||
for values in result:
|
||||
model = values.get('res_model')
|
||||
if model in self.env:
|
||||
values['help'] = self.env[model].get_empty_list_help(values.get('help', ""))
|
||||
eval_ctx = dict(self.env.context)
|
||||
try:
|
||||
ctx = safe_eval(values.get('context', '{}'), eval_ctx)
|
||||
except:
|
||||
ctx = {}
|
||||
values['help'] = self.with_context(**ctx).env[model].get_empty_list_help(values.get('help', ''))
|
||||
return result
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user