not able to import customer due to payable an receivable fields

Bug #861348 reported by Aline (OpenERP)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Medium
OpenERP's Framework R&D

Bug Description

in web client :

- export customers from a db with demo data (export also fields payable and receivable account)
- import those data in a same db without demo data
-> all data seems ok

Click import :

[2011-09-28 12:08:29,167][?] INFO:werkzeug:127.0.0.1 - - [28/Sep/2011 12:08:29] "POST /web/import/detect_data HTTP/1.1" 200 -
[2011-09-28 12:08:30,756][?] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 119, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 173, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/aline/openerp/server/trunk/openerp/osv/orm.py", line 1335, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/aline/openerp/server/trunk/openerp/osv/orm.py", line 1294, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/aline/openerp/server/trunk/openerp/osv/orm.py", line 1188, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/home/aline/openerp/server/trunk/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/home/aline/openerp/server/trunk/openerp/tools/cache.py", line 46, in lookup
    value = d[args] = self.method(self2, cr, *args)
  File "/home/aline/openerp/server/trunk/openerp/addons/base/ir/ir_model.py", line 621, in _get_id
    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: .res_partner_525

description: updated
description: updated
Changed in openerp-web:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello Aline,

I reproduce this bug following way but this bug generate from server side. I test this bug in gtk-client and gtk-client also generate the traceback from server side.
-> Create new DB with demo data and export customers data( export field :- id, property_account_payable, property_account_receivable, city, name, database id)
-> If import this file in same db then it's working well. But create new DB with out demo data and import same file in customers model.

If i export data with demo data and then same file import in with out demo data db then id reference not available in database. so it generate traceback.

If i missing something then correct me.

Thanks,

affects: openerp-web → openobject-server
Revision history for this message
Aline (OpenERP) (apr-tinyerp) wrote :

I have changed the project of this bug. Can you assign it to the good team ?

Changed in openobject-server:
importance: Medium → Low
importance: Low → High
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

As per the above steps I have faced the following traceback.Because record didn't found for account payable and account receivable (many2one) field and we have import data with those records reference.

Per per my "Opinion" it should gives a message for doesn't found record instead of traceback.

Traceback (most recent call last):
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 120, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 163, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/amp/workspace/trunk6/server/openerp/osv/orm.py", line 1376, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/amp/workspace/trunk6/server/openerp/osv/orm.py", line 1335, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/amp/workspace/trunk6/server/openerp/osv/orm.py", line 1238, in _get_id
    raise ValueError('No record found for %s' % (id,))
ValueError: No record found for X1111 Creditors - (test)

Thanks.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: High → Medium
Revision history for this message
Aline (OpenERP) (apr-tinyerp) wrote :

any way, the erro is useless ! read this bug : https://bugs.launchpad.net/openerp-web/+bug/871625

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.