Skip to Content
Menu
This question has been flagged

By the definition that I found in documentation for openerp 6:


Upstream Traceability

It runs from the raw materials received from the supplier and follows the chain to the finished products delivered to customers. (Note that the name is confusing - this would often be considered a downstream direction. Think of it as Where Used.)


Downstream Traceability

It follows the product in the other direction, from customer to the different suppliers of raw material. (Note that the name is confusing - this would often be considered an upstream direction. Think of it as Where Supplied.)


In version 7 both buttons do the same thing and by looking at the code and can't see how could they do anything different.

def action_traceability(self, cr, uid, ids, context=None):
""" It traces the information of a product
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: List of IDs selected
@param context: A standard dictionary
@return: A dictionary of values
"""
lot_id = ids
if context is None:
context = {}
type1 = context.get('type', 'move_history_ids2')
field = context.get('field', 'tracking_id')
obj = self.pool.get('stock.move')
ids = obj.search(cr, uid, [(field, 'in',lot_id)])
cr.execute('select id from ir_ui_view where model=%s and field_parent=%s and type=%s', ('stock.move', type1, 'tree'))
view_ids = cr.fetchone()
view_id = view_ids and view_ids[0] or False
import pdb;pdb.set_trace()
value = {
'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
'name': ((type1=='move_history_ids2') and _('Upstream Traceability')) or _('Downstream Traceability'),
'view_mode': 'tree',
'view_type': 'tree',
'res_model': 'stock.move',
'field_parent': type1,
'view_id': (view_id,'View'),
'type': 'ir.actions.act_window',
'nodestroy':True,
}
return value


Am I missing something or is it not working as it should be?

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 15
3518
3
Jun 23
9168
0
Apr 18
2204
0
Mar 15
2568
0
May 21
1466