I have created a straight forward addon using Odoo bult-in scaffolding tool.
I'm trying to add a record to res.partner using a data file, like this
<odoo>
<data>
<record model="res.partner" id="NewPartner">
<field name="parent_id" eval="ref('base.partner_root')"/>
<field name="name">New Partner</field>
<field name="supplier" eval="True"/>
<field name="employee" eval="False"/>
<field name="is_company" eval="True"/>
<field name="customer" eval="False"/>
<field name="sale_warn">no-message</field>
</record>
</data>
</odoo>
But I keep getting the following error, no matter how I populate "sale_warn"
ParseError: "null value in column "sale_warn" violates not-null constraint
Indeed, sale_warn is a required field, so I need to set a value, but I can't see how.
Furthermore, there are several working AddOns adding records to res.partner without declaring sale_warn field.