Accept Merge Request #698: (feature/制造代码优化 -> develop)

Merge Request: 优化警告问题

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/698
This commit is contained in:
马广威
2023-11-28 09:00:03 +08:00
committed by Coding
5 changed files with 8 additions and 13 deletions

View File

@@ -15,19 +15,18 @@ export class Many2OneRadioField extends RadioField {
// 放大图片逻辑 // 放大图片逻辑
// 获取图片元素 // 获取图片元素
const img = event.target; const img = event.target;
const close = img.nextSibling const close = img.nextSibling;
// 实现放大图片逻辑 // 实现放大图片逻辑
// 比如使用 CSS 放大 // 比如使用 CSS 放大
img.parentElement.classList.add('zoomed'); img.parentElement.classList.add('zoomed');
close.classList.add('img_close') close.classList.add('img_close');
} }
onCloseClick(event) { onCloseClick(event) {
const close = event.target; const close = event.target;
const img = close.previousSibling const img = close.previousSibling;
img.parentElement.classList.remove('zoomed') img.parentElement.classList.remove('zoomed');
close.classList.remove('img_close') close.classList.remove('img_close');
} }
get items() { get items() {
@@ -48,7 +47,7 @@ export class Many2OneRadioField extends RadioField {
} }
} }
Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField" Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField";
// MyCustomWidget.supportedTypes = ['many2many']; // MyCustomWidget.supportedTypes = ['many2many'];
registry.category("fields").add("many2one_radio", Many2OneRadioField); registry.category("fields").add("many2one_radio", Many2OneRadioField);

View File

@@ -533,7 +533,7 @@ class WorkCenterBarcode(models.Model):
action1 = json.dumps(action) action1 = json.dumps(action)
return action1 return action1
else: else:
return False return None
def cnc_file_download(self): def cnc_file_download(self):
""" """

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging import logging
from odoo import api, fields, models, _ from odoo import api, fields, models
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)

View File

@@ -73,10 +73,7 @@ class CustomChar extends CharField {
// this.$input.on('focus', function () { // this.$input.on('focus', function () {
// $(this).select(); // $(this).select();
// }); // });
// 当光标聚焦于输入框时,选中输入框内容 // 当光标聚焦于输入框时,选中输入框内容
} }
registry.category("fields").add("custom_char", CustomChar); registry.category("fields").add("custom_char", CustomChar);

View File

@@ -24,7 +24,6 @@ class CustomMany2One extends Many2OneField {
this.select(); this.select();
}); });
} }
} }
registry.category("fields").add("custom_many2one", CustomMany2One); registry.category("fields").add("custom_many2one", CustomMany2One);