On Wednesday, April 8, 2015 at 6:15:03 PM UTC+2, Cédric Krier wrote:
>
> On 07 Apr 22:56, [email protected] <javascript:> wrote: 
> > 
> > 
> > On Tuesday, April 7, 2015 at 11:20:03 PM UTC+2, Cédric Krier wrote: 
> > > 
> > > On 07 Apr 10:36, [email protected] <javascript:> wrote: 
> > > > Dear all, 
> > > > 
> > > > I created a module 'account_nl' for loading the account_nl.xml file. 
> > > > 
> > > > I copied the "trytond_account_de_skr03-3.4.0" 
> > > > 
> > > > I made the necessary changes. 
> > > 
> > > Apparently not. 
> > > 
> > > > Exception: Reference to account_nl.nl not found 
> > > 
> > > So your are missing this XML id. 
> > > 
> > > I replaced the account_nl.xml which I created with the account_de.xml 
> in 
> > my setup. 
> > I renamed the account_de.xml to account_nl.xml. 
> > Then ran the setup again. 
> > 
> > Went into Modules and installed the new module account_nl and the module 
> > was installed. 
> > 
> > So can you tell me what the structure should be of a data-xml file ? 
>
> It is defined in tryton.rnc: 
> http://hg.tryton.org/trytond/file/4a2d1a76de52/trytond/tryton.rnc 
>
> I am looking for a more logical explanation - perhaps an xsd describing 
the xml layout.
 

> > What about the id="root_nl" does it has to come back as a ref for the 
> > parent below it ? 
>
> All the ref must be adapted to the new XML id. 
>
> what do you mean with all the ref must be adapted to the new xml id ?
can you give an example ?
 

> > Can I only load account.account.template or do I also have to load 
> > account.account.type.template ? 
>
> No, you can only load data that respect the Model integrity. 
>

Do you mean the integrity of the model in the database - 
account.account.template  has a number of required and optional fields . 
This must be respected.


> > <!-- This file is part of Tryton.  The COPYRIGHT file at the top level 
> of 
> > this repository contains the full copyright notices and license terms. 
> --> 
> > <tryton> 
> > <data> 
> > <record model="account.account.template" id="root_nl"> 
> > <field name="name">NEDERLANDS STANDAARD GROOTBOEKSCHEMA</field> 
> > <field name="kind">view</field> 
> > <field name="type" ref="nl"/> 
> > </record> 
>
> Here for example, you must have a account.account.type.template with 
> the "nl" id defined before this record. 
>
> Alright that makes sense - saw it also in the account_be.xml.

Does each record in the xml file need to be related to a higher-level or a 
higher-higher-level record via the value in the ref-field ?

First record should it be 
        <record model="account.account.type.template" id="be">
xxxxx
        </record>



> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: [email protected] <javascript:> 
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

Reply via email to