python - OPENERP: ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture -


i'm new programming openerp 7.0, when import module openerp gives me error:validateerror error occurred while validating field(s) arch: invalid xml view architecture!. i`m not locate error. grateful if me. thanks.

_init_.py

# -*- encoding: utf-8 -*-  import tipos_acceso_kaicen 

_openerp_.py

{ "name" : "tipos acceso kaicen", "version" : "1.0", "author" : "kaicen", "category" : "gestionar tipos de acceso", "website" : "http://www.kacien.es", "description": "podremos dar de alta los tipos de acceso de los que disfrutarán nuestros socios", "depends" : ["base"], "init_xml" : ["tipos_acceso_kaicen_view.xml"], "demo xml" : [], "update_xml" : ["tipos_acceso_kaicen_view.xml"], "active": false, "installable": true, "data": ["tipos_acceso_kaicen_view.xml"] } 

tipos_acceso_kaicen.py

# -*- encoding: utf-8 -*-  osv import osv, fields tools.translate import _   class aceso_tipoacceso(osv.osv):  _name = 'acceso.tipoacceso'    _columns = {                            'tipo_acceso': fields.char('tipo acceso', size=140, required = true),                            'product.id':fields.many2one('product.product', 'artículo', required = true),                            'numaccesos_tiempo':fields.boolean('numaccesos_tiempo'),                            'cantidad':fields.integer('cantidad'),                            'sale_pack_type': fields.selection((('a', 'a'), ('b', 'b'), ('c', 'c')), 'sale packaging type')                 } aceso_tipoacceso() 

tipos_acceso_kaicen_view.xml

<?xml version="1.0" encoding="utf-8"?> <openerp>  <data>     <record model="ir.ui.view" id="view_acceso_tipoacceso_tree">         <field name="name">acceso.tipoacceso.tree</field>         <field name="model">acceso.tipoacceso</field>         <field name="type">tree</field>                     <field name="arch" type="xml">                                <tree string="tipos de acceso">                                     <field name="tipo_acceso"/>                            <field name="product.id"/>                            <field name="numaccesos_tiempo"/>                            <field name="cantidad"/>                </tree>                         </field>     </record>      <record model="ir.ui.view" id="view_acceso_tipoacceso_form">         <field name="name">acceso.tipoacceso.form</field>         <field name="model">acceso.tipoacceso</field>         <field name="type">form</field>                     <field name="arch" type="xml">                                <form string="tipos de acceso">                                   <field name="tipo_acceso"/>                            <field name="product.id"/>                            <field name="numaccesos_tiempo"/>                            <field name="cantidad"/>                            <field name="sale_pack_type"/>                </form>                         </field>     </record>    <!--accion disparador tipo acceso  --> <record model ="ir.actions.act_window" id="open_view_acceso_tipoacceso_form">             <field name="name"> tipo acceso</field>             <field name="res_model">acceso.tipoacceso</field>             <field name="view_type">form</field>             <field name="view_mode">tree,form</field> </record> <!--opcion del menu para tipo acceso  --> <menuitem id="menu_acceso_tipoacceso_open_view_form" name="tipo acceso" parent="base.menu_base_partner" action="open_view_acceso_tipoacceso_form"/>     </data> </openerp> 

<record model="ir.ui.view" id="view_acceso_tipoacceso_form">     <field name="name">acceso.tipoacceso.form</field>     <field name="model">acceso.tipoacceso</field>     <field name="type">form</field>                 <field name="arch" type="xml">                            <form string="tipos de acceso" version="7.0"> <!--you forgot write version attribute -->                           <field name="tipo_acceso"/>                        <field name="product.id"/>                        <field name="numaccesos_tiempo"/>                        <field name="cantidad"/>                        <field name="sale_pack_type"/>            </form>                     </field> </record>  

in openerp 7.0 must have write form view version


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -