Sample Input Instruction as Dictionary
Following show very simple example of the dictionary construct.
Normally, this will be within templates.xml file within addons.
{
'__EXPORT__': {
'sale_order': { # sheet can be name (string) or index (integer)
'_HEAD_': {
'B2': 'partner_id.display_name${value or ""}#{align=left;style=text}',
'B3': 'name${value or ""}#{align=left;style=text}',
},
'line_ids': { # prefix with _CONT_ to continue rows from previous row field
'A6': 'product_id.display_name${value or ""}#{style=text}',
'C6': 'product_uom_qty${value or 0}#{style=number}',
'E6': 'price_unit${value or 0}#{style=number}',
'G6': 'price_subtotal${value or 0}#{style=number}',
},
},
},
'__IMPORT__': {
'sale_order': { # sheet can be name (string) or index (integer)
'order_line': { # prefix with _NODEL_ to not delete rows before import
'A6': 'product_id',
'C6': 'product_uom_qty',
'E6': 'price_unit${value > 0 and value or 0}',
},
},
},
'__POST_IMPORT__': '${object.post_import_do_something()}',
}