[7.0] Unable to import products

Bug #1080551 reported by Li Wee, Ong
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP R&D Addons Team 2
openerp-core (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In 6.1, I was able to import products ...
But it does not seem to be working in 7.0
Using the most basic upload file, I get the following error

OpenERP Server Error
Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 192, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1235, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1197, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 105, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 91, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 361, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 596, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base_import/models.py", line 320, in do
    cr, uid, import_fields, data, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 1363, in load
    **PGERROR_TO_OE[e.pgcode](self, fg, info, e)))
  File "/opt/openerp/server/openerp/osv/orm.py", line 5221, in convert_pgerror_23502
    field_name = m.group('field')
AttributeError: 'NoneType' object has no attribute 'group'

Related branches

Revision history for this message
Li Wee, Ong (liwee-ong) wrote :
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

I have tested your issue with following build:
(Build 25178)
   - server (4569)
   - addons (8073)
   - web (3453)

But I didn't face any problem while importing a csv file. So, Would you please provide more information about this report ? And notify us If you face any problem.

Thank you and waiting for your reply..!!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Li Wee, Ong (liwee-ong) wrote :

Hi,

Thanks for looking into the issue.
Could you take a look at the video again.
At the 26 sec mark, the text above OPTIO is "Don't Import".
Please try with "name" instead.
Thank you

Revision history for this message
Li Wee, Ong (liwee-ong) wrote :

I just realised that 2 "name" options appear while searching for the name field.
Choosing the first name gives you the error, choosing the 2nd name is ok.

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

As per your comment #5 I have checked your issue. And I have faced same problem name field.
So, I am confirming this issue.

Thank you..!!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Li Wee, Ong ,

Currently I did not face any traceback like your's.But I have faced "Name" problem..
So we can confirm this issue only for comment #5.

As you import name field with product tree view.where name field from object
product.template and product.product has related field "name_template" with product.template
and same label as "Name".So confusion occure due to label,I request to
RD team to take approprite decision and make it user friendly .

Thanks.

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Nimesh Contractor(Open ERP) (nco-openerp) wrote :

Hello,

          It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1080551-nco branch.
          Revno: 8294
          Revision ID: <email address hidden>

          It will be available in trunk soon.

Thanks,
  NCO.

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
sam (samozaf) wrote :

Hello,
There is a same problem for the supplier external identifier and we get the same error messages, but I did'nt find any work around for it.
In fact without the suplier information and selecting second "Name" in name and name_template we can import the products.

Thanks,
 SAM

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openerp-core (Ubuntu):
status: New → Confirmed
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.