From 6f4f0ab0fb2b2784a4ddc4a3889b6b67bfa2147f Mon Sep 17 00:00:00 2001
From: hyyy <123@qq.com>
Date: Tue, 18 Feb 2025 15:44:40 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=80=E5=85=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E5=B1=95=E5=BC=80=E5=88=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_base/views/tool_views.xml | 10 +++++-----
sf_sale/static/src/css/purchase_list.css | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sf_base/views/tool_views.xml b/sf_base/views/tool_views.xml
index e0679e55..e9d672e5 100644
--- a/sf_base/views/tool_views.xml
+++ b/sf_base/views/tool_views.xml
@@ -187,23 +187,23 @@
+ widget="many2one_radio" attrs="{'showExpand': True}"/>
-
+
-
+
-
+
-
+
diff --git a/sf_sale/static/src/css/purchase_list.css b/sf_sale/static/src/css/purchase_list.css
index 5e2aa86e..ec3d1e76 100644
--- a/sf_sale/static/src/css/purchase_list.css
+++ b/sf_sale/static/src/css/purchase_list.css
@@ -2,7 +2,7 @@
min-width: 62px !important;
}
-.section_and_note_text span{
+.section_and_note_text, .section_and_note_text span{
white-space: wrap!important;
overflow: auto!important;
text-overflow: unset!important;
From 6984f3154713d16009af410019a44d3494b64ac9 Mon Sep 17 00:00:00 2001
From: hyyy <123@qq.com>
Date: Tue, 18 Feb 2025 16:23:25 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/js/custom_form_status_indicator.js | 31 +++----------------
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
index 038c2dc0..5d8b2fbf 100644
--- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js
+++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
@@ -9,7 +9,6 @@ import {ListRenderer} from "@web/views/list/list_renderer";
import {FormLabel} from "@web/views/form/form_label";
import { fieldVisualFeedback } from "@web/views/fields/field";
-import {Field} from "@web/views/fields/field";
var Dialog = require('web.Dialog');
// var {patch} = require("web.utils") 这句话也行
@@ -53,7 +52,6 @@ const tableRequiredList = [
'product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty',
'name', 'fault_type', 'maintenance_standards', 'Period'
]
-
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
setup() {
owl.onMounted(() => {
@@ -109,30 +107,7 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
}
);
-patch(Field.prototype, 'jikimo_frontend.Field', {
- setup() {
- owl.onMounted(this.setRequired);
- return this._super(...arguments);
- },
- setRequired() {
- const id = this.props.id
- const isRequired = filedRequiredList[id]
- if(isRequired) {
- let dom;
- dom = $(`label[for=${id}]`)
- if(isRequired.multiple && dom.length > 1) {
- dom = dom.eq(-1)
- dom = dom.parent().parent().next().find('label')
- }
- if(isRequired.noLabel) {
- dom = dom.parent().parent()
- }
- let t = dom.html()
- t = '*' + t
- dom.html(t)
- }
- }
-})
+
patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
setup(){
owl.onMounted(() => {
@@ -200,7 +175,9 @@ patch(FormLabel.prototype, 'jikimo_frontend.FormLabel', {
this.props.fieldInfo
);
const classes = this.props.className ? [this.props.className] : [];
- if(this.props.fieldInfo?.rawAttrs?.class?.indexOf('custom_required') >= 0) {
+ const otherRequired = filedRequiredList[this.props.fieldName]
+
+ if(this.props.fieldInfo?.rawAttrs?.class?.indexOf('custom_required') >= 0 || otherRequired) {
classes.push('custom_required_add')
}
if (invalid) {