Exemplo n.º 1
0
 def import_all(self):
     importexcel_func(self, import_key=u'Department')
     importexcel_func(self, import_key=u'Partner')
     importexcel_func(self, import_key=u'location partner')
     importexcel_func(self, import_key=u'Loại sự cố, sự vụ')
     #         importexcel_func(self, import_key=u'thuebaoline')
     importexcel_func(self, import_key=u'categ')
     return True
Exemplo n.º 2
0
 def import_file(self):
     importexcel_func(self,
                      key=u'stock.inventory.line.tong.hop.ltk.dp.tti.dp',
                      import_key='key_ltk',
                      gen_model_dict_kargs={
                          'cach_tim_location_goc':
                          'not_find_origin_location_by_column_named_tram'
                      })
     if self.state not in ('done', 'cancel'):
         vals = {'state': 'confirm', 'date': fields.Datetime.now()}
         self.write(vals)
Exemplo n.º 3
0
def check_imported_file_sml(dl_obj, is_in_transfer = None):
    workbook = importexcel_func(dl_obj,
                             import_key=u'stock.inventory.line.tong.hop.ltk.dp.tti.dp',
#                              key_tram='key',
                             check_file=True,
                             is_in_transfer = True
                             )
    filename = 'check_file_of_%s-%s'%(dl_obj.filename,dl_obj.id)
    name = "%s%s" % (filename, '.xls')
    return workbook,name
Exemplo n.º 4
0
 def importexcel(self):
     importexcel_func(self)
     return True
Exemplo n.º 5
0
 def import_file(self):
     importexcel_func(self,
                    import_key=u'stock.inventory.line.tong.hop.ltk.dp.tti.dp',
                    key_tram='sml')
Exemplo n.º 6
0
def importexcel_checkfile(dl_obj):
    workbook = importexcel_func(dl_obj, check_file=True)
    filename = 'check_file_of_%s-%s' % (dl_obj.filename, dl_obj.id)
    name = "%s%s" % (filename, '.xls')
    return workbook, name