Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
12198 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mar 15
4301
3
giu 23
11337
0
apr 18
3142
0
mar 15
3329
0
mag 21
2445