Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
23305 Представления

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?

Аватар
Отменить
Лучший ответ

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"

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 25
5
0
мар. 25
1002
1
янв. 25
1415
1
мая 22
2755
4
дек. 23
23471