error opening form

Bug #540182 reported by Ferdinand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

branch-server 2010
branch-addons official 2660
branch-addons chricar_5.0_price_unit 2542
stable_5.0-extra-addons 4306

Environment Information :
System : Linux-2.6.31.12-0.1-desktop-x86_64-with-SuSE-11.2-x86_64
OS Name : posix
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description: openSUSE 11.2 (x86_64)
Release: 11.2
Codename: n/a
Operating System Release : 2.6.31.12-0.1-desktop
Operating System Version : #1 SMP PREEMPT 2010-01-27 08:20:11 +0100
Operating System Architecture : 64bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.2
OpenERP-Client Version : 5.0.7
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/terp/OpenERP/branch/server/5.0/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/terp/OpenERP/branch/server/5.0/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/home/terp/OpenERP/branch/server/5.0/bin/addons/audittrail/audittrail.py", line 361, in execute
    res = my_fct(db, uid, passwd, object, method, *args)
  File "/home/terp/OpenERP/branch/server/5.0/bin/addons/audittrail/audittrail.py", line 360, in my_fct
    return fct_src(db, uid, passwd, object, method, *args)
  File "/home/terp/OpenERP/branch/server/5.0/bin/addons/base_module_record/base_module_record.py", line 38, in execute
    res = super(recording_objects_proxy, self).execute(*args, **argv)
  File "/home/terp/OpenERP/branch/server/5.0/bin/service/web_services.py", line 579, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 61, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 120, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 112, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/terp/OpenERP/branch/server/5.0/bin/addons/koo.zip/koo/koo.py", line 299, in new_fields_view_get
    result = old_fields_view_get( self, cr, user, view_id, view_type, context, toolbar )
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 1306, in fields_view_get
    result['arch'] = _inherit_apply_rec(inherit_result, sql_res[3])
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 1301, in _inherit_apply_rec
    result = _inherit_apply(result, inherit)
  File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 1251, in _inherit_apply
    raise AttributeError(_("Couldn't find tag '%s' in parent view !") % tag)
AttributeError: Couldn't find tag '<field name="type">' in parent view !

the reason is here
./delivery/delivery_view.xml
        <record id="view_picking_withweight_in_form" model="ir.ui.view">
            <field name="name">stock.picking_withweight.in.form.view</field>
            <field name="type">form</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_in_form"/>
            <field name="arch" type="xml">
                <field name="type" position="after">
                    <field name="weight"/>
                </field>
            </field>
        </record>

for some reason the field name="type" was not available in stock.picking.in.form of my branch
(actually I do not see much reason to show the content of type "Getting goods" in a form called "Incoming Products)

what I'd like to emphasis is the need for
a) check and gracefully more verbose handling xml inheritance problems to allow fast debugging.
b) automatic debugging

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Dr. Ferdinand,

This is not at all an issue here as this got generated due to one of your views has missed 'type' field.
I agree for your point of 'type' field in Incoming Products, but this can never be treated as an error or a serious issue.

Thanks.

Changed in openobject-server:
milestone: none → 5.0.8
status: New → Invalid
Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 540182] Re: error opening form

Or maybe Ferdinand meant when we make this kind of mistakes it's a pain
debugging it because OpenObject gives use too little clue ?

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Yes Lionel,

He meant the same and it will be improved soon.
Thanks.

Revision history for this message
Ferdinand (office-chricar) wrote :

I even wouldn't consider this as a "mistake" but "customisation" ;-)
someone may want to remove an unused field and the next module will fail because not finding this field as a reference any more.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Ferdinand @ ChriCar a écrit :
> I even wouldn't consider this as a "mistake" but "customisation" ;-)
Yes - sorry, not offence was intended of course.
Lionel

Revision history for this message
xrg (xrg) wrote :

On Wednesday 17 March 2010, you wrote:
> I even wouldn't consider this as a "mistake" but "customisation" ;-)
> someone may want to remove an unused field and the next module will fail
> because not finding this field as a reference any more.
>

FYI I have long been doing little hacks here and there, in the ORM and
exception handlers, so that these messages make more sense to delelopers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.