修改设备模块看板

This commit is contained in:
qihao.gong@jikimo.com
2023-08-16 17:30:30 +08:00
parent fac3450257
commit cd0f455db3
2 changed files with 159 additions and 130 deletions

View File

@@ -13,3 +13,20 @@
vertical-align: top !important;
font-size: 1.5rem !important;
}
.my-image div {
width: 100px !important;
height: 130px !important;
}
.add_flex {
display: flex;
flex-direction: column;
}
.maintenance_name {
font-weight: bold;
}
.o_kanban_renderer .o_kanban_record .o_kanban_record_has_image_fill .o_kanban_image_fill_left {
flex:unset !important;
}
.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom {
margin-top: 5px;
}

View File

@@ -32,7 +32,8 @@
<field name="equipment_type" invisible="1"/>
<field name="brand_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
force_save="1"/>
<field name="type_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" required="1" domain="[('brand_id', '=', brand_id)]"/>
<field name="type_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" required="1"
domain="[('brand_id', '=', brand_id)]"/>
<field name="machine_tool_category" readonly="1" attrs="{'invisible': [('type_id', '=', False)]}"
force_save="1"/>
</xpath>
@@ -258,28 +259,39 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='activity_state']" position="before">
<field name="state"/>
<field name="machine_tool_picture"/>
</xpath>
<xpath expr="//templates" position="inside">
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_global_click
<div t-attf-class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record oe_kanban_card oe_kanban_global_click
#{record.state.raw_value == '正常' ? 'kanban_color_1' : ''}
#{record.state.raw_value == '故障' ? 'kanban_color_2' : ''}
#{record.state.raw_value == '不可用' ? 'kanban_color_3' : ''}">
<field name="machine_tool_picture" class="o_kanban_image_fill_left d-block my-image"
preview_image="image_128" widget="background_image"/>
<!-- <field name="machine_tool_picture" widget="image" options="{'previewImage': false}"/>-->
<div class="add_flex">
<div class="o_kanban_card_header">
<div class="o_kanban_card_header_title">
<div class="o_kanban_card_header_title maintenance_name">
<field name="name"/>
</div>
</div>
<!-- 内容 -->
<div class="o_kanban_record_bottom">
<div class="o_kanban_record_bottom state_zc">
<field name="state_zc"/>
</div>
<div class="o_kanban_record_bottom">
<field name="factory_id"/>
<span> | </span>
<field name="supplier_id"/>
<div class="o_kanban_record_bottom state_zc">
<field name="state"/>
</div>
<!-- <div class="o_kanban_record_bottom">-->
<!-- <field name="factory_id"/>-->
<!-- <span> | </span>-->
<!-- <field name="supplier_id"/>-->
<!-- </div>-->
</div>
</div>
</t>
</xpath>