Odoo Help

Welcome!

This community 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.

0

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

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

    <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" />
    </tree>
    </field>
    </record>


    <record   model="ir.actions.act_window"
       id="action">
        <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>

    </record>



    <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" />

    </data>

</openerp>

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.

Bista Solutions US, 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.

Bista Solutions US, 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

eoinpahern
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.

eoinpahern
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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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