164
164
cost_price = product_obj.browse(cr, uid, [default_code])[0].standard_price
166
166
msg = _('The Product Code has to be a string.')
167
if not default_code or default_code == obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'product_tbd')[1]:
167
if not default_code or default_code == obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'product_tbd')[1]:
168
168
comment += _(' Product Code to be defined')
169
169
error_list.append(msg or _('The Product\'s Code has to be defined'))
170
170
# if the cell is empty
236
236
error_list.append(msg or _('The UOM imported was not in the same category than the UOM of the product so we took the UOM of the product instead.'))
238
238
msg = _('The UOM Name has to be a string.')
239
if not uom_id or uom_id == obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]:
239
if not uom_id or uom_id == obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]:
240
240
error_list.append(msg or _('The UOM Name was not valid.'))
241
uom_id = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]
241
uom_id = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]
243
243
error_list.append(msg or _('The UOM Name was empty.'))
245
245
uom_id = product_obj.browse(cr, uid, [default_code])[0].uom_id.id
247
uom_id = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]
247
uom_id = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]
248
248
# if the cell is empty
249
249
except IndexError, e:
250
250
error_list.append(_('The UOM Name was empty. (Details: %s)') % e)
252
252
uom_id = product_obj.browse(cr, uid, [default_code])[0].uom_id.id
254
uom_id = obj_data.get_object_reference(cr, uid, 'msf_supply_doc_import', 'uom_tbd')[1]
254
uom_id = obj_data.get_object_reference(cr, uid, 'msf_doc_import', 'uom_tbd')[1]
255
255
return {'uom_id': uom_id, 'error_list': error_list}