Exemplo n.º 1
0
 def get_website_translations(self, lang, mods=None):
     module_obj = request.registry['ir.module.module']
     module_ids = module_obj.search(request.cr, request.uid, [('name', 'ilike', 'website'), ('state', '=', 'installed')], context=request.context)
     modules = [x['name'] for x in module_obj.read(request.cr, request.uid, module_ids, ['name'], context=request.context)]
     if mods:
         modules += mods
     return WebClient().translations(mods=modules, lang=lang)
Exemplo n.º 2
0
 def get_website_translations(self, lang, mods=None):
     Modules = request.env['ir.module.module'].sudo()
     modules = Modules.search([('name', 'ilike', 'website'),
                               ('state', '=', 'installed')]).mapped('name')
     if mods:
         modules += mods
     return WebClient().translations(mods=modules, lang=lang)