Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Row-level access incorrect 'create_uid' defined, cannot correct through module upgrade

By
Akram El Gabry
on 5/21/15, 2:35 PM 430 views

I'm using the Odoo development essentials book and have been through the creating a new module.

The book introduces creating a todo task module and on the page titled 'Row-level Access'  when defining the domain _force field in the security/todo_access_rules.xml file the value is:

<field name="domain_force">[('create_uid','=',user.id)]</field>


now this is all withn the development database v8dev, I accidentally entered the value 'user_id' instead of 'user.id' in the field definition, needless to say after starting odoo uing the upgrade command, I found when selecting the todo task in Odoo itself  I got an error which basically indicated that user_id did not exist.

I then corrected this line in the file security/todo_access_rules.xml file

and then ran command ./odoo.py -d v8dev -u todo_app to upgrade the todo_app

so that I could ensure everything was updated, however I continued to get the same error so the system was still referring to the incorrect value 'user_id' instead of 'user.id'

To fix this I dropped the DB v8dev, recreated it and then ran the same command to start  the server with module upgrades and this fixed the problem.

However I'd like to know why when I used the start command with upgrades to the todo_app module, the system did not pick up the correct definition from the updated todo_access_rules.xml file?  Is it that although the modle is being upgraded the database itself is not being updated again?

0

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
2983
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 5/22/15, 5:29 PM

hello, 

your rule are probably in a <data noupdate="1">...

So, when you update a module, this data are not updated.

If you want avoid to install all the database, you can do a "-i to_do" to force reinstall the module and so update your rules....


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 5/21/15, 2:35 PM
Seen: 430 times
Last updated: 5/23/15, 3:03 AM