I'm am trying to load some data at install time much like demo data.
As an example loading city/state information.  To do this I wish to look up the 
country code.  In this example a record in the datafile looks like:

<record model="res.country.state" id="entry_id">
<field name="country_id" model="res.country"&nbsp; 
search="&#91;&#40;'code','=','AE'&#41;&#93;"/>
&nbsp; &nbsp; &nbsp;<field name="state_code">"AJ"</field>
&nbsp; &nbsp; &nbsp; <field name="state_name">"'Ajman"</field>
&nbsp; &nbsp; </record>

When I start the server with -U option , it finds the file to load and end up 
with an error 
psycopg2.IntegrityError: null value in column "code" violates not-null constrain
Which I believe tells me that the code = AE does not exist in the county table. 
 I have verified that the entry does exist in the county table.  I have 
reviewed a lot of different documents on the open object site but I appear to 
be missing something.  Your help would be appreciated.

Fedora 11
python2.6
openerp-server 5.0.6


Paul J.




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=60547#60547

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to