修复员工模块js问题、能力特征哭js问题、设备处问题
This commit is contained in:
@@ -83,12 +83,8 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
|||||||
);
|
);
|
||||||
patch(Field.prototype, 'jikimo_frontend.Field', {
|
patch(Field.prototype, 'jikimo_frontend.Field', {
|
||||||
setup() {
|
setup() {
|
||||||
this.FieldComponent = this.props.fieldInfo.FieldComponent;
|
|
||||||
if (!this.FieldComponent) {
|
|
||||||
const fieldType = this.props.record.fields[this.props.name].type;
|
|
||||||
this.FieldComponent = getFieldClassFromRegistry(fieldType, this.props.type);
|
|
||||||
}
|
|
||||||
owl.onMounted(this.setRequired);
|
owl.onMounted(this.setRequired);
|
||||||
|
return this._super(...arguments);
|
||||||
},
|
},
|
||||||
setRequired() {
|
setRequired() {
|
||||||
const id = this.props.id
|
const id = this.props.id
|
||||||
|
|||||||
@@ -3,6 +3,13 @@
|
|||||||
import { registry } from "@web/core/registry";
|
import { registry } from "@web/core/registry";
|
||||||
import { url } from "@web/core/utils/urls";
|
import { url } from "@web/core/utils/urls";
|
||||||
import { ImageField, imageCacheKey } from '@web/views/fields/image/image_field';
|
import { ImageField, imageCacheKey } from '@web/views/fields/image/image_field';
|
||||||
|
import { isBinarySize } from "@web/core/utils/binary";
|
||||||
|
export const fileTypeMagicWordMap = {
|
||||||
|
"/": "jpg",
|
||||||
|
R: "gif",
|
||||||
|
i: "png",
|
||||||
|
P: "svg+xml",
|
||||||
|
};
|
||||||
|
|
||||||
const placeholder = "/web/static/img/placeholder.png";
|
const placeholder = "/web/static/img/placeholder.png";
|
||||||
|
|
||||||
@@ -15,7 +22,7 @@ export class CustomImageField extends ImageField {
|
|||||||
getUrl(previewFieldName) {
|
getUrl(previewFieldName) {
|
||||||
console.log('8888888888886666666666666666666')
|
console.log('8888888888886666666666666666666')
|
||||||
if (this.state.isValid && this.props.value) {
|
if (this.state.isValid && this.props.value) {
|
||||||
if (1) {
|
if (isBinarySize(this.props.value) || this.props.value.length < 50) {
|
||||||
if (!this.rawCacheKey) {
|
if (!this.rawCacheKey) {
|
||||||
this.rawCacheKey = this.props.record.data.__last_update;
|
this.rawCacheKey = this.props.record.data.__last_update;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
MTcode = fields.Char("机台编码")
|
MTcode = fields.Char("机台编码")
|
||||||
created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user)
|
||||||
equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'),
|
equipment_type = fields.Selection([('机床', '机床'), ('机器人', '机器人'), ('AGV小车', 'AGV小车'),
|
||||||
('检测设备', '检测设备')], compute='_compute_category_id')
|
('检测设备', '检测设备'), ('其他', '其他')], compute='_compute_category_id')
|
||||||
|
|
||||||
@api.depends('category_id')
|
@api.depends('category_id')
|
||||||
def _compute_category_id(self):
|
def _compute_category_id(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user