[REN] rename to web_advanced_filters

pull/29/head
Holger Brunn 2014-11-24 14:26:40 +01:00
parent 6ff2b14f15
commit 48e9c42a1c
14 changed files with 24 additions and 0 deletions

View File

@ -56,6 +56,7 @@ this query before uninstalling to avoid that:
'web', 'web',
], ],
"data": [ "data": [
"data/migration.xml",
"wizard/ir_filters_combine_with_existing.xml", "wizard/ir_filters_combine_with_existing.xml",
"view/ir_filters.xml", "view/ir_filters.xml",
], ],

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<function name="_migrate_name_change" model="ir.filters" />
</data>
</openerp>

View File

@ -148,3 +148,20 @@ class IrFilters(Model):
cr.execute( cr.execute(
'ALTER table %s RENAME domain TO domain_this' % self._table) 'ALTER table %s RENAME domain TO domain_this' % self._table)
return super(IrFilters, self)._auto_init(cr, context=context) return super(IrFilters, self)._auto_init(cr, context=context)
def _migrate_name_change(self, cr, uid, context=None):
cr.execute(
"select id from ir_module_module where name='advanced_filters' "
"and author='Therp BV'")
old_name_installed = cr.fetchall()
if not old_name_installed:
return
cr.execute(
"delete from ir_model_data where module='web_advanced_filters'")
cr.execute(
"update ir_model_data set module='web_advanced_filters' "
"where module='advanced_filters'")
cr.execute(
"update ir_module_module set state='to remove' where "
"name='advanced_filters' and state not in "
"('uninstalled', 'to remove')")

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB