diff options
| author | Jérome Maes <jem@openerp.com> | 2016-02-04 11:03:49 +0100 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2016-02-04 11:46:04 +0100 |
| commit | cf8b05a16d5e9ee466d8ff6e51fc53b9a7982b5e (patch) | |
| tree | 182442a950aa9b998075033105e2e4f568d53e5a /addons/website_theme_install/models/ir_module_module.py | |
| parent | 703a2faf7847c102a00665698f8bf375a0c48f9e (diff) | |
[FIX] website_theme_install : bad method signature
In new api, the context in encapsulated and propagated with 'env'. There is no need to add in the signature. Method decorated with api.multi/api.model replace method(self, cr, uid, context).
Diffstat (limited to 'addons/website_theme_install/models/ir_module_module.py')
| -rw-r--r-- | addons/website_theme_install/models/ir_module_module.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/website_theme_install/models/ir_module_module.py b/addons/website_theme_install/models/ir_module_module.py index 09258d3385e..3a464bacd27 100644 --- a/addons/website_theme_install/models/ir_module_module.py +++ b/addons/website_theme_install/models/ir_module_module.py @@ -10,8 +10,8 @@ class IrModuleModule(models.Model): string='Screenshots', readonly=True) @api.model - def update_list(self, context=None): - res = super(IrModuleModule, self).update_list(context=context) + def update_list(self): + res = super(IrModuleModule, self).update_list() IrAttachment = self.env['ir.attachment'] existing_urls = IrAttachment.search_read([['res_model', '=', self._name], ['type', '=', 'url']], ['url']) @@ -36,15 +36,15 @@ class IrModuleModule(models.Model): return res @api.multi - def button_choose_theme(self, context): + def button_choose_theme(self): theme_category_id = self.env.ref('base.module_category_theme').id self.search([ # Uninstall the theme(s) which is (are) installed ('state', '=', 'installed'), '|', ('category_id', 'not in', [self.env.ref('base.module_category_hidden').id, self.env.ref('base.module_category_theme_hidden').id]), ('name', '=', 'theme_default'), '|', ('category_id', '=', theme_category_id), ('category_id.parent_id', '=', theme_category_id) - ]).button_immediate_uninstall(context=context) + ]).button_immediate_uninstall() - next_action = self.button_immediate_install(context=context) # Then install the new chosen one + next_action = self.button_immediate_install() # Then install the new chosen one if next_action.get('tag') == 'reload' and not next_action.get('params', {}).get('menu_id'): next_action = self.env.ref('website.action_website_tutorial').read()[0] |
