Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7801 Lượt xem

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>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>


Ảnh đại diện
Huỷ bỏ
Tác giả

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

Tác giả

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?

Tác giả

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