Commit fe06ea7a authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Xiaowu Zhang

erp5_invoicing: add return order

import from production
parent e5d3e724
...@@ -11,18 +11,28 @@ if context.Invoice_isAdvanced(): ...@@ -11,18 +11,28 @@ if context.Invoice_isAdvanced():
kw['explanation_portal_type'] = ['%s Order' % trade_type, kw['explanation_portal_type'] = ['%s Order' % trade_type,
'%s Invoice' % trade_type, '%s Invoice' % trade_type,
'%s Packing List' % trade_type, '%s Packing List' % trade_type,
'Returned %s Packing List' % trade_type] 'Returned %s Order' % trade_type,
'Returned %s Packing List' % trade_type,
]
else: else:
kw['explanation_portal_type'] = ['%s Order' % trade_type, kw['explanation_portal_type'] = ['%s Order' % trade_type,
'%s Invoice Transaction' % trade_type, '%s Invoice Transaction' % trade_type,
'%s Packing List' % trade_type, '%s Packing List' % trade_type,
'Returned %s Packing List' % trade_type] 'Returned %s Order' % trade_type,
'Returned %s Packing List' % trade_type,
]
kw['portal_type'] = 'Simulation Movement' kw['portal_type'] = 'Simulation Movement'
kw['delivery_uid'] = None kw['delivery_uid'] = None
kw['left_join_list'] = ['delivery_uid'] kw['left_join_list'] = ['delivery_uid']
kw['select_dict'] = dict(delivery_uid=None) kw['select_dict'] = dict(delivery_uid=None)
kw['group_by'] = ('uid',)
# We assume that all simulation movements without a delivery are in planned or auto planned state.
# By passing this, catalog should use an index on portal_type + simulation state.
# XXX actually we do not even pass auto_planned to have only 1 value, because we just do not use
# auto_planned state in this project.
kw['simulation_state'] = ('planned', )
search_kw = kw.copy() search_kw = kw.copy()
search_kw['grand_parent_simulation_state'] = ['started'] search_kw['grand_parent_simulation_state'] = ['started']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment