openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04498
Re: [Merge] lp:~openerp-dev/openobject-server/6.0-opw-4630-jvo into lp:openobject-server/6.0
Review: Needs Fixing
Something I missed in my first look: the search on ir.values should instead rely on the 'value' column, which will hold the reference in the form 'ir.actions.act_window,42', while the 'model' column is in fact related to the object to which that ir.values entry related too.
Here's an illustration:
=> select id,key2,model,value from ir_values where model = 'res.partner' limit 1;
id | key2 | model | value
----+--------------------+-------------+--------------------------
49 | client_print_multi | res.partner | ir.actions.report.xml,56
So we'll want to do something like:
ir_value_ids = pool_ir_values.search(cr, uid,
[('value','in',['%s,%s' % (self._name,sid) for sid in sub_ids])],
context=context)
pool_ir_values.unlink(cr, uid, ir_value_ids, context=context)
--
https://code.launchpad.net/~openerp-dev/openobject-server/6.0-opw-4630-jvo/+merge/54355
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-server/6.0-opw-4630-jvo.
References