- create an empty database
- install the 'sale' app
- enable user CSV import in the settings
- enable pricelists in the sale config
- Create a file pricelist.csv containing :
"active",".id","currency_id","id","name","visible_discount","company_id","type","version_id"
"True","6","EUR (€)","list3","Public Pricelist -3%","True","","sale","Public Pricelist Version -3%"
- Select this file in the import wizard of the pricelist list view.
- click on Validate
=> traceback
File "/home/dadafkas/projets/anybox/buildout.7.0/parts/openobject-server/7.0/openerp/osv/orm.py", line 1483, in _log
message=unicode(exception.args[0]) % base)
ValueError: unsupported format character ''' (0x27) at index 67
The problem comes from the '%' in the user data, being interpreted by the % formatting of the string in :
openobject-server/openerp/addons/base/ir/ir_fields.py:342
The quickfix is to replace:
value
with:
value.replace('%', '%%')
On latest 7.0 branch :
- create an empty database
- install the 'sale' app
- enable user CSV import in the settings
- enable pricelists in the sale config
- Create a file pricelist.csv containing :
"active" ,".id", "currency_ id","id" ,"name" ,"visible_ discount" ,"company_ id","type" ,"version_ id" ,"Public Pricelist -3%","True" ,"","sale" ,"Public Pricelist Version -3%"
"True","6","EUR (€)","list3"
- Select this file in the import wizard of the pricelist list view.
- click on Validate
=> traceback
File "/home/ dadafkas/ projets/ anybox/ buildout. 7.0/parts/ openobject- server/ 7.0/openerp/ osv/orm. py", line 1483, in _log unicode( exception. args[0] ) % base)
message=
ValueError: unsupported format character ''' (0x27) at index 67
The problem comes from the '%' in the user data, being interpreted by the % formatting of the string in : server/ openerp/ addons/ base/ir/ ir_fields. py:342
openobject-
The quickfix is to replace:
value
with:
value.replace('%', '%%')