Merge lp:~openerp-dev/openobject-server/6.0-opw-50559-vro into lp:openobject-server/6.0
Status: | Merged |
---|---|
Merge reported by: | Olivier Laurent (Open ERP) |
Merged at revision: | not available |
Proposed branch: | lp:~openerp-dev/openobject-server/6.0-opw-50559-vro |
Merge into: | lp:openobject-server/6.0 |
Diff against target: |
12 lines (+1/-1) 1 file modified
bin/osv/orm.py (+1/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-server/6.0-opw-50559-vro |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vinay Rana (OpenERP) (community) | Approve | ||
Olivier Laurent (Open ERP) | Pending | ||
nel | Pending | ||
Review via email: mp+83287@code.launchpad.net |
Description of the change
Hello,
Currently, one cannot update inactive records via import (case ref:50559). To regenerate the issue please follow the steps below:
1. Deactivate a product from Sales > Products > Products.
2. From the list view, apply a filter to search for the inactive product.
3. Export this record to a CSV file with the fields Database ID, Active and Name.
4. Change the Name of the product in the CSV file and attempt to import the changes.
The following traceback is encountered:
Environment Information :
System : Linux-2.
OS Name : posix
LSB Version: core-2.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-35-generic
Operating System Version : #78-Ubuntu SMP Tue Oct 11 15:27:15 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : en_IN.ISO8859-1
Python Version : 2.6.5
OpenERP-Client Version : 6.0.3
Last revision No. & ID :1914 launchpad_
Traceback (most recent call last):
File "/home/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
process_
File "/home/
data_res_id = _get_id(model_name, line[i], current_module, '.id')
File "/home/
raise Exception(
Exception: Database ID doesn't exist: product.product : 45
The import_datas method uses _get_id(), which in turn employs search(). By default, search() fetches only active records.
This fix permits the search for inactive records in _get_id to fix the issue.
Thanks
Hello ,
As per my test cases the propose merge proposal is working good and active false should be include.
Thanks.