Odoo Help


Create user using xml

Umashankar Subramani
on 5/21/15, 1:55 AM 1,928 views


   I tried to create the user using xml i got this error please any one give me suggestion how to clear it............

This is the code

<record id="ecoshield_user_1" model="res.partner">

<field name="name">David Follet</field>

<field name="supplier">0</field>

<field name="is_company">0</field>

<field name="city">Düsseldorf</field>

<field name="zip">40227</field>

<field name="country_id" ref="base.de"/>

<field name="street">Willi-Becker-Allee 10</field>

<field name="email">davidf@ecoshieldpest.com</field>

<field name="website">http://www.testecoshield.com</field>


<record id="eco_comp" model="res.company">

<field name="name">Ecoshield</field>

<field name="email">sample@sample.com</field>


<record id="ecoshelsd_user_demo" model="res.users">

<field name="partner_id" ref="ecoshield_user_1"/>

<field name="login">davidf</field>

<field name="password">123</field>

<field name="signature">--

Mr David</field>

<field name="company_id" ref="eco_comp"/>

<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('ecoshield_roles.crm_sales_pest')])]"/>

<field name="image" type="base64" file="base/static/img/user_demo-image.jpg"/>


Error :

ParseError: "null value in column "notify_email" violates not-null constraint

DETAIL: Failing row contains (57, Ecoshield, 1, null, null, 2015-05-21 05:55:20.58463, 0, null, null, null, null, null, null, null, null, null, null, null, f, null, null, t, null, t, null, null, f, null, 2015-05-21 05:55:20.58463, t, null, 1, en_US, 1, null, null, null, contact, f, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).

" while parsing /home/umashankar/Uma/odoo-orp/extra_addons/ecoshield_email_conf/ecoshield_user.xml:16, near

<record id="eco_comp" model="res.company">

<field name="name">Ecoshield</field>

<field name="email">sample@sample.com</field>



Atul Arvind

--Atul Arvind--
| 3 3 5
vadodara, India
--Atul Arvind--


I am odoo Enthusiast/Developer from Vadodara, India. Working with odoo from v5 to v11 and other opensource technology since 5+ years. Having Strong Expertise in

Odoo Development

Odoo Customization

Odoo Training

Odoo Integration

Server Administration

Odoo Migration


Here is my StackOverflow profile.  you can also find me on LinkedIn.

Contact: atul.surficle@gmail.com.

Atul Arvind
On 5/21/15, 2:55 AM

When you create using xml make sure your record should take all required field value in it. add the below tag in your record.

<field name="notify_email">always<field>

notify_email is a selection field with radio widget, how to assign a value for that field using xml

Umashankar Subramani
on 5/25/15, 6:22 AM

even after i am using the field notify_email its still not passing the desired value.......how to clear this......its passing null value.....please anyone give me some ideas

Umashankar Subramani
on 5/26/15, 1:30 AM

What error info is now after adding a field notify_email?

on 5/26/15, 5:08 AM

Same null constraint error is posting in the console.........

Umashankar Subramani
on 5/29/15, 9:35 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: 5/21/15, 1:55 AM
Seen: 1928 times
Last updated: 5/21/15, 5:21 AM