hi all,

 i created the module to import product data and i include two csv files becuse 
their is relationship between product and product template and following are 
the foramt of the csv files.

product_product.csv

id,x_Product_Code,x_sku,product_tmpl_id:id

485,0000000000,CAN-006-02,cat_01

511,00000111,BIS-001-01,cat_02

267,00061232200729,BIS-003-03,cat_03

268,00061232200859,BIS-003-02,cat_04

and

product_template.csv

id,name,categ_id,supply_method,standard_price,mes_type,uom_id,uom_po_id,type,procure_method,cost_method
cat_01,error,1,buy,1.00,fixed,1,1,product,make_to_order,standard
cat_02,Name(English),1,buy,1.00,fixed,1,1,product,make_to_order,standard
cat_03,12*250g Organic 
Oatcakes,1,buy,1.00,fixed,1,1,product,make_to_order,standard
cat_04,16*300g Rough 
Oatcakes,1,buy,1.00,fixed,1,1,product,make_to_order,standard

and at the terp.py 


{
  'name': 'data_tore8',
  'version': '1.0',
  'category': 'Generic Modules/Others',
  'description': "Sample module for data importation.",
  'author': 'Tiny',
  'website': 'http://www.openerp.com',
  'depends': ['base'],
  'init_xml': [
       'product_template.csv',
        'product_product.csv'
     
      
  ],
  'update_xml': [],
  'installable': True,
  'active': False,
}


but when we trying to install this we are getting this error.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 244, 
in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 73, in 
__call__
    return getattr(self, method)(*params)
  File 
"/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 
639, in execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File 
"/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 
619, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py", 
line 178, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/wizard/__init__.py", 
line 74, in execute_cr
    action_res = action(self, cr, uid, data, context)
  File 
"/usr/lib/python2.5/site-packages/openerp-server/addons/base/module/wizard/wizard_module_upgrade.py",
 line 92, in _upgrade_module
    db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/lib/python2.5/site-packages/openerp-server/pooler.py", line 62, in 
restart_pool
    return get_db_and_pool(db_name, force_demo, status, 
update_module=update_module)
  File "/usr/lib/python2.5/site-packages/openerp-server/pooler.py", line 40, in 
get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/__init__.py", 
line 728, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/__init__.py", 
line 610, in load_module_graph
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), 
idref, mode=mode)
  File "/usr/lib/python2.5/site-packages/openerp-server/tools/convert.py", line 
857, in convert_csv_import
    pool.get(model).import_data(cr, uid, fields, datas,mode, 
module,noupdate,filename=fname_partial)
AttributeError: 'NoneType' object has no attribute 'import_data'

it will be grate  if i can find where i went wrong

Thank you




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=45992#45992

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to