diff --git a/bin/tools/test_reports.py b/bin/tools/test_reports.py index 0e5d4189385..931ce74a1ff 100644 --- a/bin/tools/test_reports.py +++ b/bin/tools/test_reports.py @@ -196,6 +196,15 @@ def try_report_action(cr, uid, action_id, active_model=None, active_ids=None, if wiz_data: view_data.update(wiz_data) log.debug("View data is: %r", view_data) + + for fk, field in view_res.get('fields',{}).items(): + # Default fields returns list of int, while at create() + # we need to send a [(6,0,[int,..])] + if field['type'] in ('one2many', 'many2many') \ + and view_data.get(fk, False) \ + and isinstance(view_data[fk], list) \ + and not isinstance(view_data[fk][0], tuple) : + view_data[fk] = [(6, 0, view_data[fk])] action_name = action.get('name') try: