Odoo Help

Welcome!

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

0

Create user using xml

By
Umashankar Subramani
on 5/21/15, 1:55 AM 927 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>

2

Atul Arvind

--Atul Arvind--
1854
| 3 3 5
India
--Atul Arvind--

Hello, 

I am odoo Enthusiast/Consultant from Baroda, Gujarat, India. Working with odoo from v5 to v9 and other opensource technology since 4+ years. Having Strong Expertise in

Requirement gathering & Gap Analysis

Odoo Development

Odoo Customization

Odoo Training

Odoo Integration

Server Administration

Odoo Migration

Implementation

I am also active on StackOverflow.

or 


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?

zbik
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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/21/15, 1:55 AM
Seen: 927 times
Last updated: 5/21/15, 5:21 AM