修改必填标识js,修改之前必填标识样式

This commit is contained in:
黄焱
2024-03-04 11:21:50 +08:00
parent 7edeb59853
commit 98103bac73
3 changed files with 5 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ $(function () {
var currentUrl = location.href var currentUrl = location.href
const customRequiredDom = { const customRequiredDom = {
label: ['label[for=production_line_id]','label[for=date_approve]','label[for=partner_id]', 'label[for=validity_date]', '.o_horizontal[role=radiogroup]', 'label[for=vat]', 'label[for=phone]', 'label[for=mobile]', 'label[for=email]', 'label[for=category_id]','label[for=date_order]','label[for=picking_type_id]'], label: ['label[for=production_line_id]','label[for=date_approve]','label[for=partner_id]', 'label[for=validity_date]', '.o_horizontal[role=radiogroup][aria-label="公司类别"]', 'label[for=vat]', 'label[for=phone]', 'label[for=mobile]', 'label[for=email]', 'label[for=category_id]','label[for=date_order]','label[for=picking_type_id]'],
table: ['product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty'] table: ['product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty']
} }
const listenerUrl = setInterval(() => { const listenerUrl = setInterval(() => {

View File

@@ -13,7 +13,7 @@ div:has(.o_required_modifier) > label::before {
color: red !important; color: red !important;
padding: 0 4px !important; padding: 0 4px !important;
vertical-align: top !important; vertical-align: top !important;
font-size: 1.5rem !important; font-size: unset !important;
} }
.my-image div { .my-image div {
@@ -325,7 +325,7 @@ div[class="o_content o_component_with_search_panel"] .show_state span {
div:has(.o_required_modifier) > label::before { div:has(.o_required_modifier) > label::before {
position: absolute; position: absolute;
left: -3px; left: 24px;
} }
//.o_form_view .o_form_label { //.o_form_view .o_form_label {

View File

@@ -74,8 +74,8 @@
<group string="基础参数"> <group string="基础参数">
<field name="control_system_id" attrs="{'required': [('equipment_type', '=', '机床')]}" <field name="control_system_id" attrs="{'required': [('equipment_type', '=', '机床')]}"
options="{'no_create': True}" class="custom_required"/> options="{'no_create': True}" class="custom_required"/>
<label for="workbench_L" string="工作台尺寸(mm)" class="custom_required"/> <label for="workbench_L" string="工作台尺寸(mm)"/>
<div class="test_model"> <div class="test_model custom_required">
<label for="workbench_L" string="长"/> <label for="workbench_L" string="长"/>
<field name="workbench_L" class="o_address_zip" <field name="workbench_L" class="o_address_zip"
attrs="{'required': [('equipment_type', '=', '机床')]}" attrs="{'required': [('equipment_type', '=', '机床')]}"