El viernes 30 de marzo de 2012 21:11:35 UTC-3, Cédric Krier escribió:
>
> On 30/03/12 12:54 -0700, Bruno M. Villasanti (Thymbra) wrote:
> > Hi,
> > 
> > I want to make editable lines of purchase orders with something like:
> > 
> >         <record model="ir.ui.view" id="purchase_view_form">
> >             <field name="model">purchase.purchase</field>
> >             <field name="type">form</field>
> >             <field name="inherit" ref="purchase.purchase_view_form"/>
> >             <field name="arch" type="xml">
> >                 <![CDATA[
> >                 <data>
> >                     <xpath
> >                         
> > 
> expr="/form/notebook/page[@id=&quot;purchase&quot;]/field[@name=&quot;lines&quot;]/tree"
> >                         position="replace_attributes">
> >                         <tree string="Lines" sequence="sequence" 
> fill="1" 
> > editable="top"/>
> >                     </xpath>
> >                 </data>
> >                 ]]>
> >             </field>
> >         </record>
> > 
> > But this returns Invalid XML view.
> > 
> > I guess because the validator (etree.RelaxNG) takes form.rng when in 
> fact 
> > is a nested tree. So, instead assigning tree.rng by debugging, the 
> process 
> > completes successfully.
>
> This is strange because tree is define in form.rnc
>
I repeat the operation on a new database with the same result:
 
    [Fri Mar 30 22:44:06 2012] ERROR:ir:Invalid xml view:
    <string>:5:0:ERROR:RELAXNGV:RELAXNG_ERR_NOELEM: Expecting an element , 
got nothing
    <data>
                        <xpath
                            
expr="/form/notebook/page[@id=&quot;purchase&quot;]/field[@name=&quot;lines&quot;]/tree"
                            position="replace_attributes">
                            <tree string="Lines" sequence="sequence" 
fill="1" editable="top"/>
                        </xpath>
                    </data>
    [Fri Mar 30 22:44:06 2012] ERROR:convert:Error while parsing xml file:
    In tag record: model ir.ui.view with id purchase_view_form.

My cuestion is if the inheritance is correct.

Thanks.


--
Bruno M. Villasanti
Thymbra

-- 
[email protected] mailing list

Reply via email to