~unifield-team/unifield-wm/us-927

« back to all changes in this revision

Viewing changes to consumption_calculation/consumption_calculation.py

  • Committer: Olivier DOSSMANN
  • Date: 2013-03-22 13:35:49 UTC
  • mto: This revision was merged to the branch mainline in revision 1589.
  • Revision ID: od@tempo-consulting.fr-20130322133549-vnmjtnuysyee7q3e
UF-1894 [MOVE] msf_supply_doc_import to msf_doc_import directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
        if isinstance(ids, (int, long)):
474
474
            ids = [ids]
475
475
        obj_data = self.pool.get('ir.model.data')
476
 
        product_tbd = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'product_tbd')[1]
477
 
        uom_tbd = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]
 
476
        product_tbd = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'product_tbd')[1]
 
477
        uom_tbd = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]
478
478
 
479
479
        for var in self.browse(cr, uid, ids, context=context):
480
480
            # we check the lines that need to be fixed
683
683
            ids = [ids]
684
684
        if not context.get('import_in_progress') and not context.get('button'):
685
685
            obj_data = self.pool.get('ir.model.data')
686
 
            tbd_uom = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]
687
 
            tbd_product = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'product_tbd')[1]
 
686
            tbd_uom = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]
 
687
            tbd_product = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'product_tbd')[1]
688
688
            message = ''
689
689
            if vals.get('uom_id'):
690
690
                if vals.get('uom_id') == tbd_uom:
1209
1209
            ids = [ids]
1210
1210
        if not context.get('import_in_progress') and not context.get('button'):
1211
1211
            obj_data = self.pool.get('ir.model.data')
1212
 
            tbd_product = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'product_tbd')[1]
 
1212
            tbd_product = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'product_tbd')[1]
1213
1213
            if vals.get('name'):
1214
1214
                if vals.get('name') == tbd_product:
1215
1215
                    raise osv.except_osv(_('Warning !'), _('You have to define a valid product, i.e. not "To be define".'))