Default Language Translation

base_default_lang_translate
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/12.0/base_default_lang_translate
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Le Filament, Mariano Ruiz
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Le Filament, Mariano Ruiz
COMMITTERS
COMMITTERSremi-filament, OCA Transbot, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
res_lang_default_form res.lang.default.form res.lang field Inherits base.res_lang_form
res_lang_default_tree res.lang.default.tree res.lang field Inherits base.res_lang_tree
Models touched (2)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    @api.multi
    This part of code comes from https://bazaar.launchpad.net/~eoc/openobject-server/ + 6.1-overwrite_changes_translatable_fields/revision/4377 When the main language in the company is not English, you cannot change the value of a translatable field in the table if you not switch the client interface to 'en_US', because the new value will be written to ir_translation table instead of the table model. This complicates usability, and the default language for "model" values hardcoded as 'en_US' should be configurable (see https://bugs.launchpad.net/openobject-server/+bug/400256). With this patch, all changes made in selected default language will be written in 'en_US' too (in the table model) if : - vals are modified (it is later checked if vals are on translatable fields) - more than one language is installed - default language is set - current language = default language and not 'en_US' Also, translations in the other languages are changed to to_translate

New fields (1)
  • is_default_lang Boolean
    default=False args: 'Default Language'
Public methods (0)

No public methods.