mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[REN] rename to web_advanced_filters
This commit is contained in:
@@ -56,6 +56,7 @@ this query before uninstalling to avoid that:
|
||||
'web',
|
||||
],
|
||||
"data": [
|
||||
"data/migration.xml",
|
||||
"wizard/ir_filters_combine_with_existing.xml",
|
||||
"view/ir_filters.xml",
|
||||
],
|
||||
6
web_advanced_filters/data/migration.xml
Normal file
6
web_advanced_filters/data/migration.xml
Normal 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>
|
||||
@@ -148,3 +148,20 @@ class IrFilters(Model):
|
||||
cr.execute(
|
||||
'ALTER table %s RENAME domain TO domain_this' % self._table)
|
||||
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')")
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user