openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #21154
[Bug 1097287] Re: [7.0] tree colors cannot be set by inherit position=attributes
** Changed in: openobject-server
Assignee: (unassigned) => OpenERP Publisher's Warranty Team (openerp-opw)
** Tags added: maintenance
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1097287
Title:
[7.0] tree colors cannot be set by inherit position=attributes
Status in OpenERP Server:
New
Bug description:
We cannot inherit a tree to update its colors attribute
I tried both way:
First attempt:
<!-- Partner tree view inherited -->
<record id="view_partner_tree_add_fields" model="ir.ui.view">
<field name="name">res.partner.tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="colors">blue:name=='toto'</attribute>
</xpath>
</field>
</record>
Second attempt:
<!-- Partner tree view inherited -->
<record id="view_partner_tree_add_fields" model="ir.ui.view">
<field name="name">res.partner.tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="colors">blue:name=='toto'</attribute>
</tree>
</field>
</record>
This raise me the following error:
Server Traceback (most recent call last):
File "...parts/webclient/addons/web/session.py", line 87, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "...parts/server/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "...parts/server/openerp/service/web_services.py", line 610, in dispatch
security.check(db,uid,passwd)
File "...parts/server/openerp/service/security.py", line 40, in check
pool = pooler.get_pool(db)
File "...parts/server/openerp/pooler.py", line 49, in get_pool
return get_db_and_pool(db_name, force_demo, status, update_module)[1]
File "...parts/server/openerp/pooler.py", line 33, in get_db_and_pool
registry = RegistryManager.get(db_name, force_demo, status, update_module)
File "...parts/server/openerp/modules/registry.py", line 192, in get
update_module)
File "...parts/server/openerp/modules/registry.py", line 214, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module)
File "...parts/server/openerp/modules/loading.py", line 345, in load_modules
processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
File "...parts/server/openerp/modules/loading.py", line 260, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "...parts/server/openerp/modules/loading.py", line 191, in load_module_graph
load_update_xml(module_name, idref, mode)
File "...parts/server/openerp/modules/loading.py", line 75, in <lambda>
load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml')
File "...parts/server/openerp/modules/loading.py", line 128, in _load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
File "...parts/server/openerp/tools/convert.py", line 954, in convert_xml_import
obj.parse(doc.getroot())
File "...parts/server/openerp/tools/convert.py", line 847, in parse
self._tags[rec.tag](self.cr, rec, n)
File "...parts/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 "...parts/server/openerp/addons/base/ir/ir_model.py", line 929, in _update
model_obj.write(cr, uid, [res_id], values, context=context)
File "...parts/server/openerp/addons/base/ir/ir_ui_view.py", line 207, in write
return super(view, self).write(cr, uid, ids, vals, context)
File "...parts/server/openerp/osv/orm.py", line 4203, in write
self._validate(cr, user, ids, context)
File "...parts/server/openerp/osv/orm.py", line 1546, 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!')
I believe the first inheritance was possible using 6.1 version
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1097287/+subscriptions
References