Community mailing list archives

Load localization module 'ir.module.module' - Odoo v10 community

- 11/26/2016 14:40:07

Hi, I have this code:

class IrModuleModule(models.Model):
    _inherit = 'ir.module.module'

    def search(self, args, offset=0, limit=None, order=None, count=False):
        new_args = []
        for arg in args:
            if arg[0] == 'name' and arg[1] == '=' and arg[2] == 'l10n_cl':
                arg = list(arg)
                arg[2] = 'l10n_cl_base'
            elif arg[0] == 'name' and arg[1] == 'in' and 'l10n_cl' in arg[2]:
                arg = list(arg)
                arg[2] = [
                    'l10n_cl_base' if x == 'l10n_cl' else x for x in arg[2]]
        return super(IrModuleModule, self).search(
            new_args, offset, limit, order, count=count)

From a module, which has this method, I'm trying to load l10n_cl_base instead of l10n_cl

So far, I managed to stop loading l10n_cl , but now it doesn't loads l10n_cl_base either

Any ideas on this?
Kristian Koci
Linux User #582221