跳至内容
菜单
此问题已终结
1 回复
3625 查看

Hi,

I've been playing with OpenERP for a while, I learned some basic of OpenERP, but I found one thing that keeps me puzzled for a while.
You can make security files, and it's perfectly clear and easy to use once you lear them.
But, also, you can "manually"change user tights from within OpenERP, via Settings tab. But, when you reinstall you application, all your new settings are gone. 

For example, you can go to settings, click on Groups under Users menu from the left and change some settings (change some write/read rights or so). You can do this for many users and it works. But, when you finally reinstall your module, all this settings are gone, they are just as they were when you first install module.

 

My questions are following: 

- where OpenERP stores this "manually" changed rights- in database, in some hidden file or something else?

- how to save this settings in way that you can easy reload them when you reinstall your module?

Thanks in advance!

形象
丢弃
最佳答案

- where OpenERP stores this "manually" changed rights- in database, in some hidden file or something else?

Database.

- how to save this settings in way that you can easy reload them when you reinstall your module?

Update your xml file, because your new database will be loaded with data from the xml file.

形象
丢弃
编写者

Thank you for your answer, but can you help me a little bit more- do you know exactly what table in database? For xml files, I agree with you, that's the best way for it, but we still have problem when some users (which don't know anything about xml files) manually change some settings- in that case I should be able to "reproduce" their setting. How to do that? Thank you once more!

The url is your hint, check parameter model=my.model and change "." with "_", that is the table name in database. For example, res.users -> res_users. "'reproduce' their setting", I think this is an open problem so far to do it automatically.

编写者

Thank you, I found answer for this. ir_model_access is the answer, you can get this from security file. And as you said, reproducing settings is "open" issue... Thank you for your help!