跳至內容
選單
此問題已被標幟
4334 瀏覽次數

I create a simple module and I create a CSV file to modify res.currency records this is the content of my csv file

res.currency.csv
id,name,active,rounding,accuracy
base.USD,USD,True,0.01,6
base.EUR,EUR,True,0.01,6
base.AED,AED,False,0.01,4
base.AFN,AFN,False,0.01,4
...

I try to set active=false to all currencies except some, and do some other changes

I also add the file in __openerp__.py file 'update_xml': ['data/res.currency.csv',...],

but when I install the module, never loads the res.currency.csv file

I did this changes to test.
- to my csv file I add " (double quotes) to all values and headers
- I change 'update_xml' for 'data' on my __openerp__.py file
- In OpenERP -> Settings -> Configuration -> General Settings -> check Allow users to import data from CSV files
none of the changes worked :(

in OpenERP 6.1 this works fine, but in OpenERP 7.0 not works. am I doing something wrong?? or is it a problem of the OpenERP 7.0 version?

thanks in advance. naitsir

頭像
捨棄

Did you make sure to restart the server and press the upgrade button each time you made a change?

作者

yes, also when I try a new install

作者

I will try to create another module and add one by one my csv and xml files

作者

I think I identified the problem, there is a problem with my other xml and csv files, I will load this file one by one to see where is the problem.

another question related to update data from xml or csv files

when I install or update a module csv file always change the values in the DB in xml file we can add noupdate="0" attribute in 'data' tag to always update the data in the DB. is there a way to only modify the data only when a module is installed?? (not when a module is updated)

相關帖文 回覆 瀏覽次數 活動
3
3月 15
6475
1
4月 22
6853
1
3月 15
9463
0
3月 15
4304
0
12月 24
9443