[FIX] various: display full name/title in form views
With commit[1], we added `o_text_overflow` classes at several places to avoid
long names going out of the boxes. However, for the name/title fields in the
form views, we should always show the full name.
So this commit replaces `o_text_overflow` class with `text-break` from
name/title fields in the form views to display full string in the read
only mode, but also keep them from going outside of the form view.
Below are the modules affected:
- base
- coupon
- crm
- event
- mass_mailing
- mass_mailing_sms
- project
- sales_team
commit[1] - a0ebb46
task-2889845
closes odoo/odoo#96132
X-original-commit: 4a74c7af6b54bd771f50d3885813f4aae442c9e7
Related: odoo/enterprise#29552
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
committed by
Aurélien Warnon
parent
178e599360
commit
6807eea38c
@@ -48,7 +48,7 @@
|
||||
<widget name="web_ribbon" title="Lost" bg_color="bg-danger" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Won" attrs="{'invisible': [('probability', '<', 100)]}" />
|
||||
<div class="oe_title">
|
||||
<h1><field class="o_text_overflow" name="name" placeholder="e.g. Product Pricing"/></h1>
|
||||
<h1><field class="text-break" name="name" placeholder="e.g. Product Pricing"/></h1>
|
||||
<h2 class="o_row g-0 align-items-end">
|
||||
<div class="col" attrs="{'invisible': [('type', '=', 'lead')]}">
|
||||
<label for="expected_revenue" class="oe_edit_only" />
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<field name="kanban_state" widget="state_selection" class="ms-auto float-end"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Event Name"/>
|
||||
<h1><field class="o_text_overflow" name="name" placeholder="e.g. Conference for Architects"/></h1>
|
||||
<h1><field class="text-break" name="name" placeholder="e.g. Conference for Architects"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Program Name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. 10% discount on laptops"/>
|
||||
<field name="name" class="text-break" placeholder="e.g. 10% discount on laptops"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Contact Name"/>
|
||||
<h1>
|
||||
<field class="o_text_overflow" name="name" placeholder="e.g. John Smith"/>
|
||||
<field class="text-break" name="name" placeholder="e.g. John Smith"/>
|
||||
</h1>
|
||||
<div>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" placeholder="Tags" style="width: 100%"/>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" class="o_text_overflow" placeholder="e.g. Consumer Newsletter"/>
|
||||
<field name="name" class="text-break" placeholder="e.g. Consumer Newsletter"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}" force_save="1"/>
|
||||
<label for="subject">Subject</label>
|
||||
<div class="o_mass_mailing_subject d-flex flex-row align-items-baseline">
|
||||
<field class="o_text_overflow" name="subject" string="Subject"
|
||||
<field class="text-break" name="subject" string="Subject"
|
||||
attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"
|
||||
widget="char_emojis" placeholder="e.g. New Sale on all T-shirts"/>
|
||||
<field name="favorite" invisible="1"/>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
For an SMS Text Message, internal Title of the Message.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='subject']" position="after">
|
||||
<field class="o_text_overflow" name="sms_subject" string="Title" placeholder="e.g. Black Friday SMS coupon" attrs="{'invisible': [('mailing_type', '!=', 'sms')], 'readonly': [('state', 'in', ('sending', 'done'))], 'required': [('mailing_type', '=', 'sms')]}"/>
|
||||
<field class="text-break" name="sms_subject" string="Title" placeholder="e.g. Black Friday SMS coupon" attrs="{'invisible': [('mailing_type', '!=', 'sms')], 'readonly': [('state', 'in', ('sending', 'done'))], 'required': [('mailing_type', '=', 'sms')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='action_set_favorite']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|', ('mailing_type', '!=', 'mail'), ('favorite', '=', True)]}</attribute>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<h1>
|
||||
<div class="d-flex">
|
||||
<field name="priority" widget="priority" class="me-3"/>
|
||||
<field class="o_text_overflow" name="name" placeholder="e.g. Cheese Burger"/>
|
||||
<field class="text-break" name="name" placeholder="e.g. Cheese Burger"/>
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@@ -512,7 +512,7 @@
|
||||
<div class="oe_title">
|
||||
<h1 class="d-flex flex-row">
|
||||
<field name="is_favorite" nolabel="1" widget="boolean_favorite" class="me-3"/>
|
||||
<field name="name" class="o_text_overflow" placeholder="Project Name"/>
|
||||
<field name="name" class="text-break" placeholder="Project Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Sales Team"/>
|
||||
<h1>
|
||||
<field class="o_text_overflow" name="name" placeholder="e.g. North America"/>
|
||||
<field class="text-break" name="name" placeholder="e.g. North America"/>
|
||||
</h1>
|
||||
<div name="options_active"/>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="oe_button_box d-flex justify-content-end" name="button_box">
|
||||
</div>
|
||||
<group id="top-group">
|
||||
<field class="o_text_overflow" name="title" string="Campaign Name" placeholder="e.g. Black Friday"/>
|
||||
<field class="text-break" name="title" string="Campaign Name" placeholder="e.g. Black Friday"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="user_id" domain="[('share', '=', False)]"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
|
||||
|
||||
@@ -172,8 +172,8 @@
|
||||
<field name="country_code" invisible="1"/>
|
||||
<field name="company_type" widget="radio" options="{'horizontal': true}"/>
|
||||
<h1>
|
||||
<field id="company" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact'),('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
|
||||
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact'), ('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
|
||||
<field id="company" class="text-break" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact'),('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
|
||||
<field id="individual" class="text-break" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact'), ('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
|
||||
</h1>
|
||||
<div class="o_row">
|
||||
<field name="parent_id"
|
||||
|
||||
Reference in New Issue
Block a user