[FIX] base,crm: revert possibility to install language

Revert the possibility to install languages from the form views
of opportunity/lead and partner.
We consider that the quick installation of languages is too
advanced and admin people can go through the dedicated menu if
need be.

task-2839020

closes odoo/odoo#91750

X-original-commit: 5a616997659b2359ec946883b620e2fae6d6c39d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Jérémy Hennecart (jeh)
2022-05-19 13:45:01 +02:00
parent 0f23671275
commit bca719293d
2 changed files with 5 additions and 36 deletions
+4 -24
View File
@@ -127,18 +127,8 @@
<field name="website" widget="url" placeholder="e.g. https://www.odoo.com"/>
<field name="lang_active_count" invisible="1"/>
<field name="lang_code" invisible="1"/>
<label for="lang_id" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}"/>
<div class="o_row" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}">
<field name="lang_id" options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
<button
type="action"
name="%(base.res_lang_act_window)d"
class="oe_edit_only btn-sm btn-link mb4 fa fa-globe"
aria-label="More languages"
groups="base.group_system"
title="More languages"
/>
</div>
<field name="lang_id" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}"
options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
</group>
<group name="opportunity_partner" attrs="{'invisible': [('type', '=', 'lead')]}">
@@ -307,18 +297,8 @@
</div>
<field name="website" widget="url" placeholder="e.g. https://www.odoo.com"/>
<field name="lang_active_count" invisible="1"/>
<label for="lang_id" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}"/>
<div class="o_row" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}">
<field name="lang_id" options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
<button
type="action"
name="%(base.res_lang_act_window)d"
class="btn-sm btn-link mb4 oe_edit_only fa fa-globe"
aria-label="More languages"
groups="base.group_system"
title="More languages"
/>
</div>
<field name="lang_id" attrs="{'invisible': [('lang_active_count', '&lt;=', 1)]}"
options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
</group>
<group class="mt48">
<label for="contact_name_page_lead"/>
+1 -12
View File
@@ -217,18 +217,7 @@
<field name="title" options='{"no_open": True}' placeholder="e.g. Mister"
attrs="{'invisible': [('is_company', '=', True)]}"/>
<field name="active_lang_count" invisible="1"/>
<label for="lang" attrs="{'invisible': [('active_lang_count', '&lt;=', 1)]}"/>
<div class="o_row" attrs="{'invisible': [('active_lang_count', '&lt;=', 1)]}">
<field name="lang"/>
<button
type="action"
name="%(base.res_lang_act_window)d"
class="oe_edit_only btn-sm btn-link mb4 fa fa-globe"
aria-label="More languages"
groups="base.group_system"
title="More languages"
/>
</div>
<field name="lang" attrs="{'invisible': [('active_lang_count', '&lt;=', 1)]}"/>
<field name="category_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Tags..."/>
</group>
</group>