1
votes

I'm trying to learn Odoo and developing a module. For the same, I just created 2 new user groups. ie. Parent and Faculty. I used the following code,

<record id="group_parent" model="res.groups">
    <field name="name">Parent</field>
</record>
<record id="group_faculty" model="res.groups">
    <field name="name">Faculty</field>
</record>

It worked fine and I can see these groups under the Access Rights tab in user's form view.

enter image description here

Then I was able to assign Faculty option for a user. But when I upgrade my module, it's getting reset the user's access rights.

enter image description here

After upgrading my module, how it looks like is:

enter image description here

In the data block, I used to try with noupdate="1" and noupdate="0", but no use. I'm still getting the same issue. Is there any other places which should be taken into account to fix this issue?

It will be appreciable, if anyone can tell me the reason for this issue.

1
Try adding in the "data" tag noupdate="1"dccdany
Thanks! I tried it by adding noupdate="1" in the data tag, but no use. Still getting the same issue.Nikhil Mohan
try too with noupdate="0", anyway edit your question with this too please!dccdany

1 Answers

0
votes

In your data block set the option noupdate to 1:

<data noupdate="1">
...
</data>

Take into account that this only works if you are updating your module. If you are doing a reinstallation, this flag will be bypassed and your changes will still be overwritten.