Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/功能刀具组装优化
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
'jikimo_frontend/static/src/views/list_nums/list_nums.xml',
|
'jikimo_frontend/static/src/views/list_nums/list_nums.xml',
|
||||||
'jikimo_frontend/static/src/views/list_nums/list_nums2.xml',
|
'jikimo_frontend/static/src/views/list_nums/list_nums2.xml',
|
||||||
'jikimo_frontend/static/src/views/list_nums/list_nums3.xml',
|
'jikimo_frontend/static/src/views/list_nums/list_nums3.xml',
|
||||||
|
'jikimo_frontend/static/src/js/custom_form_status_indicator.js',
|
||||||
],
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/** @odoo-module */
|
||||||
|
|
||||||
|
import {patch} from '@web/core/utils/patch';
|
||||||
|
// import { Dialog } from "@web/core/dialog/dialog";
|
||||||
|
import {_t} from "@web/core/l10n/translation";
|
||||||
|
import {FormStatusIndicator} from "@web/views/form/form_status_indicator/form_status_indicator"
|
||||||
|
|
||||||
|
var Dialog = require('web.Dialog');
|
||||||
|
// var {patch} = require("web.utils") 这句话也行
|
||||||
|
|
||||||
|
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
||||||
|
// 你可以重写或者添加一些方法和属性
|
||||||
|
async _onDiscardChanges() {
|
||||||
|
var self = this;
|
||||||
|
Dialog.confirm(this, _t("Are you sure you want to discard changes?"), {
|
||||||
|
title: _t("Discard Changes"),
|
||||||
|
|
||||||
|
// confirm_callback: function () {
|
||||||
|
// self.model.discardChanges(self.handle);
|
||||||
|
// },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async discard() {
|
||||||
|
// if (window.confirm("Are you sure you want to discard changes?")) {
|
||||||
|
// await this.props.discard();
|
||||||
|
// }
|
||||||
|
const result = await this._confirmDiscardChange();
|
||||||
|
await this.props.discard();
|
||||||
|
},
|
||||||
|
|
||||||
|
_confirmDiscardChange(){
|
||||||
|
var self = this;
|
||||||
|
var def = new Promise(function (resolve, reject) {
|
||||||
|
var message = _t("请确认是否要舍弃之前的更改?");
|
||||||
|
var dialog = Dialog.confirm(self, message, {
|
||||||
|
title: _t("Warning"),
|
||||||
|
confirm_callback: resolve.bind(self, true),
|
||||||
|
cancel_callback: reject,
|
||||||
|
});
|
||||||
|
dialog.on('closed', self, reject);
|
||||||
|
});
|
||||||
|
return def;
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
""",
|
""",
|
||||||
'category': 'sf',
|
'category': 'sf',
|
||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['account', 'base', 'mrp_workorder', 'sale'],
|
'depends': ['account', 'base', 'mrp_workorder', 'sale', 'purchase'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group_security.xml',
|
'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
|||||||
@@ -316,6 +316,14 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
robot_operating_temperature = fields.Char('环境温度')
|
robot_operating_temperature = fields.Char('环境温度')
|
||||||
robot_operating_humidity = fields.Char('环境湿度')
|
robot_operating_humidity = fields.Char('环境湿度')
|
||||||
|
|
||||||
|
# 其他参数(所有设备)
|
||||||
|
date_of_purchase = fields.Date('采购日期')
|
||||||
|
date_of_manufacture = fields.Date('出厂日期')
|
||||||
|
date_of_warranty = fields.Date('质保截至日期')
|
||||||
|
original_value = fields.Char('原值')
|
||||||
|
incomplete_value = fields.Char('残值')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -972,6 +972,11 @@
|
|||||||
<xpath expr="//page[@name='maintenance']" position="after">
|
<xpath expr="//page[@name='maintenance']" position="after">
|
||||||
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
<page string="其他" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||||
<group string="其他">
|
<group string="其他">
|
||||||
|
<field name="date_of_purchase"/>
|
||||||
|
<field name="date_of_manufacture"/>
|
||||||
|
<field name="date_of_warranty"/>
|
||||||
|
<field name="original_value"/>
|
||||||
|
<field name="incomplete_value"/>
|
||||||
<field name="remark"/>
|
<field name="remark"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,29 @@
|
|||||||
<field name="active" eval="False"/>
|
<field name="active" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- 移除字段属性 -->
|
||||||
|
<record id="view_order_form_inherited" model="ir.ui.view">
|
||||||
|
<field name="name">sale.order.form.inherited</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='order_line']" position="attributes">
|
||||||
|
<attribute name="widget"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_purchase_form_inherited" model="ir.ui.view">
|
||||||
|
<field name="name">purchase.order.form.inherited</field>
|
||||||
|
<field name="model">purchase.order</field>
|
||||||
|
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='order_line']" position="attributes">
|
||||||
|
<attribute name="widget"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <record id="mrp_workorder.menu_mrp_workorder_workcenter" model="ir.ui.menu"> -->
|
<!-- <record id="mrp_workorder.menu_mrp_workorder_workcenter" model="ir.ui.menu"> -->
|
||||||
|
|||||||
Reference in New Issue
Block a user