Created
June 10, 2016 11:09
-
-
Save simahawk/23c90416639ab2d3658a846ec6a57d46 to your computer and use it in GitHub Desktop.
odoo stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.model | |
def translate(self, term): | |
"""Load `term` translation.""" | |
translations = self.env['ir.translation'] | |
name = '' # can ben empty since we are passing the source = term | |
_type = 'code' | |
lang = self.env.context.get('lang') | |
return translations._get_source(name, _type, lang, source=term) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment