48
48
_inherit = 'sale.order.line'
49
49
_description = 'Sales Order Line'
51
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
56
!!!!! ATTENTION ATTENTION!!!!!!
57
UTP-1021: This solution is NOT stable and could be dangerous!!!!
58
need to have a proper fix for this,
59
currently we have only 3 tree views for sale.order.line
60
so I use the value in the context to identify that it is not the
61
view of wizard, but this assumption could be totally WRONG!
62
But in this current version, it works!
64
if not context.get('search_default_need_sourcing', False) and \
66
if '_terp_view_name' in context:
68
UFTP-346: HACK ON HACK UTP-1021
69
'_terp_view_name' not set if grouping
70
and we do not want special view when grouping
72
view_id = self.pool.get('ir.model.data').get_object_reference(
73
cr, uid, 'sourcing', 'sourcing_line_special_tree_view')[1]
74
return super(sale_order_line, self).fields_view_get(cr, uid, view_id,
75
view_type, context, toolbar, submenu)