Skip to Content
Menu
This question has been flagged
1 Reply
7745 Views

Hi,

   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>

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

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

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

</record>

<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"/>

</record>

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>

</record>

Avatar
Discard
Best Answer

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>


Avatar
Discard
Author

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

Author

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

What error info is now after adding a field notify_email?

Author

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