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

how to inherit view in version7

By
mihir shah
on 4/24/13, 9:57 AM 3,091 views
<record id="web_gallery_view_product_product_form" model="ir.ui.view">
    <field name="name">product.product.gallery</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="product_die_normal_form_view11"/>
    <field name="type">tree</field>
    <field name="arch" type="xml">
        <notebook position="inside">
            <page string="Gallery">
                <field name="web_gallery_image_ids" />
            </page>
        </notebook>
    </field

I m trying to inherit this tab on my current working module, which has form id "product_die_normal_form_view11" but it is giving an error of field's architecture

This module is properly working in version 6.0

Traceback (most recent call last): File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_ui_view.py", line 125, in _check_render_view fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=view.type, context=context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 2262, in fields_view_get xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 1939, in __view_look_dom_arch raise except_orm('View error', msg) except_orm: ('View error', u"Can't find field 'resharpening' in the following view parts composing the view of object model 'product.product':\n * product.die.normal.form11\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model") 2013-04-25 06:05:47,392 2920 ERROR jp_oe_v7 openerp.tools.convert: Parse error in /home/merlin/openerp7/addons/merlin_product_gallery/product_gallery_view.xml:4: <record id="web_gallery_view_product_product_form" model="ir.ui.view"> <field name="name">product.product.gallery</field> <field name="model">product.product</field> <field name="inherit_id" ref="merlin_product_die.product_die_normal_form_view11"/> <field name="type">tree</field> <field name="arch" type="xml"> <notebook position="inside"> <page string="Gallery"> <field name="web_gallery_image_ids"/> </page> </notebook> </field> </record> Traceback (most recent call last): File "/home/merlin/openerp7/server/openerp/tools/convert.py", line 847, in parse self._tagsrec.tag File "/home/merlin/openerp7/server/openerp/tools/convert.py", line 814, in _tag_record id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_model.py", line 929, in _update model_obj.write(cr, uid, [res_id], values, context=context) File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_ui_view.py", line 207, in write return super(view, self).write(cr, uid, ids, vals, context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 4203, in write self._validate(cr, user, ids, context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 1546, in _validate raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!') 2013-04-25 06:05:47,393 2920 ERROR jp_oe_v7 openerp.netsvc: ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture! Traceback (most recent call last): File "/home/merlin/openerp7/server/openerp/netsvc.py", line 289, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/home/merlin/openerp7/server/openerp/service/web_services.py", line 610, in dispatch security.check(db,uid,passwd) File "/home/merlin/openerp7/server/openerp/service/security.py", line 40, in check pool = pooler.get_pool(db) File "/home/merlin/openerp7/server/openerp/pooler.py", line 49, in get_pool return get_db_and_pool(db_name, force_demo, status, update_module)[1] File "/home/merlin/openerp7/server/openerp/pooler.py", line 33, in get_db_and_pool registry = RegistryManager.get(db_name, force_demo, status, update_module) File "/home/merlin/openerp7/server/openerp/modules/registry.py", line 192, in get update_module) File "/home/merlin/openerp7/server/openerp/modules/registry.py", line 214, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/home/merlin/openerp7/server/openerp/modules/loading.py", line 343, in load_modules processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/home/merlin/openerp7/server/openerp/modules/loading.py", line 258, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/home/merlin/openerp7/server/openerp/modules/loading.py", line 189, in load_module_graph load_update_xml(module_name, idref, mode) File "/home/merlin/openerp7/server/openerp/modules/loading.py", line 73, in <lambda> load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml') File "/home/merlin/openerp7/server/openerp/modules/loading.py", line 126, in _load_data tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/home/merlin/openerp7/server/openerp/tools/convert.py", line 954, in convert_xml_import obj.parse(doc.getroot()) File "/home/merlin/openerp7/server/openerp/tools/convert.py", line 847, in parse self._tagsrec.tag File "/home/merlin/openerp7/server/openerp/tools/convert.py", line 814, in _tag_record id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_model.py", line 929, in _update model_obj.write(cr, uid, [res_id], values, context=context) File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_ui_view.py", line 207, in write return super(view, self).write(cr, uid, ids, vals, context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 4203, in write self._validate(cr, user, ids, context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 1546, in _validate raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

the whole traceback error , currently

In which module this product_die_normal_form_view11 view is created? I mean in current module?

Sudhir Arya (SA)
on 4/24/13, 10:58 AM

Please post the whole error message.

klacus
on 4/25/13, 12:08 AM

Traceback (most recent call last): File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_ui_view.py", line 125, in _check_render_view fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=view.type, context=context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 2262, in fields_view_get xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 1939, in __view_look_dom_arch raise except_orm('View error', msg) except_orm: ('View error'

mihir shah
on 4/25/13, 4:08 AM

Error is because the inherited view "product_die_normal_form_view11" is not able to find notebook tag. Can you please put here the view "product_die_normal_form_view11" or try to add page using "xpath". Eg. <xpath expr="whole path"><page string="string"><field/></page></xpath>

Thanks, Serpent Consulting Services Pvt Ltd

Serpent Consulting Services Pvt. Ltd.
on 4/25/13, 4:47 AM
0

Priyesh Solanki (pso)

--Priyesh Solanki (pso)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1100
| 2 2 4
--Priyesh Solanki (pso)--
Priyesh Solanki (pso)
On 4/24/13, 10:57 AM

May be the view, you are inheriting, 'product_die_normal_form_view11', it has no <notebook> tag defined inside that original view in 7.0, but it was in 6.0 and that's why its working for 6.0. Still I am not sure, more information is needed with whole trace back.

Thanks, Priyesh Solanki

Traceback (most recent call last): File "/home/merlin/openerp7/server/openerp/addons/base/ir/ir_ui_view.py", line 125, in _check_render_view fvg = self.pool.get(view.model).fields_view_get(cr, uid, view_id=view.id, view_type=view.type, context=context) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 2262, in fields_view_get xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=ctx) File "/home/merlin/openerp7/server/openerp/osv/orm.py", line 1939, in __view_look_dom_arch raise except_orm('View error', msg) except_orm: ('View error'

mihir shah
on 4/25/13, 4:07 AM

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

1 follower(s)

Stats

Asked: 4/24/13, 9:57 AM
Seen: 3091 times
Last updated: 3/16/15, 8:10 AM