[IMP] base: do not resize module icons

Most of the modules have a square icon but some don't. For instance, the
flags of l10n modules, or other third party modules.
Flags have very specific proportions, and we don't want them to be
resized when rendered.
While we could hardcode a square icon for each problematic icon, it
would be more manipulations, and the flags are already in the repo
without the right proportions; we don't want to duplicate binaries.

The many2many `module_ids` kanban field of the uninstall wizard has also
been updated to look more like the generic kanban view for the modules.

The classes in the kanban view of `fleet_vehicle_model_view_form` seem
to have been copy-pasted and are useless. It has been removed to reduce
future possible side effects of changing css.

closes odoo/odoo#56421

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
wan
2021-01-15 15:56:47 +00:00
parent 8aa68445a6
commit 864f962145
3 changed files with 27 additions and 63 deletions
@@ -33,8 +33,8 @@
<templates>
<t t-name="kanban-box">
<div style="position: relative" class="oe_kanban_global_click">
<div class="oe_module_vignette">
<div class="oe_module_desc o_kanban_record_title">
<div>
<div class="o_kanban_record_title">
<field name="name"/>
</div>
</div>
+7 -45
View File
@@ -1,16 +1,20 @@
.oe_module_icon {
width: 70px;
height: 70px;
max-height: 70px;
max-width: 23%;
float: left;
}
.oe_module_desc {
font-size: 13px;
padding-left: 10px;
width: 77%;
}
.oe_module_icon + .oe_module_desc {
padding-left: 80px;
.o_kanban_view .oe_module_vignette.o_kanban_record {
align-items: center;
display: flex;
}
.o_modules_kanban.o_kanban_view .o_kanban_record .o_dropdown_kanban {
@@ -54,45 +58,3 @@
max-width: 70px;
max-height: 70px;
}
/*.oe_module_icon {
width: 45px;
height: 45px;
float: left;
}
.oe_module_desc > h4, .oe_module_desc > .oe_module_name {
margin-right: 20px;
display: block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.oe_module_desc > h4 {
margin-top: 0;
}
.oe_module_desc {
min-width: 0;
}
.oe_module_name {
margin-top: 8px;
font-size: small;
}
.oe_module_icon + .oe_module_desc {
margin-left: 10px;
}
.oe_module_action {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #F9F9F9;
position: relative;
}*/
@@ -13,24 +13,26 @@
<field name="module_ids" mode="kanban">
<kanban create="false">
<field name="icon"/>
<field name="name"/>
<field name="shortdesc"/>
<field name="state"/>
<field name="summary"/>
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette">
<img t-attf-src="#{record.icon.value}" alt="Icon"
class="oe_module_icon" style="width: 60px; height: 60px"/>
<div class="oe_module_desc" style="padding-left: 70px">
<h4><field name="shortdesc"/></h4>
<p class="oe_module_name">
<t t-if="record.summary.raw_value"><field name="summary"/><br/></t>
<i><field name="name" groups="base.group_no_one"/></i>
</p>
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette">
<t t-set="installed" t-value="record.state.raw_value == 'installed'" />
<img t-attf-src="#{record.icon.value}" class="oe_module_icon" alt="Icon" />
<div class="oe_module_desc" t-att-title="record.shortdesc.value">
<h4 class="o_kanban_record_title">
<field name="shortdesc" />&amp;nbsp;
</h4>
<p class="oe_module_name">
<field groups="!base.group_no_one" name="summary" />
<code groups="base.group_no_one">
<field name="name" /></code>
</p>
</div>
</div>
</div>
</t>
</templates>
</t>
</templates>
</kanban>
</field>
<h3>The following documents will be permanently lost</h3>