This question has been flagged
2 Replies
3710 Views

I am change a module to openerp 7 and I have somes erros in xml.. but I cant find them

<?xml version="1.0" encoding="utf-8"?>

<openerp> <data>

    <record id="stock_partial_picking_inheirt_saft_form" model="ir.ui.view">
        <field name="name">stock.partial.picking.saft.form</field>
        <field name="model">stock.partial.picking</field>
        <field name="inherit_id" ref="stock.stock_partial_picking_form"/>
        <field name="type">form</field>
        <field name="arch" type="xml">
        <separator position="before" string="Products">
            <separator colspan="4" string="Dados da Guia (Se documento for uma guia)"/>
            <group col="6" colspan="3">
                <field name ="doc_guia"/>
                <newline/>
                <field name="journal_id" attrs="{'readonly':[('doc_guia','==','0')], 'required':[('doc_guia', '==', '1')]}" colspan="3"/>
                <field name="guia_number" colspan="3"/>
                <field name="data_entrega" attrs="{'readonly':[('doc_guia','==','0')], 'required':[('doc_guia', '==', '1')]}" colspan="3"/>
                <field name="matricula_id"  attrs="{'readonly':[('doc_guia','==','0')], 'required':[('doc_guia', '==', '1')]}" colspan="3"/>
                <field name="local_carga"  on_change="onchange_local_carga(local_carga)" attrs="{'readonly':[('doc_guia','==','0')], 'required':[('doc_guia', '==', '1')]}" colspan="3"/>
                <field name="tipo_biling"  attrs="{'readonly':[('doc_guia','==','0')], 'required':[('doc_guia', '==', '1')]}" colspan="3"/>
            </group>
        </separator>
        <tree position="inside" string="Product Moves">
            <field name="name" />
        </tree>
        </field>
    </record>


    <record id="stock_partial_picking_line_inherit_saft_form" model="ir.ui.view">
        <field name="name">stock.partial.picking.line.saft.form</field>
        <field name="model">stock.partial.picking.line</field>
        <field name="inherit_id" ref="stock.stock_partial_picking_line_form"/>
        <field name="type">form</field>
        <field name="arch" type="xml">
        <field name ="product_id" position="after">
                <field name="name"/>
        </field>
        </field>
    </record>

    <record id="stock_partial_picking_line_inherit_saft_list" model="ir.ui.view">
        <field name="name">stock.partial.picking.line.saft.list</field>
        <field name="model">stock.partial.picking.line</field>
        <field name="inherit_id" ref="stock.stock_partial_picking_line_list"/>
        <field name="type">tree</field>
        <field name="arch" type="xml">
        <field name ="product_id" position="after">
                <field name="name"/>
        </field>
        </field>
    </record>

</data>

</openerp>

any advice?

Avatar
Discard
Best Answer

I think your error comes from the attrs operator. Instead of '==' try this '='

Avatar
Discard
Author

it could be the next error but I think is on the separator tag or something around it. I change == to = and it shows the same error

xcept_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

Yes i think you're right, it may be because of the separator tag. I think that you can't have something like this: <separator position="before" string="Products"> some other tags inside it </separator>

I'm not sure but maybe you should try using the separator only this way:

<separator position="before" string="Products"/>

Author Best Answer

the problem is the tree

Avatar
Discard