Skip to content
Snippets Groups Projects
Commit 2c50ae94 authored by Daniel Reis's avatar Daniel Reis Committed by Martin Trigaux
Browse files

[FIX] website: language must be empty if company has no website


The `language_ids` field on `res.config.settings` was made required field.
However, in a multi-company setting, where the active company does not have a
website, this field will be empty, and the user won't be able to save
any configuration changes.

closes odoo/odoo#41027

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 608f1a03
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ class ResConfigSettings(models.TransientModel):
website_domain = fields.Char('Website Domain', related='website_id.domain', readonly=False)
website_country_group_ids = fields.Many2many(related='website_id.country_group_ids', readonly=False)
website_company_id = fields.Many2one(related='website_id.company_id', string='Website Company', readonly=False)
language_ids = fields.Many2many(related='website_id.language_ids', relation='res.lang', readonly=False, required=True)
language_ids = fields.Many2many(related='website_id.language_ids', relation='res.lang', readonly=False)
language_count = fields.Integer(string='Number of languages', compute='_compute_language_count', readonly=True)
website_default_lang_id = fields.Many2one(
string='Default language', related='website_id.default_lang_id', readonly=False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment