Skip to content

Commit

Permalink
[FIX] yaml tests: Allow use of context inside context evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
tbe-odoo committed Mar 1, 2018
1 parent fd032df commit d4ec6b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openerp/tools/yaml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def process(command):
ctx['field_parent'] = fg[field_name]['relation_field']
if default and field_elem.get('context'):
ctx.update(eval(field_elem.get('context'),
globals_dict={'parent': dotdict(parent)},
globals_dict={'parent': dotdict(parent), 'context': ctx},
locals_dict=record_dict))

field_value = self._eval_field(model, field_name, fields[field_name], form_view, parent=record_dict, default=default, context=ctx)
Expand Down

0 comments on commit d4ec6b7

Please sign in to comment.