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

Error in view file in openerp 7

By
Souleymane Male
on 2/6/14, 9:54 PM 2,743 views

Hi, I have create a class and I have this error:

2014-01-27 21:09:05,798 21052 ERROR lastsygef openerp.addons.base.ir.ir_ui_view: Can't render view  for model: gefor.subm

Traceback (most recent call last): File "/home/openerp/workspace/sankofa/openerp/addons/base/ir/ir_ui_view.py", line 126, 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) AttributeError: 'NoneType' object has no attribute 'fields_view_get' 2014-01-27 21:09:05,803 21052 ERROR lastsygef openerp.tools.convert: Parse error in /home/openerp/workspace/sankofa/sankofa_addons/gefor/gefor_view.xml:100: <record model="ir.ui.view" id="view_gefor_subm_search"> <field name="name">"gefor.subm.search</field> <field name="model">gefor.subm</field> <field name="arch" type="xml"> <search string="Submission format"> <field name="name"/>
</search> </field> </record> Traceback (most recent call last): File "/home/openerp/workspace/sankofa/openerp/tools/convert.py", line 847, in parse self._tagsrec.tag File "/home/openerp/workspace/sankofa/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/openerp/workspace/sankofa/openerp/addons/base/ir/ir_model.py", line 963, in _update res_id = model_obj.create(cr, uid, values, context=context) File "/home/openerp/workspace/sankofa/openerp/addons/base/ir/ir_ui_view.py", line 103, in create return super(osv.osv, self).create(cr, uid, values, context) File "/home/openerp/workspace/sankofa/openerp/osv/orm.py", line 4470, in create self._validate(cr, user, [id_new], context) File "/home/openerp/workspace/sankofa/openerp/osv/orm.py", line 1544, in _validate raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture!') 2014-01-27 21:09:05,806 21052 ERROR lastsygef openerp: Failed to initialize database lastsygef. Traceback (most recent call last): File "/home/openerp/workspace/sankofa/openerp/cli/server.py", line 98, in preload_registry db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module) File "/home/openerp/workspace/sankofa/openerp/pooler.py", line 33, in get_db_and_pool registry = RegistryManager.get(db_name, force_demo, status, update_module) File "/home/openerp/workspace/sankofa/openerp/modules/registry.py", line 192, in get update_module) File "/home/openerp/workspace/sankofa/openerp/modules/registry.py", line 218, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/home/openerp/workspace/sankofa/openerp/modules/loading.py", line 344, in load_modules processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module) File "/home/openerp/workspace/sankofa/openerp/modules/loading.py", line 259, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/home/openerp/workspace/sankofa/openerp/modules/loading.py", line 191, in load_module_graph load_data(module_name, idref, mode) File "/home/openerp/workspace/sankofa/openerp/modules/loading.py", line 76, in <lambda> load_data = lambda *args: _load_data(cr, *args, kind='data') File "/home/openerp/workspace/sankofa/openerp/modules/loading.py", line 127, in _load_data tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report) File "/home/openerp/workspace/sankofa/openerp/tools/convert.py", line 954, in convert_xml_import obj.parse(doc.getroot()) File "/home/openerp/workspace/sankofa/openerp/tools/convert.py", line 847, in parse self._tagsrec.tag File "/home/openerp/workspace/sankofa/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/openerp/workspace/sankofa/openerp/addons/base/ir/ir_model.py", line 963, in _update res_id = model_obj.create(cr, uid, values, context=context) File "/home/openerp/workspace/sankofa/openerp/addons/base/ir/ir_ui_view.py", line 103, in create return super(osv.osv, self).create(cr, uid, values, context) File "/home/openerp/workspace/sankofa/openerp/osv/orm.py", line 4470, in create self._validate(cr, user, [id_new], context) File "/home/openerp/workspace/sankofa/openerp/osv/orm.py", line 1544, in _validate raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture!')

My class is

class gefor_subm(osv.osv):
_name = 'gefor.subm'
_columns = {
    'name': fields.char('Submission format', size=128),
    'analysis_ids': fields.one2many('gefor.analysis', 'subm_id', 'Analysis'),
}

Please, help me to resolve this error. Thanks

Error is at: <field name="name">"gefor.subm.search</field>. Change it to : <field name="name">gefor.subm.search</field>

Hiral Patel (hip)
on 2/7/14, 1:58 AM

Thanks, I change it but I have the same error.

Souleymane Male
on 2/7/14, 4:09 AM

have you updated the module ?

Hiral Patel (hip)
on 2/7/14, 4:50 AM

Yes, I restart the server and It is the same error. When I remove the search view, the error is in my form view: <record model="ir.ui.view" id="view_gefor_subm_form"> <field name="name">gefor.subm.form</field> <field name="model">gefor.subm</field> <field name="arch" type="xml"> <form string="Submission format" version = "7.0"> <sheet> <group> <field name="name"/>
</group> <notebook> <page string = "Analysis"> <field name="analysis_ids" colspan="4"/> </page> </notebook>
</sheet> </fo

Souleymane Male
on 2/7/14, 4:55 AM
0
Gaurav Sahu
On 4/17/15, 2:12 PM

Check that you have imported your .py in __init__.py and dependency specified in the __openerp__.py file

0

Hiral Patel (hip)

--Hiral Patel (hip)--
Tiny ERP Pvt Ltd
http://www.odoo.com
913
| 2 1 5
India
--Hiral Patel (hip)--


Hiral Patel (hip)
On 2/7/14, 5:25 AM

Try with xml file :

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>        
    <record model="ir.ui.view" id="view_gefor_subm_search"> 
        <field name="name">gefor.subm.search</field>
        <field name="model">gefor.subm</field> 
        <field name="arch" type="xml"> 
            <search string="Submission format"> 
                <field name="name"/> 
            </search> 
        </field> 
    </record>

    <record model="ir.ui.view" id="view_gefor_subm_form">
        <field name="name">gefor.subm.form</field>
        <field name="model">gefor.subm</field>
        <field name="arch" type="xml">
        <form string="Submission format" version = "7.0">
            <sheet>
            <group>
                <field name="name"/>
            </group>
            <notebook>
                <page string = "Analysis">
                    <field name="analysis_ids" colspan="4"/>
                </page>
            </notebook> 
            </sheet>
        </form>
        </field> 
    </record>
    </data>
</openerp>

Try it.

0
Souleymane Male
On 2/7/14, 4:58 AM

Yes, I restart the server and It is the same error. When I remove the search view, the error is in my form view:

    <record model="ir.ui.view" id="view_gefor_subm_form">
    <field name="name">gefor.subm.form</field>
    <field name="model">gefor.subm</field>
    <field name="arch" type="xml">
        <form string="Submission format" version = "7.0">
            <sheet>
            <group>
                <field name="name"/>                    
            </group>
                <notebook>
                    <page string = "Analysis">
                        <field name="analysis_ids" colspan="4"/>
                    </page>
                </notebook>             
            </sheet>
        </form>
    </field>
</record>

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: 2/6/14, 9:54 PM
Seen: 2743 times
Last updated: 4/17/15, 2:12 PM