4

I have created a new custom module for Odoo 8 and I have created a new group for secure this module. The security.xml is like this:

    <record model="ir.module.category" id="testmodule_category_testmodule">
        <field name="name">Test</field>
        <field name="sequence">20</field>
    </record>

    <record id="testmodule_group_manager" model="res.groups">
        <field name="name">Manager</field>
        <field name="category_id" ref="testmodule_category_testmodule"/>
    </record>

When I install this custom module for the first time it works everything ok but if I update this module, when I try to access to Configuration->Users->Users I get this error:

File "D:\work\odoo\odoo\openerp\addons\base\ir\ir_ui_view.py", line 369, in raise_view_error
raise AttributeError(message)
AttributeError: El campo `in_group_15` no existe

Error de contexto:
Vista `res.users.form`
[view_id: 153, xml_id: base.view_users_form, model: res.users, parent_id: n/a]

Also, I have created a new module from odoo.py scaffold and only added this security.xml for testing this error, but I get always this when update the module. If I remove and reinstall it works fine but not when update.

UPDATE

If I get a fresh install of Odoo it works fine, install, uninstall and upgrade module. Maybe there are a conflict with another module. In the fields list I don't see any module field named 'in_group_15'. How can I get what module is the conflict?

Carlos Mayo
  • 2,054
  • 1
  • 19
  • 35

1 Answers1

0

Try yo add users in group.

<record id="group_mymodule_manager" model="res.groups">
   <field name="name">Manager</field>
   <field name="category_id" ref="module_category_mymodule"/>
   <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

Hope this help.

  • No, the error still show. I have uninstalled the module, modified like you say and then installed again. The first time it works fine, but if I modify some code on the module and update it, when I try to access to Configuration->Users->Users I get the error. – Carlos Mayo Sep 03 '15 at 07:14