Odoo Help


Error when make security for a field..

aci aisha
on 2/3/15, 1:15 AM 1,028 views


I add 2 fields in task using a custom module & it works fine..

But when i trying to add security for one of the module as follows,an error occured!!!

    <record model="ir.ui.view" id="create_file">
        <field name="name">project.task</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="project.view_task_form2" />
        <field name="arch" type="xml">
            <xpath expr="/form/sheet/group/group[2]/field[@name='categ_ids']" position="after">
                 <field name="file_no" groups="group_trademark_user"/>
                 <field name="file_no_cr"/>


ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
External ID must be fully qualified" while parsing /home/amz02/Projects/odoo/odoo-8.0-647afdf/openerp/addons/file_details/file_details_veiw.xml:409, near


Any1 help me??!


Try this

<field name="file_no" groups="YOUR_MODULE.group_trademark_user"/>
where YOUR_MODULE is the module in which "group_trademark_user" group is added.

Also, in __openerp__.py,

'data': ['security/security.xml',
             'YOUR VIEWS',

This is to load the security file prior to loading your VIEWS.

Sorry,,,I try with module_name..But didnt work.. But when try with base as Abin says it works perfectly!!!

aci aisha
on 2/3/15, 1:44 AM

when defining the security file, did you use id="base.group_trademark_user" to create your new group?

Atchuthan - Technical Consultant, Sodexis Inc
on 2/3/15, 1:46 AM


aci aisha
on 2/3/15, 1:49 AM

U r right atchuthan,Im sorry.. But how i find the module? I didnt put it in the security file...My security file is as follows, Trademark User Company Registeration User

aci aisha
on 2/3/15, 1:51 AM
Trademark User Company Registeration User
aci aisha
on 2/3/15, 1:51 AM

Cant put here...i pt it as an aswer,..

aci aisha
on 2/3/15, 1:52 AM

update your security file in question itself

Atchuthan - Technical Consultant, Sodexis Inc
on 2/3/15, 1:52 AM

Yes,I GOT IT.. I upvote u & mark it as True!!!

aci aisha
on 2/3/15, 1:55 AM
Abin C I
On 2/3/15, 1:41 AM

Try this,,,

                 <field name="file_no" groups="base.group_trademark_user"/>

                                                    instead of

                 <field name="file_no" groups="group_trademark_user"/>


Thanks Abin...Its Solved!!!

aci aisha
on 2/3/15, 1:42 AM

@abin, it is not always base. you need to find where this group is defined and use that modules name. groups="YOUR_MODULE.group_trademark_user"

Atchuthan - Technical Consultant, Sodexis Inc
on 2/3/15, 1:44 AM

Sorry Abin, Actually Its not working,,, See Atchuthans Answer!!!

aci aisha
on 2/3/15, 1:56 AM
aci aisha
On 2/3/15, 1:52 AM

<record id="group_trademark_user" model="res.groups">
        <field name="name">Trademark User</field>
        <record id="group_company_registeration_user" model="res.groups">
        <field name="name">Company Registeration User</field>

group definition is correct

Atchuthan - Technical Consultant, Sodexis Inc
on 2/3/15, 1:55 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/3/15, 1:15 AM
Seen: 1028 times
Last updated: 3/16/15, 8:10 AM