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

[Solved] ParseError: "Wrong value for ir.ui.view.type: 'field'"

By
Siobhan
on 4/28/15, 2:44 AM 3,376 views

I have just created a module and want to add two fields to product module using this code:

 <record id="product_product_template_only_form_view" model="ir.ui.view">
		<field name="model">product.product</field>
		<field name="inhert_id" ref="product.product_template_only_form_view" />
		<field name="arch" type="xml">
			<field name="list_price" position="after">
				<field name="boatlength" />
				<field name="fuelcapacity" />
			</field>
		</field>
	</record>

but I get this error: 

ParseError: "Wrong value for ir.ui.view.type: 'field'" while parsing file:///C:/Odoo/server/openerp/addons/boatcompany/boatcompany_view.xml:5,

I think it might have something to do with the default view in product.product module but I am not sure where.

This is the class I created:


from openerp.osv import fields, osv

class product_product(osv.osv):

_inhert = "product.product"

_columns = {

"boatlength": fields.char("Boat Length", size=10),

"fuelcapacity": fields.char("Fuel Capacity", size=10),

}


Is this the correct default view?

1
Fermin Arellano
On 5/4/15, 2:39 PM

Siobhan your problem is in the following line:

<field name = "inhert_id" ref = "product.product_template_only_form_view" />

You misspelled the value in the name field. Change it for this:

name="inherit_id"

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: 4/28/15, 2:44 AM
Seen: 3376 times
Last updated: 5/5/15, 3:05 AM