Odoo Help


Can someone tell me whats wrong with my view.xml???

eoin ahern
on 3/23/14, 10:35 AM 1,414 views
<?xml version="1.0" encoding="utf-8"?>

    <record id="products_tree" model="ir.ui.view">
    <field name = "name">prods.prods.name</field>
    <field name= "model">prods.prods</field>
    <field name="arch" type="xml">
    <tree string="prods_tree" version="7.0">
        <field name="name"   />
        <field  name="code" />
        <field  name="sku" />
        <field  name="description" />
        <field  name="salepricewithvat" />
        <field  name="group" />
        <field  name="id" />
        <field  name="applicationid" />

    <record   model="ir.actions.act_window"
        <field name="name">prods.prods.action</field>
        <field name="res_model">prods.prods</field>
        <field name="view_type">tree</field>
        <field name="view_mode">tree</field>


    <menuitem id="main_item"  name="List Of Products"   icon="terp-partner"/>
    <menuitem id="main_item_child"   name="Products" parent="main_item"/>
    <menuitem id="main_item_option"  name="Products List" parent="main_item_child" action="action" />



I keep getting a Validate error . but it looks okay to me? Error occurred while validating the field(s) arch: Invalid XML for View Architecture!

what is with this framework. i found a deprecated variable self._table in orm.py. next to it it says something like # this is deprecated use _model instead but _table is still used in the class?

eoin ahern
on 3/23/14, 10:47 AM

The log file will give you more specific details about the error - it should point you to a tag mismatch or an unknown field attribute.

Ray Carnes
on 3/23/14, 1:53 PM

File "C:\OpenERP 7.0-20140221-003045\Server\server\openerp\addons\base\ir\ir_ui_view.py", line 126, in _check_render_view AttributeError: 'NoneType' object has no attribute 'fields_view_get' 2014-03-23 18:51:43,832 7956 ERROR absyla openerp.tools.convert: Parse error in file:///C:/OpenERP%207.0-20140221-003045/Server/server/openerp/addons/meplugin/Products_view.xml:5: <record id="products_tree" model="ir.ui.view">

eoin ahern
on 3/23/14, 3:53 PM

i dunno been at this the last few days. a basic module shouldnt involve this much time. its ridiculous

eoin ahern
on 3/23/14, 3:54 PM

In addition to basic syntax checks, OpenERP also checks that all fields in your view are in your model definition - is that the case - you haven't shared your Python code.

Ray Carnes
on 3/23/14, 5:05 PM

Please, keep on with the same question like in http://help.openerp.com/question/46649/need-some-help-with-the-module-iam-building/?comment=46661#comment-46661, if you want to find a solution.

Med Said BARA
on 3/23/14, 7:44 PM

i will upload the python this evening but iam ppretty sure the field names are the exact same as what I have in the _columns dictionary

on 3/24/14, 11:05 AM

from openerp.osv import osv, fields

class Products(osv.Model): _name = 'prods.prods' _columns = { 'name': fields.text('Prod Name', size=100), 'code': fields.text('Code'), 'sku': fields.text('SKU', size=30), 'description': fields.text('Description'), 'salepricewithvat': fields.float('Sale Price + VAT'), 'group': fields.float('Group'), 'id': fields.text('ID'), 'applicationid': fields.text('App ID'), } _table = 'prods_prods'

eoin ahern
on 3/24/14, 5:12 PM

that is my model class above

eoin ahern
on 3/24/14, 5:13 PM

i honestly cant see whats wrong with this

eoin ahern
on 3/24/14, 5:27 PM

"Naming Convention" problems for module name and Model Name !!! https://doc.openerp.com/7.0/contribute/05_developing_modules/#naming-convention

Med Said BARA
on 3/24/14, 6:50 PM

cool. thanks! Ill have a look at that in the morning see. if it resolves my issue

eoin ahern
on 3/24/14, 7:47 PM

yeah that doesnt make a difference really. my modules all lowercase one word. meplugin. might just try unistall the openerp server.

on 3/25/14, 11:56 AM

changed the names of the files. all to lower case got passed this error.

eoin ahern
on 3/25/14, 7:55 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 3/23/14, 10:35 AM
Seen: 1414 times
Last updated: 3/16/15, 8:10 AM