~openerp-commiter/openobject-addons/trunk-addons-fixes

« back to all changes in this revision

Viewing changes to sale_mrp/sale_mrp.py

  • Committer: DHS(OpenERP)
  • Date: 2010-10-26 07:16:33 UTC
  • mfrom: (4280.1.186 openobject-addons)
  • Revision ID: dhs@tinyerp.com-20101026071633-v9t8xjhwx71i4zwo
[MERGE] Merged main branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        for production in productions:
63
63
            res[production.id] = False
64
64
            if production.move_prod_id:
65
 
                parent_move_line = get_parent_move(production.move_prod_id)
 
65
                parent_move_line = get_parent_move(production.move_prod_id.id)
66
66
                if parent_move_line:
67
 
                    move = move_obj.browse(cr,uid,parent_move_line)
 
67
                    move = move_obj.browse(cr, uid, parent_move_line)
68
68
                    if field_name == 'name':
69
69
                        res[production.id] = move.sale_line_id and move.sale_line_id.order_id.name or False
70
70
                    if field_name == 'client_order_ref':
73
73
 
74
74
    _columns = {
75
75
        'sale_name': fields.function(_ref_calc, method=True, multi='sale_name', type='char', string='Sale Name', help='Indicate the name of sale order.'),
76
 
        'sale_ref': fields.function(_ref_calc, method=True, multi='sale_ref', type='char', string='Sale Reference', help='Indicate the Customer Reference from sale order.'),
 
76
        'sale_ref': fields.function(_ref_calc, method=True, multi='sale_name', type='char', string='Sale Reference', help='Indicate the Customer Reference from sale order.'),
77
77
    }
78
78
 
79
79
mrp_production()