Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
# Conflicts: # sf_warehouse/security/ir.model.access.csv
This commit is contained in:
@@ -9,54 +9,144 @@ var Dialog = require('web.Dialog');
|
|||||||
// var {patch} = require("web.utils") 这句话也行
|
// var {patch} = require("web.utils") 这句话也行
|
||||||
|
|
||||||
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
|
||||||
// 你可以重写或者添加一些方法和属性
|
// 你可以重写或者添加一些方法和属性
|
||||||
async _onDiscardChanges() {
|
async _onDiscardChanges() {
|
||||||
// var self = this;
|
// var self = this;
|
||||||
Dialog.confirm(this, _t("Are you sure you want to discard changes?"), {
|
Dialog.confirm(this, _t("Are you sure you want to discard changes?"), {
|
||||||
title: _t("Discard Changes"),
|
title: _t("Discard Changes"),
|
||||||
|
|
||||||
// confirm_callback: function () {
|
// confirm_callback: function () {
|
||||||
// self.model.discardChanges(self.handle);
|
// self.model.discardChanges(self.handle);
|
||||||
// },
|
// },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
async discard() {
|
async discard() {
|
||||||
// if (window.confirm("Are you sure you want to discard changes?")) {
|
// if (window.confirm("Are you sure you want to discard changes?")) {
|
||||||
// await this.props.discard();
|
// await this.props.discard();
|
||||||
// }
|
// }
|
||||||
// const result = await this._confirmDiscardChange();
|
// const result = await this._confirmDiscardChange();
|
||||||
await this._confirmDiscardChange();
|
await this._confirmDiscardChange();
|
||||||
await this.props.discard();
|
await this.props.discard();
|
||||||
},
|
},
|
||||||
|
|
||||||
_confirmDiscardChange(){
|
_confirmDiscardChange() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var def = new Promise(function (resolve, reject) {
|
var def = new Promise(function (resolve, reject) {
|
||||||
var message = _t("请确认是否要舍弃之前的更改?");
|
var message = _t("请确认是否要舍弃之前的更改?");
|
||||||
var dialog = Dialog.confirm(self, message, {
|
var dialog = Dialog.confirm(self, message, {
|
||||||
title: _t("Warning"),
|
title: _t("Warning"),
|
||||||
confirm_callback: resolve.bind(self, true),
|
confirm_callback: resolve.bind(self, true),
|
||||||
cancel_callback: reject,
|
cancel_callback: reject,
|
||||||
});
|
});
|
||||||
dialog.on('closed', self, reject);
|
dialog.on('closed', self, reject);
|
||||||
});
|
});
|
||||||
return def;
|
return def;
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$(function (){
|
$(function () {
|
||||||
document.addEventListener('click', function () {
|
document.addEventListener('click', function () {
|
||||||
const dom = $('.o_form_status_indicator_buttons ')
|
const dom = $('.o_form_status_indicator_buttons ')
|
||||||
if(dom) {
|
if (dom) {
|
||||||
const dom1 = dom.children().eq(0)
|
const dom1 = dom.children().eq(0)
|
||||||
const dom2 = dom.children().eq(1)
|
const dom2 = dom.children().eq(1)
|
||||||
if(!dom1.text()) {
|
if (!dom1.text()) {
|
||||||
dom1.append('保存')
|
dom1.append('保存')
|
||||||
dom2.append('取消')
|
dom2.append('取消')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function customRequired() {
|
||||||
|
let timer = null
|
||||||
|
let timer_count = 0
|
||||||
|
clearInterval(timer)
|
||||||
|
timer = setInterval(() => {
|
||||||
|
timer_count++
|
||||||
|
const dom = $('.custom_required')
|
||||||
|
let tableDom = $('.table_custom_required')
|
||||||
|
if (tableDom.length) {
|
||||||
|
tableDom = tableDom.eq(0).parents('tr').children('.table_custom_required')
|
||||||
|
tableDom.each(function () {
|
||||||
|
const i = $(this).index()
|
||||||
|
const requiredDom = $(this).parents('table').find('thead').find('th').eq(i).find('span').eq(0)
|
||||||
|
const t = requiredDom.text().replace('*', '')
|
||||||
|
requiredDom.html('<i style="color: red;margin-left: -4px">*</i>' + t)
|
||||||
|
})
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
if (dom.length) {
|
||||||
|
dom.each(function () {
|
||||||
|
const requiredDom = $(this).parent().prev().find('label')
|
||||||
|
let t = requiredDom.html()
|
||||||
|
if (t.indexOf('c*') < 0) {
|
||||||
|
t = '<i class="c*" style="color: red;margin-left: -4px">*</i>' + t
|
||||||
|
}
|
||||||
|
requiredDom.html(t)
|
||||||
|
})
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
if (timer_count == 20) {
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
function setRequired(dom = {label: [], table: []}) {
|
||||||
|
let domTimer = null
|
||||||
|
let timer_count = 0
|
||||||
|
clearInterval(domTimer)
|
||||||
|
domTimer = setInterval(() => {
|
||||||
|
timer_count++
|
||||||
|
const lint = $('.o_form_view_container')
|
||||||
|
if (lint.length) {
|
||||||
|
clearInterval(domTimer)
|
||||||
|
const {label, table} = dom
|
||||||
|
if (label.length) {
|
||||||
|
$(dom.label.join(',')).each(function () {
|
||||||
|
let t = $(this).html()
|
||||||
|
if (t.indexOf('c*') < 0) {
|
||||||
|
t = '<i class="c*" style="color: red;margin-left: -6px;margin-right: 2px">*</i>' + t
|
||||||
|
}
|
||||||
|
$(this).html(t)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (table.length) {
|
||||||
|
table.forEach(_ => {
|
||||||
|
const th = $(`th[data-name=${_}]`)
|
||||||
|
const t = th.find('span').eq(0).text().replace('*','')
|
||||||
|
th.find('span').eq(0).html('<i style="color: red">*</i>' + t)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (timer_count == 20) {
|
||||||
|
clearInterval(domTimer)
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
var currentUrl = location.href
|
||||||
|
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]'],
|
||||||
|
table: ['product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty']
|
||||||
|
}
|
||||||
|
const listenerUrl = setInterval(() => {
|
||||||
|
const isChange = currentUrl != location.href
|
||||||
|
if (isChange) {
|
||||||
|
currentUrl = location.href
|
||||||
|
customRequired()
|
||||||
|
setRequired(customRequiredDom)
|
||||||
|
}
|
||||||
|
if($('label[for=production_line_id]')) {
|
||||||
|
setRequired({table: [], label: ['label[for=production_line_id]']})
|
||||||
|
}
|
||||||
|
}, 500)
|
||||||
|
customRequired()
|
||||||
|
setRequired(customRequiredDom)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -263,6 +263,8 @@ class QualityCheck(models.Model):
|
|||||||
picture = fields.Binary('Picture', attachment=True)
|
picture = fields.Binary('Picture', attachment=True)
|
||||||
additional_note = fields.Text(
|
additional_note = fields.Text(
|
||||||
'Additional Note', help="Additional remarks concerning this check.")
|
'Additional Note', help="Additional remarks concerning this check.")
|
||||||
|
report_result = fields.Char('检测结果', readonly=True)
|
||||||
|
report_pdf = fields.Binary('检测报告', readonly=True)
|
||||||
|
|
||||||
def _compute_alert_count(self):
|
def _compute_alert_count(self):
|
||||||
alert_data = self.env['quality.alert'].read_group([('check_id', 'in', self.ids)], ['check_id'], ['check_id'])
|
alert_data = self.env['quality.alert'].read_group([('check_id', 'in', self.ids)], ['check_id'], ['check_id'])
|
||||||
@@ -408,3 +410,5 @@ class QualityAlert(models.Model):
|
|||||||
domain = [('team_ids', '=', False)]
|
domain = [('team_ids', '=', False)]
|
||||||
stage_ids = stages._search(domain, order=order, access_rights_uid=SUPERUSER_ID)
|
stage_ids = stages._search(domain, order=order, access_rights_uid=SUPERUSER_ID)
|
||||||
return stages.browse(stage_ids)
|
return stages.browse(stage_ids)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,9 @@ access_quality_point_user,quality.point,quality.model_quality_point,quality.grou
|
|||||||
access_quality_point_test_type_user,quality.point.test_type,quality.model_quality_point_test_type,quality.group_quality_user,1,0,0,0
|
access_quality_point_test_type_user,quality.point.test_type,quality.model_quality_point_test_type,quality.group_quality_user,1,0,0,0
|
||||||
access_quality_check_stock_user,quality.check,quality.model_quality_check,stock.group_stock_user,1,1,1,0
|
access_quality_check_stock_user,quality.check,quality.model_quality_check,stock.group_stock_user,1,1,1,0
|
||||||
access_stock_lot_user,stock.lot,stock.model_stock_lot,quality.group_quality_user,1,0,0,0
|
access_stock_lot_user,stock.lot,stock.model_stock_lot,quality.group_quality_user,1,0,0,0
|
||||||
access_stock_lot_group_quality_manager,stock_lot_group_quality_manager,stock.model_stock_lot,quality.group_quality_manager,1,0,0,0
|
|
||||||
|
|
||||||
access_stock_pack_user,stock.move.line,stock.model_stock_move_line,quality.group_quality_user,1,0,0,0
|
access_stock_pack_user,stock.move.line,stock.model_stock_move_line,quality.group_quality_user,1,0,0,0
|
||||||
access_stock_picking_group_quality_user,stock_picking_group_quality_user,stock.model_stock_picking,quality.group_quality_user,1,0,0,0
|
access_stock_picking_group_quality_user,stock_picking_group_quality_user,stock.model_stock_picking,quality.group_quality_user,1,0,0,0
|
||||||
access_stock_picking_group_quality_manager,stock_picking_group_quality_manager,stock.model_stock_picking,quality.group_quality_manager,1,0,0,0
|
|
||||||
|
|
||||||
access_quality_alert_team_manager,quality.alert.team,quality.model_quality_alert_team,quality.group_quality_manager,1,1,1,1
|
access_quality_alert_team_manager,quality.alert.team,quality.model_quality_alert_team,quality.group_quality_manager,1,1,1,1
|
||||||
access_quality_check_manager,quality.check,quality.model_quality_check,quality.group_quality_manager,1,1,1,1
|
access_quality_check_manager,quality.check,quality.model_quality_check,quality.group_quality_manager,1,1,1,1
|
||||||
|
|||||||
|
@@ -32,7 +32,9 @@
|
|||||||
<field name="tag_ids"/>
|
<field name="tag_ids"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong><field name="product_tmpl_id"/></strong>
|
<strong>
|
||||||
|
<field name="product_tmpl_id"/>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<field name="display_name"/>
|
<field name="display_name"/>
|
||||||
@@ -65,20 +67,28 @@
|
|||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
<field name="product_id" invisible="1"/>
|
<field name="product_id" invisible="1"/>
|
||||||
<div class="oe_button_box">
|
<div class="oe_button_box">
|
||||||
<button name="action_see_check" type="object" attrs="{'invisible': [('check_id', '=', False)]}" class="oe_stat_button" icon="fa-check-square-o">
|
<button name="action_see_check" type="object" attrs="{'invisible': [('check_id', '=', False)]}"
|
||||||
|
class="oe_stat_button" icon="fa-check-square-o">
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value"><field name="check_id" readonly="1"/></span>
|
<span class="o_stat_value">
|
||||||
|
<field name="check_id" readonly="1"/>
|
||||||
|
</span>
|
||||||
<span class="o_stat_text">Quality Check</span>
|
<span class="o_stat_text">Quality Check</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title"><h1><field name="name" readonly="1"/></h1></div>
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="title"/>
|
<field name="title"/>
|
||||||
<field name="product_tmpl_id"/>
|
<field name="product_tmpl_id"/>
|
||||||
<field name="product_id" groups="product.group_product_variant"/>
|
<field name="product_id" groups="product.group_product_variant"/>
|
||||||
<field name="lot_id" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
|
<field name="lot_id" context="{'default_product_id': product_id}"
|
||||||
|
groups="stock.group_production_lot"/>
|
||||||
<field name="picking_id"/>
|
<field name="picking_id"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
@@ -144,25 +154,25 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_alert_view_pivot" model="ir.ui.view">
|
<record id="quality_alert_view_pivot" model="ir.ui.view">
|
||||||
<field name="name">quality.alert.view.pivot</field>
|
<field name="name">quality.alert.view.pivot</field>
|
||||||
<field name="model">quality.alert</field>
|
<field name="model">quality.alert</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<pivot string="Quality Alert Analysis" sample="1">
|
<pivot string="Quality Alert Analysis" sample="1">
|
||||||
<field name="stage_id" type="col"/>
|
<field name="stage_id" type="col"/>
|
||||||
<field name="team_id" type="row"/>
|
<field name="team_id" type="row"/>
|
||||||
</pivot>
|
</pivot>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_alert_view_graph" model="ir.ui.view">
|
<record id="quality_alert_view_graph" model="ir.ui.view">
|
||||||
<field name="name">quality.alert.view.graph</field>
|
<field name="name">quality.alert.view.graph</field>
|
||||||
<field name="model">quality.alert</field>
|
<field name="model">quality.alert</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<graph string="Quality Alert Analysis" sample="1">
|
<graph string="Quality Alert Analysis" sample="1">
|
||||||
<field name="reason_id"/>
|
<field name="reason_id"/>
|
||||||
<field name="stage_id"/>
|
<field name="stage_id"/>
|
||||||
</graph>
|
</graph>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_alert_view_calendar" model="ir.ui.view">
|
<record id="quality_alert_view_calendar" model="ir.ui.view">
|
||||||
@@ -186,7 +196,8 @@
|
|||||||
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
||||||
<field name="domain">[('team_id', '=', active_id)]</field>
|
<field name="domain">[('team_id', '=', active_id)]</field>
|
||||||
<field name="context">{'default_team_id': active_id,
|
<field name="context">{'default_team_id': active_id,
|
||||||
'search_default_team_id': [active_id]}</field>
|
'search_default_team_id': [active_id]}
|
||||||
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_alert_action_check" model="ir.actions.act_window">
|
<record id="quality_alert_action_check" model="ir.actions.act_window">
|
||||||
@@ -195,7 +206,7 @@
|
|||||||
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
Create a new quality alert
|
Create a new quality alert
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -212,24 +223,35 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- QUALITY.CHECK -->
|
<!-- QUALITY.CHECK -->
|
||||||
<record id="quality_check_view_form" model="ir.ui.view">
|
<record id="quality_check_view_form" model="ir.ui.view">
|
||||||
<field name="name">quality.check.view.form</field>
|
<field name="name">quality.check.view.form</field>
|
||||||
<field name="model">quality.check</field>
|
<field name="model">quality.check</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
<header>
|
<header>
|
||||||
<button name="do_pass" type="object" class="btn-primary" attrs="{'invisible': [('quality_state', '!=', 'none')]}" string="Pass" data-hotkey="q"/>
|
<button name="do_pass" type="object" class="btn-primary"
|
||||||
<button name="do_pass" type="object" attrs="{'invisible': [('quality_state', '!=', 'fail')]}" groups="quality.group_quality_manager" string="Pass" data-hotkey="q"/>
|
attrs="{'invisible': [('quality_state', '!=', 'none')]}" string="Pass" data-hotkey="q"/>
|
||||||
<button name="do_fail" type="object" class="btn-primary" attrs="{'invisible': [('quality_state', '!=', 'none')]}" string="Fail" data-hotkey="w"/>
|
<button name="do_pass" type="object" attrs="{'invisible': [('quality_state', '!=', 'fail')]}"
|
||||||
<button name="do_fail" type="object" attrs="{'invisible': [('quality_state', '!=', 'pass')]}" groups="quality.group_quality_manager" string="Fail" data-hotkey="w"/>
|
groups="quality.group_quality_manager" string="Pass" data-hotkey="q"/>
|
||||||
<button name="do_measure" type="object" attrs="{'invisible': ['|', ('test_type', '!=', 'measure'), ('quality_state', '!=', 'none')]}" string="Measure" data-hotkey="v"/>
|
<button name="do_fail" type="object" class="btn-primary"
|
||||||
<button name="do_alert" type="object" attrs="{'invisible': ['|', ('alert_ids', '!=', []), ('quality_state', '!=', 'pass')]}" string="Create Alert" data-hotkey="g"/>
|
attrs="{'invisible': [('quality_state', '!=', 'none')]}" string="Fail" data-hotkey="w"/>
|
||||||
<button name="do_alert" type="object" class="btn-primary" attrs="{'invisible': ['|', ('alert_ids', '!=', []), ('quality_state', '!=', 'fail')]}" string="Create Alert" data-hotkey="g"/>
|
<button name="do_fail" type="object" attrs="{'invisible': [('quality_state', '!=', 'pass')]}"
|
||||||
|
groups="quality.group_quality_manager" string="Fail" data-hotkey="w"/>
|
||||||
|
<button name="do_measure" type="object"
|
||||||
|
attrs="{'invisible': ['|', ('test_type', '!=', 'measure'), ('quality_state', '!=', 'none')]}"
|
||||||
|
string="Measure" data-hotkey="v"/>
|
||||||
|
<button name="do_alert" type="object"
|
||||||
|
attrs="{'invisible': ['|', ('alert_ids', '!=', []), ('quality_state', '!=', 'pass')]}"
|
||||||
|
string="Create Alert" data-hotkey="g"/>
|
||||||
|
<button name="do_alert" type="object" class="btn-primary"
|
||||||
|
attrs="{'invisible': ['|', ('alert_ids', '!=', []), ('quality_state', '!=', 'fail')]}"
|
||||||
|
string="Create Alert" data-hotkey="g"/>
|
||||||
<field name="quality_state" widget="statusbar"/>
|
<field name="quality_state" widget="statusbar"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="action_see_alerts" icon="fa-bell" type="object" class="oe_stat_button" attrs="{'invisible': [('alert_count', '=', 0)]}">
|
<button name="action_see_alerts" icon="fa-bell" type="object" class="oe_stat_button"
|
||||||
|
attrs="{'invisible': [('alert_count', '=', 0)]}">
|
||||||
<field name="alert_count" string="Alerts" widget="statinfo"/>
|
<field name="alert_count" string="Alerts" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -242,21 +264,27 @@
|
|||||||
<field name="move_line_id" invisible="1"/>
|
<field name="move_line_id" invisible="1"/>
|
||||||
<field name="product_tracking" invisible="1"/>
|
<field name="product_tracking" invisible="1"/>
|
||||||
<field name="is_lot_tested_fractionally" invisible="1"/>
|
<field name="is_lot_tested_fractionally" invisible="1"/>
|
||||||
<field name="lot_name" attrs="{'invisible': ['|', ('product_tracking', '=', 'none'), '|', ('show_lot_text', '=', False), '|', ('measure_on', '!=', 'move_line'), ('move_line_id', '=', False)]}"/>
|
<field name="lot_name"
|
||||||
<field name="lot_id" attrs="{'invisible': ['|', ('product_tracking', '=', 'none'), '|', ('show_lot_text', '=', True), ('measure_on', '!=', 'move_line')]}"/>
|
attrs="{'invisible': ['|', ('product_tracking', '=', 'none'), '|', ('show_lot_text', '=', False), '|', ('measure_on', '!=', 'move_line'), ('move_line_id', '=', False)]}"/>
|
||||||
|
<field name="lot_id"
|
||||||
|
attrs="{'invisible': ['|', ('product_tracking', '=', 'none'), '|', ('show_lot_text', '=', True), ('measure_on', '!=', 'move_line')]}"/>
|
||||||
<label for="qty_line" attrs="{'invisible': [('move_line_id', '=', False)]}"/>
|
<label for="qty_line" attrs="{'invisible': [('move_line_id', '=', False)]}"/>
|
||||||
<div class="o_row" attrs="{'invisible': [('move_line_id', '=', False)]}">
|
<div class="o_row" attrs="{'invisible': [('move_line_id', '=', False)]}">
|
||||||
<field name="qty_line"/>
|
<field name="qty_line"/>
|
||||||
<field name="uom_id"/>
|
<field name="uom_id"/>
|
||||||
</div>
|
</div>
|
||||||
<label for="qty_to_test" attrs="{'invisible': ['|', ('move_line_id', '=', False), '|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}"/>
|
<label for="qty_to_test"
|
||||||
<div class="o_row" attrs="{'invisible': ['|', ('move_line_id', '=', False), '|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}">
|
attrs="{'invisible': ['|', ('move_line_id', '=', False), '|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}"/>
|
||||||
<field name="qty_to_test"/>
|
<div class="o_row"
|
||||||
|
attrs="{'invisible': ['|', ('move_line_id', '=', False), '|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}">
|
||||||
|
<field name="qty_to_test"/>
|
||||||
<field name="uom_id"/>
|
<field name="uom_id"/>
|
||||||
</div>
|
</div>
|
||||||
<label for="qty_tested" attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}"/>
|
<label for="qty_tested"
|
||||||
<div class="o_row" attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}">
|
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}"/>
|
||||||
<field name="qty_tested" attrs="{'readonly': [('quality_state', '!=', 'none')]}"/>
|
<div class="o_row"
|
||||||
|
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '=', False)]}">
|
||||||
|
<field name="qty_tested" attrs="{'readonly': [('quality_state', '!=', 'none')]}"/>
|
||||||
<field name="uom_id"/>
|
<field name="uom_id"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="test_type" invisible="1"/>
|
<field name="test_type" invisible="1"/>
|
||||||
@@ -264,26 +292,32 @@
|
|||||||
<field name="alert_ids" invisible="1"/>
|
<field name="alert_ids" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="picking_id" attrs="{'invisible': [('quality_state', 'in', ('pass', 'fail')), ('picking_id', '=', False)]}"/>
|
<field name="picking_id"
|
||||||
|
attrs="{'invisible': [('quality_state', 'in', ('pass', 'fail')), ('picking_id', '=', False)]}"/>
|
||||||
<field name="point_id"/>
|
<field name="point_id"/>
|
||||||
<field string="Type" name="test_type_id" options="{'no_open': True, 'no_create': True}" attrs="{'readonly': [('point_id', '!=', False)]}"/>
|
<field string="Type" name="test_type_id" options="{'no_open': True, 'no_create': True}"
|
||||||
|
attrs="{'readonly': [('point_id', '!=', False)]}"/>
|
||||||
<field name="control_date" invisible="1"/>
|
<field name="control_date" invisible="1"/>
|
||||||
<field name="team_id"/>
|
<field name="team_id"/>
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
<field name="user_id" string="Control Person" invisible="1"/>
|
<field name="user_id" string="Control Person" invisible="1"/>
|
||||||
<field name="partner_id" string="Partner" attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
<field name="partner_id" string="Partner"
|
||||||
|
attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group attrs="{'invisible': [('test_type', '!=', 'picture')]}">
|
<group attrs="{'invisible': [('test_type', '!=', 'picture')]}">
|
||||||
<field name="picture" widget="image"/>
|
<field name="picture" widget="image"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Notes" name="notes">
|
<page string="Notes" name="notes">
|
||||||
<group>
|
<group>
|
||||||
<field string="Instructions" name="note"/>
|
<field name="report_result"/>
|
||||||
<field string="Notes" name="additional_note"/>
|
<field name="report_pdf" widget="pdf_viewer"/>
|
||||||
</group>
|
<field string="Instructions" name="note"/>
|
||||||
</page>
|
<field string="Notes" name="additional_note"/>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
@@ -311,18 +345,30 @@
|
|||||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<strong><span><t t-esc="record.name.value"/></span></strong>
|
<strong>
|
||||||
|
<span>
|
||||||
|
<t t-esc="record.name.value"/>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<strong><span t-attf-class="float-end text-end badge #{['none'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-secondary' : ['fail'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-danger' : ['done'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-primary' : 'text-bg-success'}"><t t-esc="record.quality_state.value"/></span></strong>
|
<strong>
|
||||||
|
<span t-attf-class="float-end text-end badge #{['none'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-secondary' : ['fail'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-danger' : ['done'].indexOf(record.quality_state.raw_value) > -1 ? 'text-bg-primary' : 'text-bg-success'}">
|
||||||
|
<t t-esc="record.quality_state.value"/>
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row text-muted">
|
<div class="row text-muted">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<span><t t-esc="record.product_id.value"/></span>
|
<span>
|
||||||
|
<t t-esc="record.product_id.value"/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<span><t t-esc="record.lot_id.value"/></span>
|
<span>
|
||||||
|
<t t-esc="record.lot_id.value"/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_kanban_bottom_right float-end">
|
<div class="oe_kanban_bottom_right float-end">
|
||||||
@@ -350,7 +396,8 @@
|
|||||||
<field name="user_id" string="Checked By" optional="show" widget='many2one_avatar_user'/>
|
<field name="user_id" string="Checked By" optional="show" widget='many2one_avatar_user'/>
|
||||||
<field name="point_id" optional="hide"/>
|
<field name="point_id" optional="hide"/>
|
||||||
<field name="team_id" optional="show"/>
|
<field name="team_id" optional="show"/>
|
||||||
<field name="quality_state" optional="show" widget='badge' decoration-success="quality_state == 'pass'" decoration-info="quality_state == 'none'" decoration-danger="quality_state == 'fail'"/>
|
<field name="quality_state" optional="show" widget='badge' decoration-success="quality_state == 'pass'"
|
||||||
|
decoration-info="quality_state == 'none'" decoration-danger="quality_state == 'fail'"/>
|
||||||
<field name="company_id" groups="base.main_company"/>
|
<field name="company_id" groups="base.main_company"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
@@ -368,14 +415,14 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_check_view_pivot" model="ir.ui.view">
|
<record id="quality_check_view_pivot" model="ir.ui.view">
|
||||||
<field name="name">quality.check.view.pivot</field>
|
<field name="name">quality.check.view.pivot</field>
|
||||||
<field name="model">quality.check</field>
|
<field name="model">quality.check</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<pivot string="Quality Check Analysis" sample="1">
|
<pivot string="Quality Check Analysis" sample="1">
|
||||||
<field name="control_date" type="col" interval="day"/>
|
<field name="control_date" type="col" interval="day"/>
|
||||||
<field name="product_id" type="row"/>
|
<field name="product_id" type="row"/>
|
||||||
</pivot>
|
</pivot>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_check_view_search" model="ir.ui.view">
|
<record id="quality_check_view_search" model="ir.ui.view">
|
||||||
@@ -383,7 +430,8 @@
|
|||||||
<field name="model">quality.check</field>
|
<field name="model">quality.check</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<field name="product_id" string="Product" filter_domain="['|', ('product_id', 'ilike', self), ('lot_id', 'ilike', self)]"/>
|
<field name="product_id" string="Product"
|
||||||
|
filter_domain="['|', ('product_id', 'ilike', self), ('lot_id', 'ilike', self)]"/>
|
||||||
<field name="picking_id"/>
|
<field name="picking_id"/>
|
||||||
<field name="lot_id"/>
|
<field name="lot_id"/>
|
||||||
<field name="team_id"/>
|
<field name="team_id"/>
|
||||||
@@ -426,10 +474,11 @@
|
|||||||
</field>
|
</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
No quality check found
|
No quality check found
|
||||||
</p><p>
|
</p>
|
||||||
Define Quality Control Points in order to automatically generate
|
<p>
|
||||||
quality checks at the right logistic operation: transfers, manufacturing orders.
|
Define Quality Control Points in order to automatically generate
|
||||||
|
quality checks at the right logistic operation: transfers, manufacturing orders.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -458,10 +507,11 @@
|
|||||||
<field name="view_mode">tree,kanban,form,pivot,graph</field>
|
<field name="view_mode">tree,kanban,form,pivot,graph</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
No quality check found
|
No quality check found
|
||||||
</p><p>
|
</p>
|
||||||
Define Quality Control Points in order to automatically generate
|
<p>
|
||||||
quality checks at the right logistic operation: transfers, manufacturing orders.
|
Define Quality Control Points in order to automatically generate
|
||||||
|
quality checks at the right logistic operation: transfers, manufacturing orders.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -485,17 +535,25 @@
|
|||||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//button[@name='action_view_related_putaway_rules']" position="after">
|
<xpath expr="//button[@name='action_view_related_putaway_rules']" position="after">
|
||||||
<button name="action_see_quality_control_points" type="object" class="oe_stat_button" icon="fa-list" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" groups="quality.group_quality_user">
|
<button name="action_see_quality_control_points" type="object" class="oe_stat_button" icon="fa-list"
|
||||||
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||||||
|
groups="quality.group_quality_user">
|
||||||
<field string="Quality Points" name="quality_control_point_qty" widget="statinfo"/>
|
<field string="Quality Points" name="quality_control_point_qty" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
<button name="action_see_quality_checks" type="object" class="oe_stat_button" icon="fa-check" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('quality_pass_qty', '=', 0),('quality_fail_qty', '=', 0)]}" groups="quality.group_quality_user">
|
<button name="action_see_quality_checks" type="object" class="oe_stat_button" icon="fa-check"
|
||||||
|
attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('quality_pass_qty', '=', 0),('quality_fail_qty', '=', 0)]}"
|
||||||
|
groups="quality.group_quality_user">
|
||||||
<div class="o_field_widget o_stat_info mr4">
|
<div class="o_field_widget o_stat_info mr4">
|
||||||
<span class="o_stat_text">Pass:</span>
|
<span class="o_stat_text">Pass:</span>
|
||||||
<span class="o_stat_text">Fail:</span>
|
<span class="o_stat_text">Fail:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value"><field name="quality_pass_qty"/></span>
|
<span class="o_stat_value">
|
||||||
<span class="o_stat_value"><field name="quality_fail_qty"/></span>
|
<field name="quality_pass_qty"/>
|
||||||
|
</span>
|
||||||
|
<span class="o_stat_value">
|
||||||
|
<field name="quality_fail_qty"/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -509,17 +567,25 @@
|
|||||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//button[@name='action_view_related_putaway_rules']" position="after">
|
<xpath expr="//button[@name='action_view_related_putaway_rules']" position="after">
|
||||||
<button name="action_see_quality_control_points" type="object" icon="fa-list" class="oe_stat_button" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}" groups="quality.group_quality_user">
|
<button name="action_see_quality_control_points" type="object" icon="fa-list" class="oe_stat_button"
|
||||||
|
attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"
|
||||||
|
groups="quality.group_quality_user">
|
||||||
<field string="Quality Points" name="quality_control_point_qty" widget="statinfo"/>
|
<field string="Quality Points" name="quality_control_point_qty" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
<button name="action_see_quality_checks" type="object" class="oe_stat_button" icon="fa-check" groups="quality.group_quality_user" attrs="{'invisible':[ ('quality_pass_qty', '=', 0),('quality_fail_qty', '=', 0)]}" >
|
<button name="action_see_quality_checks" type="object" class="oe_stat_button" icon="fa-check"
|
||||||
|
groups="quality.group_quality_user"
|
||||||
|
attrs="{'invisible':[ ('quality_pass_qty', '=', 0),('quality_fail_qty', '=', 0)]}">
|
||||||
<div class="o_field_widget o_stat_info mr4">
|
<div class="o_field_widget o_stat_info mr4">
|
||||||
<span class="o_stat_text">Pass:</span>
|
<span class="o_stat_text">Pass:</span>
|
||||||
<span class="o_stat_text">Fail:</span>
|
<span class="o_stat_text">Fail:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value"><field name="quality_pass_qty"/></span>
|
<span class="o_stat_value">
|
||||||
<span class="o_stat_value"><field name="quality_fail_qty"/></span>
|
<field name="quality_pass_qty"/>
|
||||||
|
</span>
|
||||||
|
<span class="o_stat_value">
|
||||||
|
<field name="quality_fail_qty"/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -533,8 +599,8 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='button_box']" position="inside">
|
<xpath expr="//div[@name='button_box']" position="inside">
|
||||||
<button name="%(quality_check_action_production_lot)d" type="action"
|
<button name="%(quality_check_action_production_lot)d" type="action"
|
||||||
attrs="{'invisible': [('quality_check_qty', '=', 0)]}"
|
attrs="{'invisible': [('quality_check_qty', '=', 0)]}"
|
||||||
icon="fa-check" class="oe_stat_button" groups="quality.group_quality_user">
|
icon="fa-check" class="oe_stat_button" groups="quality.group_quality_user">
|
||||||
<field string="Quality Checks" name="quality_check_qty" widget="statinfo"/>
|
<field string="Quality Checks" name="quality_check_qty" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
@@ -557,24 +623,36 @@
|
|||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="#{kanban_color(record.color.raw_value)}">
|
<div t-attf-class="#{kanban_color(record.color.raw_value)}">
|
||||||
<span class="oe_kanban_color_help" t-attf-title="In #{kanban_getcolorname(record.color.raw_value)}" role="img" t-attf-aria-label="In #{kanban_getcolorname(record.color.raw_value)}"/>
|
<span class="oe_kanban_color_help"
|
||||||
|
t-attf-title="In #{kanban_getcolorname(record.color.raw_value)}" role="img"
|
||||||
|
t-attf-aria-label="In #{kanban_getcolorname(record.color.raw_value)}"/>
|
||||||
<div t-attf-class="o_kanban_card_header">
|
<div t-attf-class="o_kanban_card_header">
|
||||||
<div class="o_kanban_card_header_title">
|
<div class="o_kanban_card_header_title">
|
||||||
<div class="o_primary"><field name="name"/></div>
|
<div class="o_primary">
|
||||||
|
<field name="name"/>
|
||||||
|
</div>
|
||||||
<div t-if="record.alias_name.value and record.alias_domain.value">
|
<div t-if="record.alias_name.value and record.alias_domain.value">
|
||||||
<small><i class="fa fa-envelope-o" role="img" aria-label="Domain alias" title="Domain alias"></i>&nbsp; <field name="alias_id"/></small>
|
<small><i class="fa fa-envelope-o" role="img" aria-label="Domain alias"
|
||||||
|
title="Domain alias"></i>&nbsp;
|
||||||
|
<field name="alias_id"/>
|
||||||
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container o_kanban_card_content">
|
<div class="container o_kanban_card_content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 o_kanban_primary_left">
|
<div class="col-6 o_kanban_primary_left">
|
||||||
<button class="btn btn-primary" name="%(quality_alert_action_team)d" type="action">
|
<button class="btn btn-primary" name="%(quality_alert_action_team)d"
|
||||||
<span><field name="alert_count"/> Quality Alerts</span>
|
type="action">
|
||||||
|
<span>
|
||||||
|
<field name="alert_count"/>
|
||||||
|
Quality Alerts
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 o_kanban_primary_right">
|
<div class="col-6 o_kanban_primary_right">
|
||||||
<a class="oe_kanban_stock_picking_type_list" name="%(quality_check_action_team)d" type="action">
|
<a class="oe_kanban_stock_picking_type_list"
|
||||||
|
name="%(quality_check_action_team)d" type="action">
|
||||||
<field name="check_count"/>
|
<field name="check_count"/>
|
||||||
Checks In Progress
|
Checks In Progress
|
||||||
</a>
|
</a>
|
||||||
@@ -585,11 +663,14 @@
|
|||||||
<div t-if="widget.editable" role="menuitem">
|
<div t-if="widget.editable" role="menuitem">
|
||||||
<a class="dropdown-item ps-0" type="edit">Configuration</a>
|
<a class="dropdown-item ps-0" type="edit">Configuration</a>
|
||||||
</div>
|
</div>
|
||||||
<div t-if="widget.editable" role="menuitem" aria-haspopup="true" class="o_no_padding_kanban_colorpicker">
|
<div t-if="widget.editable" role="menuitem" aria-haspopup="true"
|
||||||
|
class="o_no_padding_kanban_colorpicker">
|
||||||
<ul class="oe_kanban_colorpicker" data-field="color" role="popup"/>
|
<ul class="oe_kanban_colorpicker" data-field="color" role="popup"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="o_kanban_manage_toggle_button o_left" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
|
<a class="o_kanban_manage_toggle_button o_left" href="#">
|
||||||
|
<i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</templates>
|
</templates>
|
||||||
@@ -615,13 +696,14 @@
|
|||||||
<label for="alias_name" string="Email Alias"/>
|
<label for="alias_name" string="Email Alias"/>
|
||||||
<div name="alias_def">
|
<div name="alias_def">
|
||||||
<field name="alias_id" class="oe_read_only oe_inline"
|
<field name="alias_id" class="oe_read_only oe_inline"
|
||||||
string="Email Alias" required="0"/>
|
string="Email Alias" required="0"/>
|
||||||
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
|
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;">
|
||||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
<field name="alias_name" class="oe_inline"/>@
|
||||||
|
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<field name="alias_contact" class="oe_inline" groups="base.group_no_one"
|
<field name="alias_contact" class="oe_inline" groups="base.group_no_one"
|
||||||
string="Accept Emails From"/>
|
string="Accept Emails From"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
@@ -658,7 +740,9 @@
|
|||||||
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
|
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<strong><field name="name"/></strong>
|
<strong>
|
||||||
|
<field name="name"/>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -672,14 +756,15 @@
|
|||||||
<field name="name">Quality Overview</field>
|
<field name="name">Quality Overview</field>
|
||||||
<field name="res_model">quality.alert.team</field>
|
<field name="res_model">quality.alert.team</field>
|
||||||
<field name="view_mode">kanban,form</field>
|
<field name="view_mode">kanban,form</field>
|
||||||
<field name="view_id" ref="quality_alert_team_dashboard_view_kanban" />
|
<field name="view_id" ref="quality_alert_team_dashboard_view_kanban"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_empty_folder">
|
<p class="o_view_nocontent_empty_folder">
|
||||||
</p><p>
|
|
||||||
Quality Teams group the different quality alerts/checks
|
|
||||||
according to the roles (teams) that need them.
|
|
||||||
</p>
|
</p>
|
||||||
</field>
|
<p>
|
||||||
|
Quality Teams group the different quality alerts/checks
|
||||||
|
according to the roles (teams) that need them.
|
||||||
|
</p>
|
||||||
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="quality_alert_team_action_config" model="ir.actions.act_window">
|
<record id="quality_alert_team_action_config" model="ir.actions.act_window">
|
||||||
@@ -716,9 +801,9 @@
|
|||||||
<field name="res_model">quality.tag</field>
|
<field name="res_model">quality.tag</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
Add a new tag
|
Add a new tag
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -747,7 +832,9 @@
|
|||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="oe_kanban_global_click">
|
<div t-attf-class="oe_kanban_global_click">
|
||||||
<div>
|
<div>
|
||||||
<strong><field name="name"/></strong>
|
<strong>
|
||||||
|
<field name="name"/>
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
@@ -763,8 +850,9 @@
|
|||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
Create a new quality alert stage
|
Create a new quality alert stage
|
||||||
</p><p>
|
</p>
|
||||||
Quality Alert stages define the different steps a quality alert should go through.
|
<p>
|
||||||
|
Quality Alert stages define the different steps a quality alert should go through.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -816,9 +904,19 @@
|
|||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||||
<div><strong><t t-esc="record.name.value"/></strong></div>
|
<div>
|
||||||
<div><strong>Products :</strong> <t t-esc="record.product_ids.value"/></div>
|
<strong>
|
||||||
<div><strong>Operations :</strong> <t t-esc="record.picking_type_ids.value"/></div>
|
<t t-esc="record.name.value"/>
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Products :</strong>
|
||||||
|
<t t-esc="record.product_ids.value"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Operations :</strong>
|
||||||
|
<t t-esc="record.picking_type_ids.value"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</templates>
|
</templates>
|
||||||
@@ -836,39 +934,54 @@
|
|||||||
<field string="Quality Checks" name="check_count" widget="statinfo"/>
|
<field string="Quality Checks" name="check_count" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
<button name="action_see_spc_control" type="object" class="oe_stat_button"
|
<button name="action_see_spc_control" type="object" class="oe_stat_button"
|
||||||
attrs="{'invisible': ['|', ('check_count', '=', 0), ('test_type', '!=', 'measure')]}">
|
attrs="{'invisible': ['|', ('check_count', '=', 0), ('test_type', '!=', 'measure')]}">
|
||||||
<span class="fa fa-2x" data-icon="∑" style="padding-left: 10px;" role="img" aria-label="Statistics" title="Statistics"/>
|
<span class="fa fa-2x" data-icon="∑" style="padding-left: 10px;" role="img"
|
||||||
|
aria-label="Statistics" title="Statistics"/>
|
||||||
<div class="o_field_widget o_stat_info mr4">
|
<div class="o_field_widget o_stat_info mr4">
|
||||||
<span class="o_stat_text">AVG:</span>
|
<span class="o_stat_text">AVG:</span>
|
||||||
<span class="o_stat_text">STD:</span>
|
<span class="o_stat_text">STD:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value"><field name="average"/></span>
|
<span class="o_stat_value">
|
||||||
<span class="o_stat_value"><field name="standard_deviation"/></span>
|
<field name="average"/>
|
||||||
|
</span>
|
||||||
|
<span class="o_stat_value">
|
||||||
|
<field name="standard_deviation"/>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@name='instructions']" position="after">
|
<xpath expr="//page[@name='instructions']" position="after">
|
||||||
<page string="Message If Failure" name="message_if_failure"
|
<page string="Message If Failure" name="message_if_failure"
|
||||||
attrs="{'invisible': [('test_type', 'in', ['picture', 'instructions', 'register_consumed_materials', 'print_label'])]}">
|
attrs="{'invisible': [('test_type', 'in', ['picture', 'instructions', 'register_consumed_materials', 'print_label'])]}">
|
||||||
<field name="failure_message"/>
|
<field name="failure_message"/>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='test_type']" position="before">
|
<xpath expr="//field[@name='test_type']" position="before">
|
||||||
<field name="measure_on"/>
|
<field name="measure_on"/>
|
||||||
<field name="measure_frequency_type" string="Control Frequency"/>
|
<field name="measure_frequency_type" string="Control Frequency"/>
|
||||||
<label for="measure_frequency_value" string="" attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}"/>
|
<label for="measure_frequency_value" string=""
|
||||||
|
attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}"/>
|
||||||
<div class="o_row" attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}">
|
<div class="o_row" attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}">
|
||||||
<span attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}">Every </span>
|
<span attrs="{'invisible': [('measure_frequency_type', '=', 'all')]}">Every</span>
|
||||||
<field name="measure_frequency_value" nolabel="1" attrs="{'invisible': [('measure_frequency_type', '!=', 'random')]}"/>
|
<field name="measure_frequency_value" nolabel="1"
|
||||||
<label for="measure_frequency_value" string="% of Operations" attrs="{'invisible': ['|', ('measure_on', '=', 'move_line'), ('measure_frequency_type', '!=', 'random')]}"/>
|
attrs="{'invisible': [('measure_frequency_type', '!=', 'random')]}"/>
|
||||||
<label for="measure_frequency_value" string="% of Transfers" attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('measure_frequency_type', '!=', 'random')]}"/>
|
<label for="measure_frequency_value" string="% of Operations"
|
||||||
<field name="measure_frequency_unit_value" string="Frequency" nolabel="1" attrs="{'invisible': [('measure_frequency_type', '!=', 'periodical')]}"/>
|
attrs="{'invisible': ['|', ('measure_on', '=', 'move_line'), ('measure_frequency_type', '!=', 'random')]}"/>
|
||||||
<field name="measure_frequency_unit" attrs="{'invisible': [('measure_frequency_type', '!=', 'periodical')], 'required': [('measure_frequency_type', '=', 'periodical')]}"/>
|
<label for="measure_frequency_value" string="% of Transfers"
|
||||||
|
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('measure_frequency_type', '!=', 'random')]}"/>
|
||||||
|
<field name="measure_frequency_unit_value" string="Frequency" nolabel="1"
|
||||||
|
attrs="{'invisible': [('measure_frequency_type', '!=', 'periodical')]}"/>
|
||||||
|
<field name="measure_frequency_unit"
|
||||||
|
attrs="{'invisible': [('measure_frequency_type', '!=', 'periodical')], 'required': [('measure_frequency_type', '=', 'periodical')]}"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="is_lot_tested_fractionally" attrs="{'invisible': [('measure_on', '!=', 'move_line')]}" string="Partial Transfer Test"/>
|
<field name="is_lot_tested_fractionally" attrs="{'invisible': [('measure_on', '!=', 'move_line')]}"
|
||||||
<label for="testing_percentage_within_lot" attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '!=', True)]}" string="Percentage"/>
|
string="Partial Transfer Test"/>
|
||||||
<div class="o_row" attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '!=', True)]}">
|
<label for="testing_percentage_within_lot"
|
||||||
|
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '!=', True)]}"
|
||||||
|
string="Percentage"/>
|
||||||
|
<div class="o_row"
|
||||||
|
attrs="{'invisible': ['|', ('measure_on', '!=', 'move_line'), ('is_lot_tested_fractionally', '!=', True)]}">
|
||||||
<field name="testing_percentage_within_lot" nolabel="1"/>
|
<field name="testing_percentage_within_lot" nolabel="1"/>
|
||||||
<label for="testing_percentage_within_lot" string="%"/>
|
<label for="testing_percentage_within_lot" string="%"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -877,12 +990,15 @@
|
|||||||
<label for="norm" attrs="{'invisible': [('test_type', '!=', 'measure')]}"/>
|
<label for="norm" attrs="{'invisible': [('test_type', '!=', 'measure')]}"/>
|
||||||
<div class="o_row" attrs="{'invisible': [('test_type', '!=', 'measure')]}">
|
<div class="o_row" attrs="{'invisible': [('test_type', '!=', 'measure')]}">
|
||||||
<field name="norm" attrs="{'required': [('test_type', '=', 'measure')]}"/>
|
<field name="norm" attrs="{'required': [('test_type', '=', 'measure')]}"/>
|
||||||
<field name="norm_unit" string="Unit of Measure" attrs="{'required': [('test_type', '=', 'measure')]}"/>
|
<field name="norm_unit" string="Unit of Measure"
|
||||||
|
attrs="{'required': [('test_type', '=', 'measure')]}"/>
|
||||||
</div>
|
</div>
|
||||||
<label for="tolerance_min" string="Tolerance" attrs="{'invisible': [('test_type', '!=', 'measure')]}"/>
|
<label for="tolerance_min" string="Tolerance" attrs="{'invisible': [('test_type', '!=', 'measure')]}"/>
|
||||||
<div attrs="{'invisible': [('test_type', '!=', 'measure')]}" class="o_row">
|
<div attrs="{'invisible': [('test_type', '!=', 'measure')]}" class="o_row">
|
||||||
<span>from </span> <field name="tolerance_min"/>
|
<span>from</span>
|
||||||
<span>to </span> <field name="tolerance_max"/>
|
<field name="tolerance_min"/>
|
||||||
|
<span>to</span>
|
||||||
|
<field name="tolerance_max"/>
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
@@ -895,95 +1011,96 @@
|
|||||||
<field name="search_view_id" ref="quality_point_view_search"/>
|
<field name="search_view_id" ref="quality_point_view_search"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
No quality control point found
|
No quality control point found
|
||||||
</p><p>
|
</p>
|
||||||
Quality control points define the quality checks which should be
|
<p>
|
||||||
performed at each operation, for your different products.
|
Quality control points define the quality checks which should be
|
||||||
|
performed at each operation, for your different products.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Menu structure-->
|
<!-- Menu structure-->
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_root"
|
id="menu_quality_root"
|
||||||
name="Quality"
|
name="Quality"
|
||||||
web_icon="quality_control,static/description/icon.svg"
|
web_icon="quality_control,static/description/icon.svg"
|
||||||
sequence="150"
|
sequence="150"
|
||||||
groups="quality.group_quality_user"/>
|
groups="quality.group_quality_user"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_dashboard"
|
id="menu_quality_dashboard"
|
||||||
name="Overview"
|
name="Overview"
|
||||||
action="quality_alert_team_action"
|
action="quality_alert_team_action"
|
||||||
parent="menu_quality_root"
|
parent="menu_quality_root"
|
||||||
sequence="5"/>
|
sequence="5"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_control"
|
id="menu_quality_control"
|
||||||
name="Quality Control"
|
name="Quality Control"
|
||||||
parent="menu_quality_root"
|
parent="menu_quality_root"
|
||||||
sequence="15"/>
|
sequence="15"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_control_points"
|
id="menu_quality_control_points"
|
||||||
name="Control Points"
|
name="Control Points"
|
||||||
parent="menu_quality_control"
|
parent="menu_quality_control"
|
||||||
action="quality_point_action"
|
action="quality_point_action"
|
||||||
groups="quality.group_quality_manager"
|
groups="quality.group_quality_manager"
|
||||||
sequence="17"/>
|
sequence="17"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_checks"
|
id="menu_quality_checks"
|
||||||
name="Quality Checks"
|
name="Quality Checks"
|
||||||
action="quality_check_action_main"
|
action="quality_check_action_main"
|
||||||
parent="menu_quality_control"
|
parent="menu_quality_control"
|
||||||
sequence="18"/>
|
sequence="18"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_alert"
|
id="menu_quality_alert"
|
||||||
name="Quality Alerts"
|
name="Quality Alerts"
|
||||||
action="quality_alert_action_check"
|
action="quality_alert_action_check"
|
||||||
parent="menu_quality_control"
|
parent="menu_quality_control"
|
||||||
sequence="20"/>
|
sequence="20"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_configuration"
|
id="menu_quality_configuration"
|
||||||
name="Configuration"
|
name="Configuration"
|
||||||
groups="quality.group_quality_manager"
|
groups="quality.group_quality_manager"
|
||||||
parent="menu_quality_root"
|
parent="menu_quality_root"
|
||||||
sequence="25"/>
|
sequence="25"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_config_alert_team"
|
id="menu_quality_config_alert_team"
|
||||||
name="Quality Teams"
|
name="Quality Teams"
|
||||||
action="quality_alert_team_action_config"
|
action="quality_alert_team_action_config"
|
||||||
parent="menu_quality_configuration"
|
parent="menu_quality_configuration"
|
||||||
sequence="5"/>
|
sequence="5"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_config_alert_stage"
|
id="menu_quality_config_alert_stage"
|
||||||
name="Quality Alert Stages"
|
name="Quality Alert Stages"
|
||||||
action="quality_alert_stage_action"
|
action="quality_alert_stage_action"
|
||||||
parent="menu_quality_configuration"
|
parent="menu_quality_configuration"
|
||||||
groups="base.group_no_one"
|
groups="base.group_no_one"
|
||||||
sequence="15"/>
|
sequence="15"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_config_quality_tags"
|
id="menu_config_quality_tags"
|
||||||
name="Quality Tags"
|
name="Quality Tags"
|
||||||
groups="base.group_no_one"
|
groups="base.group_no_one"
|
||||||
action="quality_tag_action"
|
action="quality_tag_action"
|
||||||
parent="menu_quality_configuration"
|
parent="menu_quality_configuration"
|
||||||
sequence="25"/>
|
sequence="25"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_reporting"
|
id="menu_quality_reporting"
|
||||||
name="Reporting"
|
name="Reporting"
|
||||||
groups="quality.group_quality_manager"
|
groups="quality.group_quality_manager"
|
||||||
parent="menu_quality_root"
|
parent="menu_quality_root"
|
||||||
sequence="20"/>
|
sequence="20"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_alert_report"
|
id="menu_quality_alert_report"
|
||||||
action="quality_alert_action_report"
|
action="quality_alert_action_report"
|
||||||
parent="menu_quality_reporting"
|
parent="menu_quality_reporting"
|
||||||
sequence="6"/>
|
sequence="6"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_check_report"
|
id="menu_quality_check_report"
|
||||||
action="quality_check_action_report"
|
action="quality_check_action_report"
|
||||||
parent="menu_quality_reporting"
|
parent="menu_quality_reporting"
|
||||||
sequence="5"/>
|
sequence="5"/>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import time
|
import time, datetime
|
||||||
import hashlib
|
import hashlib
|
||||||
from odoo import models
|
from odoo import models
|
||||||
|
|
||||||
|
|||||||
@@ -189,9 +189,9 @@ class MaintenanceStandardImage(models.Model):
|
|||||||
('压紧方式', '压紧方式'), ('刀片形状', '刀片形状'), ('冷却方式', '冷却方式')],
|
('压紧方式', '压紧方式'), ('刀片形状', '刀片形状'), ('冷却方式', '冷却方式')],
|
||||||
string='特征')
|
string='特征')
|
||||||
equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备')
|
equipment_id = fields.Many2many('maintenance.equipment', 'image_id', string='设备')
|
||||||
equipment_lq_id = fields.Many2many('maintenance.equipment', 'image_lq_id', string='设备')
|
equipment_lq_id = fields.Many2many('maintenance.equipment', 'image_lq_id', string='设备能力特征')
|
||||||
jg_equipment_id = fields.Many2many('sf.machine_tool.type', 'jg_image_id', string='机床型号')
|
jg_equipment_id = fields.Many2many('sf.machine_tool.type', 'jg_image_id', string='机床型号')
|
||||||
lq_equipment_id = fields.Many2many('sf.machine_tool.type', 'lq_image_id', string='机床型号')
|
lq_equipment_id = fields.Many2many('sf.machine_tool.type', 'lq_image_id', string='机床型号能力特征')
|
||||||
|
|
||||||
def _get_ids(self, name_arr):
|
def _get_ids(self, name_arr):
|
||||||
ability_feature_ids = []
|
ability_feature_ids = []
|
||||||
@@ -254,6 +254,8 @@ class ToolGroups(models.Model):
|
|||||||
equipment_ids = fields.Many2many('maintenance.equipment', 'ref_maintenance_equipment', string='机台号')
|
equipment_ids = fields.Many2many('maintenance.equipment', 'ref_maintenance_equipment', string='机台号')
|
||||||
remark = fields.Char('备注', size=50)
|
remark = fields.Char('备注', size=50)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
# ==========机床刀具组接口==========
|
# ==========机床刀具组接口==========
|
||||||
# def _register_tool_groups(self, obj):
|
# def _register_tool_groups(self, obj):
|
||||||
# # create_url = '/AutoDeviceApi/MachineToolGroup'
|
# # create_url = '/AutoDeviceApi/MachineToolGroup'
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ access_sf_cutting_tool_type_admin,sf_cutting_tool_type_admin,model_sf_cutting_to
|
|||||||
access_sf_cutting_tool_type_group_purchase_director,sf_cutting_tool_type_group_purchase_director,model_sf_cutting_tool_type,sf_base.group_purchase_director,1,1,0,0
|
access_sf_cutting_tool_type_group_purchase_director,sf_cutting_tool_type_group_purchase_director,model_sf_cutting_tool_type,sf_base.group_purchase_director,1,1,0,0
|
||||||
access_sf_cutting_tool_type_group_sale_director,sf_cutting_tool_type_group_sale_director,model_sf_cutting_tool_type,sf_base.group_sale_director,1,1,0,0
|
access_sf_cutting_tool_type_group_sale_director,sf_cutting_tool_type_group_sale_director,model_sf_cutting_tool_type,sf_base.group_sale_director,1,1,0,0
|
||||||
access_sf_cutting_tool_type_group_plan_director,sf_cutting_tool_type_group_plan_director,model_sf_cutting_tool_type,sf_base.group_plan_director,1,1,0,0
|
access_sf_cutting_tool_type_group_plan_director,sf_cutting_tool_type_group_plan_director,model_sf_cutting_tool_type,sf_base.group_plan_director,1,1,0,0
|
||||||
|
|
||||||
access_sf_functional_cutting_tool,sf_functional_cutting_tool,model_sf_functional_cutting_tool,base.group_user,1,1,1,0
|
access_sf_functional_cutting_tool,sf_functional_cutting_tool,model_sf_functional_cutting_tool,base.group_user,1,1,1,0
|
||||||
access_sf_functional_cutting_tool_admin,sf_functional_cutting_tool_admin,model_sf_functional_cutting_tool,base.group_system,1,1,1,0
|
access_sf_functional_cutting_tool_admin,sf_functional_cutting_tool_admin,model_sf_functional_cutting_tool,base.group_system,1,1,1,0
|
||||||
access_sf_functional_cutting_tool_model,sf_functional_cutting_tool_model,model_sf_functional_cutting_tool_model,base.group_user,1,1,1,0
|
access_sf_functional_cutting_tool_model,sf_functional_cutting_tool_model,model_sf_functional_cutting_tool_model,base.group_user,1,1,1,0
|
||||||
@@ -60,6 +59,12 @@ access_sf_international_standards,sf_international_standards,model_sf_internatio
|
|||||||
access_sf_international_standards_admin,sf_international_standards_admin,model_sf_international_standards,base.group_system,1,1,1,0
|
access_sf_international_standards_admin,sf_international_standards_admin,model_sf_international_standards,base.group_system,1,1,1,0
|
||||||
access_material_apply,material_apply,model_material_apply,base.group_user,1,1,1,0
|
access_material_apply,material_apply,model_material_apply,base.group_user,1,1,1,0
|
||||||
access_material_apply_admin,material_apply_admin,model_material_apply,base.group_system,1,1,1,0
|
access_material_apply_admin,material_apply_admin,model_material_apply,base.group_system,1,1,1,0
|
||||||
|
access_material_apply_group_purchase_director,material_apply_group_purchase_director,model_material_apply,sf_base.group_purchase_director,1,0,0,0
|
||||||
|
access_material_apply_group_sale_director,material_apply_group_sale_director,model_material_apply,sf_base.group_sale_director,1,0,0,0
|
||||||
|
access_material_apply_group_plan_director,material_apply_group_plan_director,model_material_apply,sf_base.group_plan_director,1,0,0,0
|
||||||
|
access_material_apply_group_purchase_director,material_apply_group_purchase_director,model_material_apply,sf_base.group_purchase_director,1,0,0,0
|
||||||
|
access_material_apply_group_sale_salemanager,material_apply_group_sale_salemanager,model_material_apply,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
|
|
||||||
access_sf_cutting_tool_standard_library,sf_cutting_tool_standard_library,model_sf_cutting_tool_standard_library,base.group_user,1,1,1,0
|
access_sf_cutting_tool_standard_library,sf_cutting_tool_standard_library,model_sf_cutting_tool_standard_library,base.group_user,1,1,1,0
|
||||||
access_sf_cutting_tool_standard_library_admin,sf_cutting_tool_standard_library_admin,model_sf_cutting_tool_standard_library,base.group_system,1,1,1,0
|
access_sf_cutting_tool_standard_library_admin,sf_cutting_tool_standard_library_admin,model_sf_cutting_tool_standard_library,base.group_system,1,1,1,0
|
||||||
access_sf_tool_materials_basic_parameters,sf_tool_materials_basic_parameters,model_sf_tool_materials_basic_parameters,base.group_user,1,1,1,0
|
access_sf_tool_materials_basic_parameters,sf_tool_materials_basic_parameters,model_sf_tool_materials_basic_parameters,base.group_user,1,1,1,0
|
||||||
@@ -72,6 +77,7 @@ access_sf_cutting_speed_group_plan_director,sf_cutting_speed_group_plan_director
|
|||||||
access_sf_feed_per_tooth_group_purchase_director,sf_feed_per_tooth_group_purchase_director,model_sf_feed_per_tooth,sf_base.group_purchase_director,1,1,0,0
|
access_sf_feed_per_tooth_group_purchase_director,sf_feed_per_tooth_group_purchase_director,model_sf_feed_per_tooth,sf_base.group_purchase_director,1,1,0,0
|
||||||
access_sf_feed_per_tooth_group_sale_director,sf_feed_per_tooth_group_sale_director,model_sf_feed_per_tooth,sf_base.group_sale_director,1,1,0,0
|
access_sf_feed_per_tooth_group_sale_director,sf_feed_per_tooth_group_sale_director,model_sf_feed_per_tooth,sf_base.group_sale_director,1,1,0,0
|
||||||
access_sf_feed_per_tooth_group_plan_director,sf_feed_per_tooth_group_plan_director,model_sf_feed_per_tooth,sf_base.group_plan_director,1,1,0,0
|
access_sf_feed_per_tooth_group_plan_director,sf_feed_per_tooth_group_plan_director,model_sf_feed_per_tooth,sf_base.group_plan_director,1,1,0,0
|
||||||
|
access_sf_feed_per_tooth_group_sale_salemanager,sf_feed_per_tooth_group_sale_salemanager,model_sf_feed_per_tooth,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,0
|
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,0
|
||||||
access_sf_feed_per_tooth_admin,sf_feed_per_tooth_admin,model_sf_feed_per_tooth,base.group_system,1,1,1,0
|
access_sf_feed_per_tooth_admin,sf_feed_per_tooth_admin,model_sf_feed_per_tooth,base.group_system,1,1,1,0
|
||||||
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,base.group_user,1,1,1,1
|
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,base.group_user,1,1,1,1
|
||||||
@@ -116,47 +122,35 @@ access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,s
|
|||||||
access_sf_sync_common,sf_sync_common,model_sf_sync_common,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_sync_common,sf_sync_common,model_sf_sync_common,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_international_standards,sf_international_standards,model_sf_international_standards,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_international_standards,sf_international_standards,model_sf_international_standards,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_material_apply,material_apply,model_material_apply,sf_base.group_sf_mrp_user,1,0,0,0
|
access_material_apply,material_apply,model_material_apply,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
|
|
||||||
access_sf_cutting_tool_standard_library_group_sf_mrp_user,sf_cutting_tool_standard_library_group_sf_mrp_user,model_sf_cutting_tool_standard_library,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_cutting_tool_standard_library_group_sf_mrp_user,sf_cutting_tool_standard_library_group_sf_mrp_user,model_sf_cutting_tool_standard_library,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_cutting_tool_standard_library_group_purchase_director,sf_cutting_tool_standard_library_group_purchase_director,model_sf_cutting_tool_standard_library,sf_base.group_purchase_director,1,0,1,0
|
access_sf_cutting_tool_standard_library_group_purchase_director,sf_cutting_tool_standard_library_group_purchase_director,model_sf_cutting_tool_standard_library,sf_base.group_purchase_director,1,0,1,0
|
||||||
access_sf_cutting_tool_standard_library_group_plan_director,sf_cutting_tool_standard_library_group_plan_director,model_sf_cutting_tool_standard_library,sf_base.group_plan_director,1,0,1,0
|
access_sf_cutting_tool_standard_library_group_plan_director,sf_cutting_tool_standard_library_group_plan_director,model_sf_cutting_tool_standard_library,sf_base.group_plan_director,1,0,1,0
|
||||||
access_sf_cutting_tool_standard_library_group_sale_director,sf_cutting_tool_standard_library_group_sale_director,model_sf_cutting_tool_standard_library,sf_base.group_sale_director,1,0,1,0
|
access_sf_cutting_tool_standard_library_group_sale_director,sf_cutting_tool_standard_library_group_sale_director,model_sf_cutting_tool_standard_library,sf_base.group_sale_director,1,0,1,0
|
||||||
|
|
||||||
access_sf_tool_groups,sf_tool_groups,model_sf_tool_groups,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_tool_groups,sf_tool_groups,model_sf_tool_groups,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_tool_materials_basic_parameters_group_sale_director,sf_tool_materials_basic_parameters_group_sale_director,model_sf_tool_materials_basic_parameters,sf_base.group_sale_director,1,0,1,0
|
access_sf_tool_materials_basic_parameters_group_sale_director,sf_tool_materials_basic_parameters_group_sale_director,model_sf_tool_materials_basic_parameters,sf_base.group_sale_director,1,0,1,0
|
||||||
access_sf_tool_materials_basic_parameters_group_plan_director,sf_tool_materials_basic_parameters_group_plan_director,model_sf_tool_materials_basic_parameters,sf_base.group_plan_director,1,0,1,0
|
access_sf_tool_materials_basic_parameters_group_plan_director,sf_tool_materials_basic_parameters_group_plan_director,model_sf_tool_materials_basic_parameters,sf_base.group_plan_director,1,0,1,0
|
||||||
access_sf_tool_materials_basic_parameters_group_purchase_director,sf_tool_materials_basic_parameters_group_purchase_director,model_sf_tool_materials_basic_parameters,sf_base.group_purchase_director,1,0,1,0
|
access_sf_tool_materials_basic_parameters_group_purchase_director,sf_tool_materials_basic_parameters_group_purchase_director,model_sf_tool_materials_basic_parameters,sf_base.group_purchase_director,1,0,1,0
|
||||||
|
|
||||||
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_cutting_speed_group_purchase,sf_cutting_speed_group_purchase,model_sf_cutting_speed,sf_base.group_purchase,1,0,0,0
|
access_sf_cutting_speed_group_purchase,sf_cutting_speed_group_purchase,model_sf_cutting_speed,sf_base.group_purchase,1,0,0,0
|
||||||
access_sf_cutting_speed_group_sale_salemanager,sf_cutting_speed_group_sale_salemanager,model_sf_cutting_speed,sf_base.group_sale_salemanager,1,0,0,0
|
access_sf_cutting_speed_group_sale_salemanager,sf_cutting_speed_group_sale_salemanager,model_sf_cutting_speed,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
|
|
||||||
|
|
||||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_feed_per_tooth_group_purchase,sf_feed_per_tooth_group_purchase,model_sf_feed_per_tooth,sf_base.group_purchase,1,0,0,0
|
access_sf_feed_per_tooth_group_purchase,sf_feed_per_tooth_group_purchase,model_sf_feed_per_tooth,sf_base.group_purchase,1,0,0,0
|
||||||
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_ramping_angle_group_purchase,sf_ramping_angle_group_purchase,model_sf_ramping_angle,sf_base.group_purchase,1,0,0,0
|
access_sf_ramping_angle_group_purchase,sf_ramping_angle_group_purchase,model_sf_ramping_angle,sf_base.group_purchase,1,0,0,0
|
||||||
access_sf_cutting_width_depth,sf_cutting_width_depth,model_sf_cutting_width_depth,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_cutting_width_depth,sf_cutting_width_depth,model_sf_cutting_width_depth,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_cutting_width_depth_group_purchase,sf_cutting_width_depth_group_purchase,model_sf_cutting_width_depth,sf_base.group_purchase,1,0,0,0
|
access_sf_cutting_width_depth_group_purchase,sf_cutting_width_depth_group_purchase,model_sf_cutting_width_depth,sf_base.group_purchase,1,0,0,0
|
||||||
|
|
||||||
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
||||||
access_purchase_order_group_purchase,access_purchase_order_group_purchase,purchase.model_purchase_order,sf_base.group_purchase,1,1,1,0
|
access_purchase_order_group_purchase,access_purchase_order_group_purchase,purchase.model_purchase_order,sf_base.group_purchase,1,1,1,0
|
||||||
access_purchase_order_group_purchase_director,access_purchase_order_group_purchase_director,purchase.model_purchase_order,sf_base.group_purchase_director,1,1,1,0
|
access_purchase_order_group_purchase_director,access_purchase_order_group_purchase_director,purchase.model_purchase_order,sf_base.group_purchase_director,1,1,1,0
|
||||||
access_purchase_order_line_group_purchase,access_purchase_order_line_group_purchase,purchase.model_purchase_order_line,sf_base.group_purchase,1,1,1,0
|
access_purchase_order_line_group_purchase,access_purchase_order_line_group_purchase,purchase.model_purchase_order_line,sf_base.group_purchase,1,1,1,0
|
||||||
access_purchase_order_line_group_purchase_director,access_purchase_order_line_group_purchase_director,purchase.model_purchase_order_line,sf_base.group_purchase_director,1,1,1,0
|
access_purchase_order_line_group_purchase_director,access_purchase_order_line_group_purchase_director,purchase.model_purchase_order_line,sf_base.group_purchase_director,1,1,1,0
|
||||||
access_spindle_taper_type,spindle_taper_type,model_spindle_taper_type,base.group_user,1,1,1,1
|
access_spindle_taper_type,spindle_taper_type,model_spindle_taper_type,base.group_user,1,1,1,1
|
||||||
|
|
||||||
access_sf_tool_groups_group_plan_dispatch,sf_tool_groups,model_sf_tool_groups,sf_base.group_plan_dispatch,1,0,0,0
|
access_sf_tool_groups_group_plan_dispatch,sf_tool_groups,model_sf_tool_groups,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_sf_tool_groups_group_sf_tool_user,sf_tool_groups,model_sf_tool_groups,sf_base.group_sf_tool_user,1,1,1,1
|
access_sf_tool_groups_group_sf_tool_user,sf_tool_groups,model_sf_tool_groups,sf_base.group_sf_tool_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
access_purchase_order,purchase.order,purchase.model_purchase_order,sf_base.group_plan_dispatch,1,0,0,0
|
access_purchase_order,purchase.order,purchase.model_purchase_order,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_res_partner,res.partner,base.model_res_partner,sf_base.group_plan_dispatch,1,0,0,0
|
access_res_partner,res.partner,base.model_res_partner,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_purchase_order_line,purchase.order.line,purchase.model_purchase_order_line,sf_base.group_plan_dispatch,1,0,0,0
|
access_purchase_order_line,purchase.order.line,purchase.model_purchase_order_line,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_account_move_line,account.move.line,account.model_account_move_line,sf_base.group_plan_dispatch,1,0,0,0
|
access_account_move_line,account.move.line,account.model_account_move_line,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
|
||||||
|
|
||||||
access_sf_machine_tool,sf_machine_tool,model_sf_machine_tool,sf_base.group_sf_mrp_user,1,1,0,0
|
access_sf_machine_tool,sf_machine_tool,model_sf_machine_tool,sf_base.group_sf_mrp_user,1,1,0,0
|
||||||
access_sf_machine_tool_type,sf_machine_tool_type,model_sf_machine_tool_type,sf_base.group_sf_mrp_user,1,1,0,0
|
access_sf_machine_tool_type,sf_machine_tool_type,model_sf_machine_tool_type,sf_base.group_sf_mrp_user,1,1,0,0
|
||||||
access_sf_machine_brand,sf_machine_brand,model_sf_machine_brand,sf_base.group_sf_mrp_user,1,1,0,0
|
access_sf_machine_brand,sf_machine_brand,model_sf_machine_brand,sf_base.group_sf_mrp_user,1,1,0,0
|
||||||
@@ -179,10 +173,18 @@ access_sf_fixture_material,sf_fixture_material,model_sf_fixture_material,sf_base
|
|||||||
access_sf_fixture_materials_basic_parameters,sf_fixture_materials_basic_parameters,model_sf_fixture_materials_basic_parameters,sf_base.group_sf_mrp_user,1,1,0,0
|
access_sf_fixture_materials_basic_parameters,sf_fixture_materials_basic_parameters,model_sf_fixture_materials_basic_parameters,sf_base.group_sf_mrp_user,1,1,0,0
|
||||||
access_mrp_production_group_sale_salemanager,mrp_production_group_sale_salemanager,mrp.model_mrp_production,sf_base.group_sale_salemanager,1,0,0,0
|
access_mrp_production_group_sale_salemanager,mrp_production_group_sale_salemanager,mrp.model_mrp_production,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
access_mrp_production_group_sale_director,mrp_production_group_sale_director,mrp.model_mrp_production,sf_base.group_sale_director,1,0,0,0
|
access_mrp_production_group_sale_director,mrp_production_group_sale_director,mrp.model_mrp_production,sf_base.group_sale_director,1,0,0,0
|
||||||
|
|
||||||
|
|
||||||
access_material_apply_group_plan_dispatch,material_apply,model_material_apply,sf_base.group_plan_dispatch,1,0,0,0
|
access_material_apply_group_plan_dispatch,material_apply,model_material_apply,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_sf_machine_brand_tags_group_plan_dispatch,sf_machine_brand_tags,model_sf_machine_brand_tags,sf_base.group_plan_dispatch,1,0,0,0
|
access_sf_machine_brand_tags_group_plan_dispatch,sf_machine_brand_tags,model_sf_machine_brand_tags,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_ir_actions_act_window_group_plan_dispatch,ir.actions.act_window,base.model_ir_actions_act_window,sf_base.group_plan_dispatch,1,0,0,0
|
access_ir_actions_act_window_group_plan_dispatch,ir.actions.act_window,base.model_ir_actions_act_window,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_ir_actions_act_window_view_group_plan_dispatch,ir.actions.act_window.view,base.model_ir_actions_act_window_view,sf_base.group_plan_dispatch,1,0,0,0
|
access_ir_actions_act_window_view_group_plan_dispatch,ir.actions.act_window.view,base.model_ir_actions_act_window_view,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
access_sf_supplier_sort_group_plan_dispatch,sf.supplier.sort,model_sf_supplier_sort,sf_base.group_plan_dispatch,1,0,0,0
|
access_sf_supplier_sort_group_plan_dispatch,sf.supplier.sort,model_sf_supplier_sort,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
access_sf_international_standards_group_sale_salemanager,sf_international_standards_group_sale_salemanager,model_sf_international_standards,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
|
access_sf_international_standards_group_sale_director,sf_international_standards_group_sale_director,model_sf_international_standards,sf_base.group_sale_director,1,0,0,0
|
||||||
|
access_sf_international_standards_group_plan_director,sf_international_standards_group_plan_director,model_sf_international_standards,sf_base.group_plan_director,1,0,0,0
|
||||||
|
access_sf_international_standards_group_purchase,sf_international_standards_group_purchase,model_sf_international_standards,sf_base.group_purchase,1,0,0,0
|
||||||
|
access_sf_international_standards_group_purchase_director,sf_international_standards_group_purchase_director,model_sf_international_standards,sf_base.group_purchase_director,1,0,0,0
|
||||||
|
access_sf_machine_brand_tags_group_sale_salemanager,sf_machine_brand_tags_group_sale_salemanager,model_sf_machine_brand_tags,sf_base.group_sale_salemanager,1,0,0,0
|
||||||
|
access_sf_machine_brand_tags_group_sale_director,sf_machine_brand_tags_group_sale_director,model_sf_machine_brand_tags,sf_base.group_sale_director,1,0,0,0
|
||||||
|
access_sf_machine_brand_tags_group_plan_director,sf_machine_brand_tags_group_plan_director,model_sf_machine_brand_tags,sf_base.group_plan_director,1,0,0,0
|
||||||
|
access_sf_machine_brand_tags_group_purchase,sf_machine_brand_tags_group_purchase,model_sf_machine_brand_tags,sf_base.group_purchase,1,0,0,0
|
||||||
|
access_sf_machine_brand_tags_group_purchase_director,sf_machine_brand_tags_group_purchase_director,model_sf_machine_brand_tags,sf_base.group_purchase_director,1,0,0,0
|
||||||
|
|||||||
|
@@ -505,11 +505,23 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_tool_groups_search" model="ir.ui.view">
|
||||||
|
<field name="name">刀具组搜索</field>
|
||||||
|
<field name="model">sf.tool.groups</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="equipment_ids"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="sf_tool_groups_view_act" model="ir.actions.act_window">
|
<record id="sf_tool_groups_view_act" model="ir.actions.act_window">
|
||||||
<field name="name">刀具组</field>
|
<field name="name">刀具组</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sf.tool.groups</field>
|
<field name="res_model">sf.tool.groups</field>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree,search</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- ================================================刀具基础参数================================================ -->
|
<!-- ================================================刀具基础参数================================================ -->
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Sf_Bf_Connect(http.Controller):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
res = {'status': 1, 'factory_order_no': ''}
|
res = {'status': 1, 'factory_order_no': ''}
|
||||||
logging.info('get_bfm_process_order_list:%s' % kw)
|
logging.info('get_bfm_process_order_list:%s' % kw['order_number'])
|
||||||
try:
|
try:
|
||||||
product_id = request.env.ref('sf_dlm.product_template_sf').sudo()
|
product_id = request.env.ref('sf_dlm.product_template_sf').sudo()
|
||||||
self_machining_id = request.env.ref('sf_dlm.product_embryo_sf_self_machining').sudo()
|
self_machining_id = request.env.ref('sf_dlm.product_embryo_sf_self_machining').sudo()
|
||||||
@@ -143,3 +143,17 @@ class jdElcp(http.Controller):
|
|||||||
aa.bill_url = kw['bill']
|
aa.bill_url = kw['bill']
|
||||||
logging.info('get_jd_bill================:%s' %
|
logging.info('get_jd_bill================:%s' %
|
||||||
aa.bill_url)
|
aa.bill_url)
|
||||||
|
|
||||||
|
@http.route('/api/update/order/status', type='http', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||||
|
cors="*")
|
||||||
|
def update_order_status(self, **kw):
|
||||||
|
"""
|
||||||
|
根据拿到的商家单号,修改订单状态
|
||||||
|
"""
|
||||||
|
logging.info('change_sale_order_state================:%s', kw)
|
||||||
|
if not kw.get('orderNo'):
|
||||||
|
return json.dumps({'statusCode': 415, 'statusMessage': '订单号不能为空'}, ensure_ascii=False)
|
||||||
|
aa = request.env['sale.order'].sudo().search([('name', '=', kw['orderNo'])])
|
||||||
|
if aa:
|
||||||
|
aa.schedule_status = 'received'
|
||||||
|
return json.dumps({'statusCode': 200, 'statusMessage': '修改成功'}, ensure_ascii=False)
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ class JdEclp(models.Model):
|
|||||||
self.is_bill = True
|
self.is_bill = True
|
||||||
self.logistics_status = '1'
|
self.logistics_status = '1'
|
||||||
|
|
||||||
|
# 京东物流下单后,销售订单状态改为待收货
|
||||||
|
self.env['sale.order'].search([('name', '=', self.origin)]).write({'scheduled_status': 'to receive'})
|
||||||
|
|
||||||
# else:
|
# else:
|
||||||
# raise UserError("选择京东物流才能下单呦")
|
# raise UserError("选择京东物流才能下单呦")
|
||||||
|
|
||||||
|
|||||||
@@ -35,14 +35,14 @@
|
|||||||
<field name="type">功能刀具</field>
|
<field name="type">功能刀具</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="res_partner_bfm" model="res.partner">-->
|
<record id="res_partner_bfm" model="res.partner">
|
||||||
<!-- <field name="name">业务平台</field>-->
|
<field name="name">业务平台</field>
|
||||||
<!-- <!– <field name="company_id" ref="base.main_company"/>–>-->
|
<!-- <field name="company_id" ref="base.main_company"/>-->
|
||||||
<!-- </record>-->
|
</record>
|
||||||
|
|
||||||
<!-- <record id="res_users_bfm" model="res.users">-->
|
<!-- <record id="res_users_bfm" model="res.users">-->
|
||||||
<!-- <field name="name">业务平台</field>-->
|
<!-- <field name="name">业务平台</field>-->
|
||||||
<!-- <field name="partner_id" ref="res_partner_bfm"/>-->
|
<!--<!– <field name="partner_id" ref="res_partner_bfm"/>–>-->
|
||||||
<!-- </record>-->
|
<!-- </record>-->
|
||||||
|
|
||||||
<record id="product_functional_tool_sf" model="product.product">
|
<record id="product_functional_tool_sf" model="product.product">
|
||||||
|
|||||||
@@ -17,31 +17,33 @@
|
|||||||
attrs="{'invisible': ['|','|', ('categ_type', '!=', '成品'),('categ_type', '=', False),('model_file', '=', False)]}"/>
|
attrs="{'invisible': ['|','|', ('categ_type', '!=', '成品'),('categ_type', '=', False),('model_file', '=', False)]}"/>
|
||||||
<field name='cutting_tool_type' invisible="1"/>
|
<field name='cutting_tool_type' invisible="1"/>
|
||||||
<field name="fixture_material_type" invisible="1"/>
|
<field name="fixture_material_type" invisible="1"/>
|
||||||
<field name="embryo_model_type_id" string="模型类型"
|
<field name="embryo_model_type_id" string="模型类型" options="{'no_create': True}"
|
||||||
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': ['|',('categ_type', '!=', '坯料'),('categ_type', '=', False)],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="materials_id" string="材料" placeholder="请选择"
|
<field name="materials_id" string="材料" placeholder="请选择" options="{'no_create': True}"
|
||||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="materials_type_id" string="型号" placeholder="请选择"
|
<field name="materials_type_id" string="型号" placeholder="请选择" options="{'no_create': True}"
|
||||||
domain="[('materials_id', '=', materials_id)]"
|
domain="[('materials_id', '=', materials_id)]"
|
||||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
||||||
options="{'no_create': True}"
|
options="{'no_create': True}"
|
||||||
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
|
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
|
||||||
<field name="cutting_tool_material_id"
|
<field name="cutting_tool_material_id" class="custom_required"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
options="{'no_create': True}"
|
||||||
|
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||||
placeholder="请选择"/>
|
placeholder="请选择"/>
|
||||||
<field name="cutting_tool_model_id" placeholder="请选择"
|
<field name="cutting_tool_model_id" placeholder="请选择" class="custom_required"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
options="{'no_create': True}"
|
||||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"/>
|
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="specification_id" placeholder="请选择"
|
<field name="specification_id" placeholder="请选择" class="custom_required"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'readonly': [('id', '!=', False)]}"
|
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||||
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||||
placeholder="请选择"/>
|
placeholder="请选择" options="{'no_create': True}"/>
|
||||||
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
<field name="fixture_model_id" string="型号" placeholder="请选择" options="{'no_create': True}"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '夹具')],'required': [('categ_type', '=', '夹具')]}"
|
attrs="{'invisible': [('categ_type', '!=', '夹具')],'required': [('categ_type', '=', '夹具')]}"
|
||||||
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
||||||
<field name="specification_fixture_id" string="规格" placeholder="请选择"
|
<field name="specification_fixture_id" string="规格" placeholder="请选择"
|
||||||
|
options="{'no_create': True}"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||||
domain="[('fixture_model_id','=',fixture_model_id)]"/>
|
domain="[('fixture_model_id','=',fixture_model_id)]"/>
|
||||||
</field>
|
</field>
|
||||||
@@ -352,7 +354,7 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_locating_slot_code"
|
<field name="cutting_tool_locating_slot_code"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_blade_id"
|
<field name="cutting_tool_blade_id" options="{'no_create': True}"
|
||||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', 'not in', ('刀杆','刀盘'))],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_tool_shim"
|
<field name="cutting_tool_tool_shim"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||||
|
|||||||
@@ -72,14 +72,16 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
date_planned_start = ''
|
date_planned_start = ''
|
||||||
date_planned_finished = ''
|
date_planned_finished = ''
|
||||||
if item.date_planned_start is not False:
|
if item.date_planned_start is not False:
|
||||||
|
logging.info('date_planned_start:%s' % item.date_planned_start)
|
||||||
planned_start = item.date_planned_start.strftime("%Y-%m-%d %H:%M:%S")
|
planned_start = item.date_planned_start.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
date_planned_start = request.env['sf.sync.common'].sudo().get_add_time(planned_start)
|
date_planned_start = request.env['sf.sync.common'].sudo().get_add_time(planned_start)
|
||||||
if item.date_planned_finished is not False:
|
if item.date_planned_finished is not False:
|
||||||
|
logging.info('date_planned_finished:%s' % item.date_planned_finished)
|
||||||
planned_finished = item.date_planned_finished.strftime("%Y-%m-%d %H:%M:%S")
|
planned_finished = item.date_planned_finished.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
date_planned_finished = request.env['sf.sync.common'].sudo().get_add_time(planned_finished)
|
date_planned_finished = request.env['sf.sync.common'].sudo().get_add_time(planned_finished)
|
||||||
res['Datas'].append({
|
res['Datas'].append({
|
||||||
'BillId': item.production_id.name,
|
'BillId': item.production_id.name,
|
||||||
'RfidCode': item.RfidCode,
|
'RfidCode': item.rfid_code,
|
||||||
'CraftName': item.name,
|
'CraftName': item.name,
|
||||||
'Quantity': 1,
|
'Quantity': 1,
|
||||||
'WortkStart': date_planned_start,
|
'WortkStart': date_planned_start,
|
||||||
@@ -87,7 +89,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
'MaterialId': item.product_id.default_code,
|
'MaterialId': item.product_id.default_code,
|
||||||
'MaterialName': item.product_id.name,
|
'MaterialName': item.product_id.name,
|
||||||
# 'Spec':item.mat,
|
# 'Spec':item.mat,
|
||||||
'Material': item.materials_type_id.name
|
'Material': item.product_id.materials_type_id.name
|
||||||
})
|
})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||||
@@ -164,6 +166,13 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
return json.JSONEncoder().encode(res)
|
return json.JSONEncoder().encode(res)
|
||||||
workorder.equipment_id = work_equipment_id
|
workorder.equipment_id = work_equipment_id
|
||||||
workorder.button_start()
|
workorder.button_start()
|
||||||
|
|
||||||
|
# 根据工单的实际开始时间修改排程单的开始时间、状态
|
||||||
|
if workorder.date_start:
|
||||||
|
request.env['sf.production.plan'].sudo().search([('production_id', '=', production_id)]).write(
|
||||||
|
{'actual_start_time': workorder.date_start,
|
||||||
|
'state': 'processing'})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||||
logging.info('button_Work_START error:%s' % e)
|
logging.info('button_Work_START error:%s' % e)
|
||||||
@@ -193,6 +202,19 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': '该工单未开始'}
|
res = {'Succeed': False, 'ErrorCode': 202, 'Error': '该工单未开始'}
|
||||||
return json.JSONEncoder().encode(res)
|
return json.JSONEncoder().encode(res)
|
||||||
workorder.button_finish()
|
workorder.button_finish()
|
||||||
|
|
||||||
|
# 根据工单的实际结束时间修改排程单的结束时间、状态,同时修改销售订单的状态
|
||||||
|
if workorder.date_finished:
|
||||||
|
request.env['sf.production.plan'].sudo().search([('production_id', '=', production_id)]).write(
|
||||||
|
{'actual_end_time': workorder.date_finished,
|
||||||
|
'state': 'finished'})
|
||||||
|
production_obj = request.env['mrp.production'].sudo().search([('name', '=', production_id)])
|
||||||
|
if production_obj:
|
||||||
|
production_obj.sudo().schedule_state = '已完成'
|
||||||
|
production_obj.write({'state': 'completed'})
|
||||||
|
request.env['sale.order'].sudo().search(
|
||||||
|
[('name', '=', production_obj.origin)]).write({'schedule_status': 'to deliver'})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||||
logging.info('button_Work_End error:%s' % e)
|
logging.info('button_Work_End error:%s' % e)
|
||||||
@@ -208,7 +230,7 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
"""
|
"""
|
||||||
logging.info('PartQualityInspect:%s' % kw)
|
logging.info('PartQualityInspect:%s' % kw)
|
||||||
try:
|
try:
|
||||||
res = {'Succeed': True, 'Datas': []}
|
res = {'Succeed': True}
|
||||||
datas = request.httprequest.data
|
datas = request.httprequest.data
|
||||||
ret = json.loads(datas)
|
ret = json.loads(datas)
|
||||||
production_id = ret['BillId']
|
production_id = ret['BillId']
|
||||||
@@ -216,17 +238,40 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
workorder = request.env['mrp.workorder'].sudo().search(
|
workorder = request.env['mrp.workorder'].sudo().search(
|
||||||
[('production_id', '=', production_id), ('routing_type', '=', routing_type)], limit=1)
|
[('production_id', '=', production_id), ('routing_type', '=', routing_type)], limit=1)
|
||||||
if workorder:
|
if workorder:
|
||||||
|
workorder.test_result = ret['Quality']
|
||||||
|
logging.info('制造订单:%s' % workorder.production_id.name)
|
||||||
if 'ReportPaht' in ret:
|
if 'ReportPaht' in ret:
|
||||||
download_state = request.env['mrp.workorder'].with_user(
|
download_state = request.env['mrp.workorder'].with_user(
|
||||||
request.env.ref("base.user_admin")).download_reportfile_tmp(workorder,
|
request.env.ref("base.user_admin")).download_reportfile_tmp(workorder,
|
||||||
ret['ReportPaht'])
|
ret['ReportPaht'])
|
||||||
if download_state is not False:
|
if download_state == 1:
|
||||||
request.env['mrp.workorder'].with_user(
|
detection_ret = request.env['mrp.workorder'].with_user(
|
||||||
request.env.ref("base.user_admin")).get_detection_file(workorder, ret['ReportPaht'])
|
request.env.ref("base.user_admin")).get_detection_file(workorder, ret['ReportPaht'])
|
||||||
|
if detection_ret is True:
|
||||||
|
stock_picking_type = request.env['stock.picking.type'].sudo().search(
|
||||||
|
[('sequence_code', '=', 'SFP')])
|
||||||
|
if stock_picking_type:
|
||||||
|
stock_picking = request.env['stock.picking'].sudo().search(
|
||||||
|
[('product_id', '=', workorder.product_id.id),
|
||||||
|
('origin', '=', workorder.production_id.origin),
|
||||||
|
('picking_type_id', '=', stock_picking_type.id)])
|
||||||
|
if stock_picking:
|
||||||
|
quality_check = request.env['quality.check'].sudo().search(
|
||||||
|
[('product_id', '=', workorder.product_id.id),
|
||||||
|
('picking_id', '=', stock_picking.id)])
|
||||||
|
if quality_check:
|
||||||
|
logging.info('质检单:%s' % quality_check.name)
|
||||||
|
quality_check.write({'report_pdf': workorder.detection_report,
|
||||||
|
'report_result': workorder.test_result})
|
||||||
|
elif download_state == 2:
|
||||||
|
res = {'Succeed': False, 'ErrorCode': 205,
|
||||||
|
'Error': 'ReportPaht中的工件号与制造订单%s不匹配,请检查ReportPaht是否正确' % workorder.production_id.name}
|
||||||
else:
|
else:
|
||||||
res = {'Succeed': False, 'ErrorCode': 204, 'Error': '检测报告文件从FTP拉取失败'}
|
res = {'Succeed': False, 'ErrorCode': 204, 'Error': '检测报告文件从FTP拉取失败'}
|
||||||
else:
|
else:
|
||||||
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '未传ReportPaht字段'}
|
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '未传ReportPaht字段'}
|
||||||
|
else:
|
||||||
|
res = {'Succeed': False, 'ErrorCode': 206, 'Error': '未查询到工单'}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||||
logging.info('PartQualityInspect error:%s' % e)
|
logging.info('PartQualityInspect error:%s' % e)
|
||||||
@@ -362,7 +407,6 @@ class Manufacturing_Connect(http.Controller):
|
|||||||
old_localtion.location_status = '空闲'
|
old_localtion.location_status = '空闲'
|
||||||
old_localtion.production_id = False
|
old_localtion.production_id = False
|
||||||
|
|
||||||
|
|
||||||
# return json.JSONEncoder().encode(res)
|
# return json.JSONEncoder().encode(res)
|
||||||
# else:
|
# else:
|
||||||
# res = {'Succeed': False, 'ErrorCode': 201, 'Error': '未传RfidCode字段'}
|
# res = {'Succeed': False, 'ErrorCode': 201, 'Error': '未传RfidCode字段'}
|
||||||
|
|||||||
@@ -92,7 +92,9 @@ class MrpProduction(models.Model):
|
|||||||
# 新添加的状态逻辑
|
# 新添加的状态逻辑
|
||||||
if production.state == 'progress' and production.schedule_state == '已排':
|
if production.state == 'progress' and production.schedule_state == '已排':
|
||||||
production.state = 'pending_processing'
|
production.state = 'pending_processing'
|
||||||
elif production.state == 'progress' and production.schedule_state == '已完成':
|
# elif production.state == 'progress' and production.schedule_state == '已完成':
|
||||||
|
# production.state = 'completed'
|
||||||
|
elif production.state == 'pending_processing' and production.schedule_state == '已完成':
|
||||||
production.state = 'completed'
|
production.state = 'completed'
|
||||||
|
|
||||||
def action_check(self):
|
def action_check(self):
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
Y10_axis = fields.Float(default=0)
|
Y10_axis = fields.Float(default=0)
|
||||||
Z10_axis = fields.Float(default=0)
|
Z10_axis = fields.Float(default=0)
|
||||||
X_deviation_angle = fields.Integer(string="X轴偏差度", default=0)
|
X_deviation_angle = fields.Integer(string="X轴偏差度", default=0)
|
||||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], default='合格',
|
test_result = fields.Char("检测结果")
|
||||||
string="检测结果")
|
|
||||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
||||||
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
||||||
tray_code = fields.Char(string="托盘编码")
|
tray_code = fields.Char(string="托盘编码")
|
||||||
@@ -143,15 +142,17 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
|
|
||||||
def get_plan_workorder(self, production_line):
|
def get_plan_workorder(self, production_line):
|
||||||
tomorrow = (date.today() + timedelta(days=+1)).strftime("%Y-%m-%d")
|
tomorrow = (date.today() + timedelta(days=+1)).strftime("%Y-%m-%d")
|
||||||
|
tomorrow_start = tomorrow + ' 00:00:00'
|
||||||
|
tomorrow_end = tomorrow + ' 23:59:59'
|
||||||
|
logging.info('tomorrow:%s' % tomorrow)
|
||||||
sql = """
|
sql = """
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM mrp_workorder
|
FROM mrp_workorder
|
||||||
WHERE date_planned_start = %s::timestamp
|
WHERE
|
||||||
AND date_planned_start < (%s::timestamp + interval '1 day')
|
to_char(date_planned_start::timestamp + '8 hour','YYYY-MM-DD HH:mm:SS')>= %s
|
||||||
AND date_planned_finished >= %s::timestamp
|
AND to_char(date_planned_finished::timestamp + '8 hour','YYYY-MM-DD HH:mm:SS')<= %s
|
||||||
AND date_planned_finished < (%s::timestamp + interval '1 day')
|
|
||||||
"""
|
"""
|
||||||
params = [tomorrow, tomorrow, tomorrow, tomorrow]
|
params = [tomorrow_start, tomorrow_end]
|
||||||
if production_line:
|
if production_line:
|
||||||
sql += "AND production_line_id = %s"
|
sql += "AND production_line_id = %s"
|
||||||
params.append(production_line)
|
params.append(production_line)
|
||||||
@@ -432,7 +433,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
"""
|
"""
|
||||||
重新生成制造订单或者重新生成工单
|
重新生成制造订单或者重新生成工单
|
||||||
"""
|
"""
|
||||||
if self.test_results == '报废':
|
if self.test_result == '报废':
|
||||||
values = self.env['mrp.production'].create_production1_values(self.production_id)
|
values = self.env['mrp.production'].create_production1_values(self.production_id)
|
||||||
productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(
|
productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(
|
||||||
self.production_id.company_id).create(
|
self.production_id.company_id).create(
|
||||||
@@ -464,7 +465,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
'mail.message_origin_link',
|
'mail.message_origin_link',
|
||||||
values={'self': production, 'origin': origin_production},
|
values={'self': production, 'origin': origin_production},
|
||||||
subtype_id=self.env.ref('mail.mt_note').id)
|
subtype_id=self.env.ref('mail.mt_note').id)
|
||||||
if self.test_results == '返工':
|
if self.test_result == '返工':
|
||||||
productions = self.production_id
|
productions = self.production_id
|
||||||
# self.env['stock.move'].sudo().create(productions._get_moves_raw_values())
|
# self.env['stock.move'].sudo().create(productions._get_moves_raw_values())
|
||||||
# self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
# self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
||||||
@@ -631,39 +632,46 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
|
|
||||||
# 将FTP的检测报告文件下载到临时目录
|
# 将FTP的检测报告文件下载到临时目录
|
||||||
def download_reportfile_tmp(self, workorder, reportpath):
|
def download_reportfile_tmp(self, workorder, reportpath):
|
||||||
|
logging.info('reportpath:%s' % reportpath)
|
||||||
|
production_no_ftp = reportpath.split('/')
|
||||||
production_no = workorder.production_id.name.replace('/', '_')
|
production_no = workorder.production_id.name.replace('/', '_')
|
||||||
remotepath = os.path.join('/', production_no, 'detection')
|
# ftp地址
|
||||||
serverdir = os.path.join('/tmp', production_no, 'detection')
|
remotepath = os.path.join('/', production_no_ftp[1], 'detection')
|
||||||
ftp_resconfig = self.env['res.config.settings'].get_values()
|
logging.info('ftp地址:%s' % remotepath)
|
||||||
ftp = FtpController(str(ftp_resconfig['ftp_host']), int(ftp_resconfig['ftp_port']),
|
if reportpath.find(production_no) != -1:
|
||||||
ftp_resconfig['ftp_user'],
|
# 服务器内临时地址
|
||||||
ftp_resconfig['ftp_password'])
|
serverdir = os.path.join('/tmp', production_no_ftp[1], 'detection')
|
||||||
download_state = ftp.download_reportfile_tree(remotepath, serverdir, reportpath)
|
ftp_resconfig = self.env['res.config.settings'].get_values()
|
||||||
logging.info('download_state:%s' % download_state)
|
ftp = FtpController(str(ftp_resconfig['ftp_host']), int(ftp_resconfig['ftp_port']),
|
||||||
|
ftp_resconfig['ftp_user'],
|
||||||
|
ftp_resconfig['ftp_password'])
|
||||||
|
download_state = ftp.download_reportfile_tree(remotepath, serverdir, reportpath)
|
||||||
|
logging.info('download_state:%s' % download_state)
|
||||||
|
else:
|
||||||
|
download_state = 2
|
||||||
return download_state
|
return download_state
|
||||||
|
|
||||||
# 根据中控系统提供的检测文件地址去ftp里对应的制造订单里获取
|
# 根据中控系统提供的检测文件地址去ftp里对应的制造订单里获取
|
||||||
def get_detection_file(self, workorder, reportPath):
|
def get_detection_file(self, workorder, reportPath):
|
||||||
logging.info('workorder:%s' % workorder.name)
|
if reportPath.startswith('/'):
|
||||||
logging.info('制造订单:%s' % workorder.production_id.name)
|
reportPath = reportPath[1:]
|
||||||
logging.info('reportPath:%s' % reportPath)
|
serverdir = os.path.join('/tmp', reportPath)
|
||||||
serverdir = os.path.join('/tmp', reportPath).replace('//', '/')
|
logging.info('get_detection_file-serverdir:%s' % serverdir)
|
||||||
logging.info('serverdir:%s' % serverdir)
|
serverdir_prefix = os.path.dirname(serverdir)
|
||||||
for root, dirs, files in os.walk(serverdir):
|
for root, dirs, files in os.walk(serverdir_prefix):
|
||||||
for f in files:
|
for filename in files:
|
||||||
logging.info('f:%s' % f)
|
if filename == os.path.basename(reportPath):
|
||||||
if os.path.splitext(f)[1] == ".pdf":
|
report_file_path = os.path.join(root, filename)
|
||||||
full_path = os.path.join(serverdir, root, f)
|
logging.info('get_detection_file-report_file_path:%s' % report_file_path)
|
||||||
logging.info('检测文件路径:%s' % full_path)
|
workorder.detection_report = base64.b64encode(open(report_file_path, 'rb').read())
|
||||||
if full_path is not False:
|
return True
|
||||||
workorder.detection_report = base64.b64encode(
|
|
||||||
open(full_path, 'rb').read())
|
|
||||||
|
|
||||||
|
|
||||||
class CNCprocessing(models.Model):
|
class CNCprocessing(models.Model):
|
||||||
_name = 'sf.cnc.processing'
|
_name = 'sf.cnc.processing'
|
||||||
_description = "CNC加工"
|
_description = "CNC加工"
|
||||||
_rec_name = 'program_name'
|
_rec_name = 'program_name'
|
||||||
|
_order = 'sequence_number,id'
|
||||||
|
|
||||||
cnc_id = fields.Many2one('ir.attachment')
|
cnc_id = fields.Many2one('ir.attachment')
|
||||||
sequence_number = fields.Char('序号')
|
sequence_number = fields.Char('序号')
|
||||||
@@ -686,15 +694,11 @@ class CNCprocessing(models.Model):
|
|||||||
|
|
||||||
# mrs下发编程单创建CNC加工
|
# mrs下发编程单创建CNC加工
|
||||||
def cnc_processing_create(self, cnc_workorder, ret, program_path, program_path_tmp):
|
def cnc_processing_create(self, cnc_workorder, ret, program_path, program_path_tmp):
|
||||||
logging.info('ret:%s' % ret)
|
|
||||||
logging.info('program_path_tmp:%s' % program_path_tmp)
|
|
||||||
logging.info('program_path:%s' % program_path)
|
|
||||||
for obj in ret['programming_list']:
|
for obj in ret['programming_list']:
|
||||||
workorder = self.env['mrp.workorder'].search([('production_id.name', '=', ret['production_order_no']),
|
workorder = self.env['mrp.workorder'].search([('production_id.name', '=', ret['production_order_no']),
|
||||||
('processing_panel', '=', obj['processing_panel']),
|
('processing_panel', '=', obj['processing_panel']),
|
||||||
('routing_type', '=', 'CNC加工')])
|
('routing_type', '=', 'CNC加工')])
|
||||||
logging.info('workorder:%s' % workorder.name)
|
logging.info('workorder:%s' % workorder.id)
|
||||||
logging.info('obj:%s' % obj)
|
|
||||||
if obj['program_name'] in program_path:
|
if obj['program_name'] in program_path:
|
||||||
logging.info('obj:%s' % obj['program_name'])
|
logging.info('obj:%s' % obj['program_name'])
|
||||||
cnc_processing = self.env['sf.cnc.processing'].create({
|
cnc_processing = self.env['sf.cnc.processing'].create({
|
||||||
@@ -711,7 +715,7 @@ class CNCprocessing(models.Model):
|
|||||||
'cutting_tool_handle_type': obj['cutting_tool_handle_type'],
|
'cutting_tool_handle_type': obj['cutting_tool_handle_type'],
|
||||||
'estimated_processing_time': obj['estimated_processing_time'],
|
'estimated_processing_time': obj['estimated_processing_time'],
|
||||||
'remark': obj['remark'],
|
'remark': obj['remark'],
|
||||||
'program_path': program_path
|
'program_path': program_path.replace('/tmp', '')
|
||||||
})
|
})
|
||||||
cnc_processing.get_cnc_processing_file(program_path_tmp, cnc_processing, program_path)
|
cnc_processing.get_cnc_processing_file(program_path_tmp, cnc_processing, program_path)
|
||||||
# cnc_workorder.state = 'done'
|
# cnc_workorder.state = 'done'
|
||||||
@@ -722,15 +726,11 @@ class CNCprocessing(models.Model):
|
|||||||
|
|
||||||
# 根据程序名和加工面匹配到ftp里对应的Nc程序名
|
# 根据程序名和加工面匹配到ftp里对应的Nc程序名
|
||||||
def get_cnc_processing_file(self, serverdir, cnc_processing, program_path):
|
def get_cnc_processing_file(self, serverdir, cnc_processing, program_path):
|
||||||
# logging.info('program_path_tmp:%s' % program_path_tmp)
|
|
||||||
# serverdir = os.path.join('/tmp', folder_name, 'return', processing_panel)
|
|
||||||
logging.info('serverdir:%s' % serverdir)
|
logging.info('serverdir:%s' % serverdir)
|
||||||
for root, dirs, files in os.walk(serverdir):
|
for root, dirs, files in os.walk(serverdir):
|
||||||
for f in files:
|
for f in files:
|
||||||
logging.info('f:%s' % f)
|
|
||||||
if os.path.splitext(f)[1] == ".pdf":
|
if os.path.splitext(f)[1] == ".pdf":
|
||||||
full_path = os.path.join(serverdir, root, f)
|
full_path = os.path.join(serverdir, root, f)
|
||||||
logging.info('pdf:%s' % full_path)
|
|
||||||
if full_path is not False:
|
if full_path is not False:
|
||||||
if not cnc_processing.workorder_id.cnc_worksheet:
|
if not cnc_processing.workorder_id.cnc_worksheet:
|
||||||
cnc_processing.workorder_id.cnc_worksheet = base64.b64encode(
|
cnc_processing.workorder_id.cnc_worksheet = base64.b64encode(
|
||||||
@@ -739,9 +739,6 @@ class CNCprocessing(models.Model):
|
|||||||
if f in program_path:
|
if f in program_path:
|
||||||
# if cnc_processing.program_name == f.split('.')[0]:
|
# if cnc_processing.program_name == f.split('.')[0]:
|
||||||
cnc_file_path = os.path.join(serverdir, root, f)
|
cnc_file_path = os.path.join(serverdir, root, f)
|
||||||
logging.info('cnc_file_path:%s' % cnc_file_path)
|
|
||||||
logging.info('program_path:%s' % program_path)
|
|
||||||
logging.info('f:%s' % f)
|
|
||||||
self.write_file(cnc_file_path, cnc_processing)
|
self.write_file(cnc_file_path, cnc_processing)
|
||||||
|
|
||||||
# 创建附件(nc文件)
|
# 创建附件(nc文件)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from odoo.addons.stock.models.stock_rule import ProcurementException
|
|||||||
from odoo.addons.sf_base.commons.common import Common
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
from odoo.exceptions import ValidationError
|
||||||
|
|
||||||
|
|
||||||
class StockRule(models.Model):
|
class StockRule(models.Model):
|
||||||
@@ -250,6 +251,22 @@ class ProductionLot(models.Model):
|
|||||||
))
|
))
|
||||||
return lot_names
|
return lot_names
|
||||||
|
|
||||||
|
def get_tool_generate_lot_names1(self, company, product):
|
||||||
|
"""
|
||||||
|
采购时生成刀具物料序列号
|
||||||
|
"""
|
||||||
|
now = datetime.now().strftime("%Y%m%d")
|
||||||
|
last_serial = self.env['stock.lot'].search(
|
||||||
|
[('company_id', '=', company.id), ('product_id', '=', product.id), ('name', 'like', now)],
|
||||||
|
limit=1, order='id DESC')
|
||||||
|
if product.cutting_tool_model_id:
|
||||||
|
if not last_serial:
|
||||||
|
return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, 1)
|
||||||
|
else:
|
||||||
|
return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, int(last_serial.name[-3:]) + 1)
|
||||||
|
else:
|
||||||
|
raise ValidationError('该刀具物料产品的型号字段为空,请补充完整!!!')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _get_next_serial(self, company, product):
|
def _get_next_serial(self, company, product):
|
||||||
"""Return the next serial number to be attributed to the product."""
|
"""Return the next serial number to be attributed to the product."""
|
||||||
@@ -258,12 +275,13 @@ class ProductionLot(models.Model):
|
|||||||
[('company_id', '=', company.id), ('product_id', '=', product.id)],
|
[('company_id', '=', company.id), ('product_id', '=', product.id)],
|
||||||
limit=1, order='id DESC')
|
limit=1, order='id DESC')
|
||||||
if last_serial:
|
if last_serial:
|
||||||
return self.env['stock.lot'].generate_lot_names1(product.name, last_serial.name, 2)[
|
if product.categ_id.name == '刀具':
|
||||||
1]
|
return self.env['stock.lot'].get_tool_generate_lot_names1(company, product)
|
||||||
now = datetime.now().strftime("%Y-%m-%d")
|
else:
|
||||||
# formatted_date = now.strftime("%Y-%m-%d")
|
return self.env['stock.lot'].generate_lot_names1(product.name, last_serial.name, 2)[1]
|
||||||
|
now = datetime.now().strftime("%Y%m%d")
|
||||||
if product.cutting_tool_model_id:
|
if product.cutting_tool_model_id:
|
||||||
return "%s-%s-%03d" % (product.cutting_tool_model_id.code, now, 1)
|
return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, 1)
|
||||||
return "%s-%03d" % (product.name, 1)
|
return "%s-%03d" % (product.name, 1)
|
||||||
|
|
||||||
qr_code_image = fields.Binary(string='二维码', compute='_generate_qr_code')
|
qr_code_image = fields.Binary(string='二维码', compute='_generate_qr_code')
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ access_sf_cnc_processing_manager,sf_cnc_processing,model_sf_cnc_processing,sf_ba
|
|||||||
access_sf_cmm_program_group_sf_mrp_user,sf_cmm_program_group_sf_mrp_user,model_sf_cmm_program,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_cmm_program_group_sf_mrp_user,sf_cmm_program_group_sf_mrp_user,model_sf_cmm_program,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
access_sf_cmm_program_group_sf_mrp_manager,sf_cmm_program_group_sf_mrp_manager,model_sf_cmm_program,sf_base.group_sf_mrp_manager,1,0,0,0
|
access_sf_cmm_program_group_sf_mrp_manager,sf_cmm_program_group_sf_mrp_manager,model_sf_cmm_program,sf_base.group_sf_mrp_manager,1,0,0,0
|
||||||
access_sf_model_type,sf_model_type,model_sf_model_type,sf_base.group_sf_mrp_user,1,0,0,0
|
access_sf_model_type,sf_model_type,model_sf_model_type,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
|
access_sf_model_type_admin,sf_model_type_admin,model_sf_model_type,base.group_system,1,1,1,0
|
||||||
access_sf_model_type_manager,sf_model_type,model_sf_model_type,sf_base.group_sf_mrp_manager,1,1,1,0
|
access_sf_model_type_manager,sf_model_type,model_sf_model_type,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||||
access_sf_model_type_group_sale_director,sf_model_type_group_sale_director,model_sf_model_type,sf_base.group_sale_director,1,0,0,0
|
access_sf_model_type_group_sale_director,sf_model_type_group_sale_director,model_sf_model_type,sf_base.group_sale_director,1,0,0,0
|
||||||
access_sf_model_type_group_purchase_director,sf_model_type_group_purchase_director,model_sf_model_type,sf_base.group_purchase_director,1,0,0,0
|
access_sf_model_type_group_purchase_director,sf_model_type_group_purchase_director,model_sf_model_type,sf_base.group_purchase_director,1,0,0,0
|
||||||
|
|||||||
|
@@ -7,7 +7,7 @@ $(document).on('keydown', '.modal.d-block.o_technical_modal,body.o_web_client',
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
RFID = ''
|
RFID = ''
|
||||||
}, 200)
|
}, 200)
|
||||||
if(e.key == 'Enter' && e.keyCode == 13){
|
if(e.key == 'Enter' && e.keyCode == 13 || e.key == 'Tab' && e.keyCode == 9){
|
||||||
if(!RFID || RFID.length <= 3) return;
|
if(!RFID || RFID.length <= 3) return;
|
||||||
dom.children('span').text(RFID)
|
dom.children('span').text(RFID)
|
||||||
RFID = ''
|
RFID = ''
|
||||||
|
|||||||
@@ -143,10 +143,10 @@
|
|||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//label[1]" position="before">
|
<xpath expr="//label[1]" position="before">
|
||||||
<field name='routing_type'/>
|
<field name='routing_type'/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//label[1]" position="attributes">
|
<xpath expr="//label[1]" position="attributes">
|
||||||
<attribute name="string">计划加工时间</attribute>
|
<attribute name="string">计划加工时间</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- 隐藏物料清单-->
|
<!-- 隐藏物料清单-->
|
||||||
@@ -434,9 +434,10 @@
|
|||||||
<field name="results" invisible="1"/>
|
<field name="results" invisible="1"/>
|
||||||
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||||
<group>
|
<group>
|
||||||
<field name="test_results" widget="selection" attrs='{"invisible":[("results","!=",False)]}'/>
|
<field name="test_result" readonly="1" attrs='{"invisible":[("results","!=",False)]}'/>
|
||||||
<field name="results" readonly="1" attrs='{"invisible":[("results","!=","合格")]}'/>
|
<field name="results" readonly="1" attrs='{"invisible":[("results","!=","合格")]}'/>
|
||||||
<field name="detection_report" attrs='{"invisible":[("results","!=",False)]}' widget="pdf_viewer"/>
|
<field name="detection_report" attrs='{"invisible":[("results","!=",False)]}'
|
||||||
|
widget="pdf_viewer"/>
|
||||||
</group>
|
</group>
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<div class="col-12 col-lg-6 o_setting_box">
|
||||||
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
||||||
@@ -447,7 +448,7 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[1]" position="before">
|
<xpath expr="//page[1]" position="before">
|
||||||
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||||
<field name="cnc_ids" widget="one2many" string="工作程序">
|
<field name="cnc_ids" widget="one2many" string="工作程序" default_order="sequence_number,id">
|
||||||
<tree decoration-success="button_state" decoration-bf="button_state">
|
<tree decoration-success="button_state" decoration-bf="button_state">
|
||||||
<field name="sequence_number"/>
|
<field name="sequence_number"/>
|
||||||
<field name="program_name"/>
|
<field name="program_name"/>
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ class FtpController():
|
|||||||
logging.info("进入FTP目录 ")
|
logging.info("进入FTP目录 ")
|
||||||
self.ftp.cwd(target_dir) # 切换工作路径
|
self.ftp.cwd(target_dir) # 切换工作路径
|
||||||
logging.info('FTP目录:%s' % target_dir)
|
logging.info('FTP目录:%s' % target_dir)
|
||||||
self.ftp.mkd('detection')
|
|
||||||
remotenames = self.ftp.nlst()
|
remotenames = self.ftp.nlst()
|
||||||
logging.info('FTP目录文件:%s' % remotenames)
|
logging.info('FTP目录文件:%s' % remotenames)
|
||||||
for file in remotenames:
|
for file in remotenames:
|
||||||
@@ -42,29 +41,26 @@ class FtpController():
|
|||||||
|
|
||||||
# 下载目录下的检测文件
|
# 下载目录下的检测文件
|
||||||
def download_reportfile_tree(self, target_dir, serverdir, reportpath):
|
def download_reportfile_tree(self, target_dir, serverdir, reportpath):
|
||||||
|
if not os.path.exists(serverdir):
|
||||||
|
os.makedirs(serverdir)
|
||||||
try:
|
try:
|
||||||
logging.info("进入FTP目录 ")
|
logging.info("进入FTP目录-检测文件")
|
||||||
logging.info('FTP目录1:%s' % target_dir)
|
|
||||||
logging.info('serverdir:%s' % serverdir)
|
logging.info('serverdir:%s' % serverdir)
|
||||||
logging.info('reportpath:%s' % reportpath)
|
|
||||||
target_dir1 = target_dir.split('/')
|
target_dir1 = target_dir.split('/')
|
||||||
logging.info('target_dir1:%s' % target_dir1[1])
|
logging.info('目录1:%s' % target_dir1[1])
|
||||||
target_dir = os.path.join('/', target_dir1[1])
|
self.ftp.cwd(target_dir1[1]) # 切换工作路径
|
||||||
logging.info('target_dir:%s' % target_dir)
|
logging.info('目录2:%s' % target_dir1[2])
|
||||||
self.ftp.cwd(target_dir) # 切换工作路径
|
self.ftp.cwd(target_dir1[2]) # 切换工作路径
|
||||||
logging.info('FTP目录111111:%s' % target_dir[2])
|
|
||||||
self.ftp.cwd(target_dir[2]) # 切换工作路径
|
|
||||||
logging.info('FTP目录:%s' % target_dir)
|
|
||||||
remotenames = self.ftp.nlst()
|
remotenames = self.ftp.nlst()
|
||||||
logging.info('FTP目录检测报告文件:%s' % remotenames)
|
logging.info('FTP目录检测报告文件:%s' % remotenames)
|
||||||
for file in remotenames:
|
for filename in remotenames:
|
||||||
server = os.path.join(serverdir, file)
|
if os.path.basename(filename) == os.path.basename(reportpath):
|
||||||
logging.info('server' % server)
|
server = os.path.join(serverdir, filename)
|
||||||
if file.find(reportpath) != -1:
|
logging.info('server%s' % server)
|
||||||
self.download_file(server, file)
|
self.download_file(server, filename)
|
||||||
return 1
|
return 1
|
||||||
except:
|
except Exception:
|
||||||
return False
|
return 0
|
||||||
|
|
||||||
# 下载指定目录下的指定文件
|
# 下载指定目录下的指定文件
|
||||||
def download_file(self, serverfile, remotefile):
|
def download_file(self, serverfile, remotefile):
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
token = config.get_param('token', default='')
|
token = config.get_param('token', default='')
|
||||||
sf_secret_key = config.get_param('sf_secret_key', default='')
|
sf_secret_key = config.get_param('sf_secret_key', default='')
|
||||||
sf_url = config.get_param('sf_url', default='')
|
sf_url = config.get_param('sf_url', default='')
|
||||||
bfm_url = config.get_param('bfm_url', default='')
|
|
||||||
ftp_host = config.get_param('ftp_host', default='')
|
ftp_host = config.get_param('ftp_host', default='')
|
||||||
ftp_port = config.get_param('ftp_port', default='')
|
ftp_port = config.get_param('ftp_port', default='')
|
||||||
ftp_user = config.get_param('ftp_user', default='')
|
ftp_user = config.get_param('ftp_user', default='')
|
||||||
@@ -100,7 +99,6 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
token=token,
|
token=token,
|
||||||
sf_secret_key=sf_secret_key,
|
sf_secret_key=sf_secret_key,
|
||||||
sf_url=sf_url,
|
sf_url=sf_url,
|
||||||
bfm_url=bfm_url,
|
|
||||||
ftp_host=ftp_host,
|
ftp_host=ftp_host,
|
||||||
ftp_port=ftp_port,
|
ftp_port=ftp_port,
|
||||||
ftp_user=ftp_user,
|
ftp_user=ftp_user,
|
||||||
@@ -114,7 +112,6 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
ir_config.set_param("token", self.token or "")
|
ir_config.set_param("token", self.token or "")
|
||||||
ir_config.set_param("sf_secret_key", self.sf_secret_key or "")
|
ir_config.set_param("sf_secret_key", self.sf_secret_key or "")
|
||||||
ir_config.set_param("sf_url", self.sf_url or "")
|
ir_config.set_param("sf_url", self.sf_url or "")
|
||||||
ir_config.set_param("bfm_url", self.bfm_url or "")
|
|
||||||
ir_config.set_param("ftp_host", self.ftp_host or "")
|
ir_config.set_param("ftp_host", self.ftp_host or "")
|
||||||
ir_config.set_param("ftp_port", self.ftp_port or "")
|
ir_config.set_param("ftp_port", self.ftp_port or "")
|
||||||
ir_config.set_param("ftp_user", self.ftp_user or "")
|
ir_config.set_param("ftp_user", self.ftp_user or "")
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ class sf_production_plan(models.Model):
|
|||||||
('reverse', '倒排'), ('positive', '顺排')], string='排程设置', default='reverse')
|
('reverse', '倒排'), ('positive', '顺排')], string='排程设置', default='reverse')
|
||||||
product_id = fields.Many2one('product.product', '关联产品')
|
product_id = fields.Many2one('product.product', '关联产品')
|
||||||
origin = fields.Char(string='订单号')
|
origin = fields.Char(string='订单号')
|
||||||
# 加工时长
|
# # 加工时长
|
||||||
process_time = fields.Float(string='加工时长', digits=(16, 2))
|
# process_time = fields.Float(string='加工时长', digits=(16, 2))
|
||||||
# 实际加工时长、实际开始时间、实际结束时间
|
# 实际加工时长、实际开始时间、实际结束时间
|
||||||
actual_process_time = fields.Float(string='实际加工时长', digits=(16, 2))
|
actual_process_time = fields.Float(string='实际加工时长(分钟)', digits=(16, 2), compute='_compute_actual_process_time')
|
||||||
actual_start_time = fields.Datetime(string='实际开始时间')
|
actual_start_time = fields.Datetime(string='实际开始时间')
|
||||||
actual_end_time = fields.Datetime(string='实际结束时间')
|
actual_end_time = fields.Datetime(string='实际结束时间')
|
||||||
shift = fields.Char(string='班次')
|
shift = fields.Char(string='班次')
|
||||||
@@ -67,16 +67,25 @@ class sf_production_plan(models.Model):
|
|||||||
sequence = fields.Integer(string='序号', copy=False, readonly=True, index=True)
|
sequence = fields.Integer(string='序号', copy=False, readonly=True, index=True)
|
||||||
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
||||||
|
|
||||||
|
# 计算实际加工时长
|
||||||
|
@api.depends('actual_start_time', 'actual_end_time')
|
||||||
|
def _compute_actual_process_time(self):
|
||||||
|
for item in self:
|
||||||
|
if item.actual_start_time and item.actual_end_time:
|
||||||
|
item.actual_process_time = (item.actual_end_time - item.actual_start_time).total_seconds() / 60
|
||||||
|
else:
|
||||||
|
item.actual_process_time = None
|
||||||
|
|
||||||
@api.onchange('production_line_id')
|
@api.onchange('production_line_id')
|
||||||
def _compute_production_line_id(self):
|
def _compute_production_line_id(self):
|
||||||
for item in self:
|
for item in self:
|
||||||
item.sudo().production_id.production_line_id = item.production_line_id.id
|
item.sudo().production_id.production_line_id = item.production_line_id.id
|
||||||
item.sudo().production_id.plan_start_processing_time = item.date_planned_start
|
item.sudo().production_id.plan_start_processing_time = item.date_planned_start
|
||||||
|
|
||||||
@api.onchange('state')
|
# @api.onchange('state')
|
||||||
def _onchange_state(self):
|
# def _onchange_state(self):
|
||||||
if self.state == 'finished':
|
# if self.state == 'finished':
|
||||||
self.production_id.schedule_state = '已完成'
|
# self.production_id.schedule_state = '已完成'
|
||||||
|
|
||||||
# @api.model
|
# @api.model
|
||||||
# def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
|
# def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
|
||||||
|
|||||||
@@ -22,12 +22,15 @@
|
|||||||
<field name="production_line_id"/>
|
<field name="production_line_id"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="date_planned_finished"/>
|
<field name="date_planned_finished"/>
|
||||||
|
<field name="actual_start_time"/>
|
||||||
|
<field name="actual_end_time"/>
|
||||||
|
<field name="actual_process_time"/>
|
||||||
<field name="schedule_setting"/>
|
<field name="schedule_setting"/>
|
||||||
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object"
|
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object"
|
||||||
attrs="{'invisible': [('state', 'not in', ['draft'])]}"
|
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}"
|
||||||
groups="sf_base.group_plan_dispatch"/>
|
groups="sf_base.group_plan_dispatch"/>
|
||||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程"
|
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程" type="object"
|
||||||
type="object" attrs="{'invisible': [('state', 'not in', ['done'])]}"
|
attrs="{'invisible': ['|', ('state', '!=', 'done'), ('actual_start_time', '!=', False)]}"
|
||||||
groups="sf_base.group_plan_dispatch"/>
|
groups="sf_base.group_plan_dispatch"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
@@ -42,9 +45,9 @@
|
|||||||
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
||||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"
|
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"
|
||||||
options='{"calendar_view": true, "date_begin": "2020-01-01", "date_end": "2020-12-31"}'
|
options='{"calendar_view": true, "date_begin": "2020-01-01", "date_end": "2020-12-31"}'
|
||||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'done')]}"/>
|
groups="sf_base.group_plan_dispatch" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('actual_start_time', '!=', False)]}"/>
|
||||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"
|
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"
|
||||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
groups="sf_base.group_plan_dispatch" attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}"/>
|
||||||
<!-- <button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/> -->
|
<!-- <button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/> -->
|
||||||
<!-- <button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/> -->
|
<!-- <button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/> -->
|
||||||
|
|
||||||
@@ -66,9 +69,25 @@
|
|||||||
<field name="origin"/>
|
<field name="origin"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
<field name="order_deadline"/>
|
<field name="order_deadline"/>
|
||||||
<field name="process_time"/>
|
<!-- <field name="process_time"/> -->
|
||||||
<field name="schedule_setting"/>
|
<field name="schedule_setting"/>
|
||||||
<field name="production_line_id"/>
|
<field name="production_line_id"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Chatter -->
|
||||||
|
<!-- <div class="oe_chatter"> -->
|
||||||
|
<!-- <field name="message_follower_ids" widget="mail_followers"/> -->
|
||||||
|
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
||||||
|
<!-- <field name="activity_ids"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="oe_chatter"> -->
|
||||||
|
<!-- <field name="message_follower_ids"/> -->
|
||||||
|
<!-- <field name="message_ids"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<group string="加工信息">
|
||||||
|
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="date_planned_finished"/>
|
<field name="date_planned_finished"/>
|
||||||
<field name="actual_process_time"/>
|
<field name="actual_process_time"/>
|
||||||
@@ -83,10 +102,7 @@
|
|||||||
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
||||||
<!-- <field name="activity_ids"/> -->
|
<!-- <field name="activity_ids"/> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<div class="oe_chatter">
|
|
||||||
<field name="message_follower_ids"/>
|
|
||||||
<field name="message_ids"/>
|
|
||||||
</div>
|
|
||||||
</group>
|
</group>
|
||||||
<!-- <group string="规格信息" col="1"> -->
|
<!-- <group string="规格信息" col="1"> -->
|
||||||
<!-- <group col="3"> -->
|
<!-- <group col="3"> -->
|
||||||
@@ -119,6 +135,10 @@
|
|||||||
<!-- <field name="delivery_quantity"/> -->
|
<!-- <field name="delivery_quantity"/> -->
|
||||||
<!-- <field name="delivery_date"/> -->
|
<!-- <field name="delivery_date"/> -->
|
||||||
<!-- </group> -->
|
<!-- </group> -->
|
||||||
|
<div class="oe_chatter">
|
||||||
|
<field name="message_follower_ids"/>
|
||||||
|
<field name="message_ids"/>
|
||||||
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ class ReSaleOrder(models.Model):
|
|||||||
return customer
|
return customer
|
||||||
else:
|
else:
|
||||||
partner = self.env['res.partner'].create({'name': '业务平台'})
|
partner = self.env['res.partner'].create({'name': '业务平台'})
|
||||||
self.env['res.users'].create({'name': '业务平台', 'partner_id': partner.id})
|
|
||||||
return partner
|
return partner
|
||||||
|
|
||||||
# 业务平台分配工厂时在创建完产品后再创建销售明细信息
|
# 业务平台分配工厂时在创建完产品后再创建销售明细信息
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
current_location = fields.Char('位置', compute='_compute_current_location_id')
|
current_location = fields.Char('位置', compute='_compute_current_location_id')
|
||||||
image = fields.Binary('图片', readonly=True)
|
image = fields.Binary('图片', readonly=True)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.depends('barcode_id')
|
@api.depends('barcode_id')
|
||||||
def _compute_current_location_id(self):
|
def _compute_current_location_id(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
@@ -241,6 +243,8 @@ class FunctionalToolWarning(models.Model):
|
|||||||
dispose_time = fields.Char('处理时间')
|
dispose_time = fields.Char('处理时间')
|
||||||
dispose_func = fields.Char('处理方法/措施', readonly=False)
|
dispose_func = fields.Char('处理方法/措施', readonly=False)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _read_group_machine_table_name_ids(self, categories, domain, order):
|
def _read_group_machine_table_name_ids(self, categories, domain, order):
|
||||||
machine_table_name_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
machine_table_name_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||||
@@ -340,6 +344,8 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref',
|
sf_functional_tool_assembly_ids = fields.Many2many('sf.functional.tool.assembly', 'sf_functional_tool_assembly_ref',
|
||||||
'功能刀具组装单', readonly=True)
|
'功能刀具组装单', readonly=True)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.depends('tool_groups_id', 'diameter', 'knife_tip_r_angle')
|
@api.depends('tool_groups_id', 'diameter', 'knife_tip_r_angle')
|
||||||
def _compute_name(self):
|
def _compute_name(self):
|
||||||
for obj in self:
|
for obj in self:
|
||||||
@@ -511,6 +517,8 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
|
|
||||||
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装单', readonly=True)
|
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装单', readonly=True)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.depends('alarm_value', 'used_value')
|
@api.depends('alarm_value', 'used_value')
|
||||||
def _compute_functional_tool_status(self):
|
def _compute_functional_tool_status(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
@@ -677,6 +685,8 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
|
|
||||||
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装', readonly=True)
|
sf_functional_tool_assembly_id = fields.Many2one('sf.functional.tool.assembly', '功能刀具组装', readonly=True)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.depends('diameter', 'tool_included_angle', 'tool_groups_id')
|
@api.depends('diameter', 'tool_included_angle', 'tool_groups_id')
|
||||||
def _compute_functional_tool_name(self):
|
def _compute_functional_tool_name(self):
|
||||||
for obj in self:
|
for obj in self:
|
||||||
@@ -928,6 +938,8 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
sf_cam_work_order_program_knife_plan_id = fields.Many2one('sf.cam.work.order.program.knife.plan',
|
sf_cam_work_order_program_knife_plan_id = fields.Many2one('sf.cam.work.order.program.knife.plan',
|
||||||
'CAM工单程序用刀计划', readonly=True, )
|
'CAM工单程序用刀计划', readonly=True, )
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
def _get_code(self, loading_task_source):
|
def _get_code(self, loading_task_source):
|
||||||
"""
|
"""
|
||||||
自动生成组装单编码
|
自动生成组装单编码
|
||||||
|
|||||||
@@ -328,6 +328,8 @@ class ToolMaterial(models.Model):
|
|||||||
|
|
||||||
barcode_ids = fields.One2many('stock.lot', 'tool_material_search_id', string='序列号', readonly=True)
|
barcode_ids = fields.One2many('stock.lot', 'tool_material_search_id', string='序列号', readonly=True)
|
||||||
|
|
||||||
|
active = fields.Boolean(string='已归档', default=True)
|
||||||
|
|
||||||
@api.depends('barcode_ids')
|
@api.depends('barcode_ids')
|
||||||
def _compute_number(self):
|
def _compute_number(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
|
|||||||
@@ -200,6 +200,7 @@
|
|||||||
|
|
||||||
<field name="current_location_id" invisible="True"/>
|
<field name="current_location_id" invisible="True"/>
|
||||||
<field name="sf_cutting_tool_type_id" invisible="True"/>
|
<field name="sf_cutting_tool_type_id" invisible="True"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="sf_cutting_tool_type_id" icon="fa-building" enable_counters="1"/>
|
<field name="sf_cutting_tool_type_id" icon="fa-building" enable_counters="1"/>
|
||||||
<field name="current_location_id" icon="fa-building" enable_counters="1"/>
|
<field name="current_location_id" icon="fa-building" enable_counters="1"/>
|
||||||
@@ -269,6 +270,7 @@
|
|||||||
<field name="dispose_time"/>
|
<field name="dispose_time"/>
|
||||||
<field name="dispose_func"/>
|
<field name="dispose_func"/>
|
||||||
<field name="production_line_id" invisible="True"/>
|
<field name="production_line_id" invisible="True"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="production_line_id" icon="fa-building" enable_counters="1"/>
|
<field name="production_line_id" icon="fa-building" enable_counters="1"/>
|
||||||
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
||||||
@@ -325,20 +327,20 @@
|
|||||||
<field name="status_create" invisible="1"/>
|
<field name="status_create" invisible="1"/>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="sf_cutting_tool_type_id"
|
<field name="sf_cutting_tool_type_id" class="custom_required"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="tool_groups_id"
|
<field name="tool_groups_id" class="custom_required"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="diameter"
|
<field name="diameter" class="custom_required"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="knife_tip_r_angle"
|
<field name="knife_tip_r_angle" class="custom_required"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="coarse_middle_thin"
|
<field name="coarse_middle_thin"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="whether_standard_knife"
|
<field name="whether_standard_knife"
|
||||||
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
attrs="{'readonly': [('status_create', '=', False)]}"/>
|
||||||
<field name="min_stock_num"/>
|
<field name="min_stock_num" class="custom_required"/>
|
||||||
<field name="max_stock_num"/>
|
<field name="max_stock_num" class="custom_required"/>
|
||||||
<field name="batch_replenishment_num"/>
|
<field name="batch_replenishment_num"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
@@ -417,6 +419,7 @@
|
|||||||
<field name="max_stock_num"/>
|
<field name="max_stock_num"/>
|
||||||
<field name="batch_replenishment_num"/>
|
<field name="batch_replenishment_num"/>
|
||||||
<field name="unit"/>
|
<field name="unit"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="sf_cutting_tool_type_id" enable_counters="1" icon="fa-building"/>
|
<field name="sf_cutting_tool_type_id" enable_counters="1" icon="fa-building"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
@@ -749,6 +752,7 @@
|
|||||||
<field name="used_value"/>
|
<field name="used_value"/>
|
||||||
<field name="functional_tool_status"/>
|
<field name="functional_tool_status"/>
|
||||||
<field name="applicant" optional="hide"/>
|
<field name="applicant" optional="hide"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="production_line_id" enable_counters="1" icon="fa-building"/>
|
<field name="production_line_id" enable_counters="1" icon="fa-building"/>
|
||||||
<field name="maintenance_equipment_id" enable_counters="1" icon="fa-building"/>
|
<field name="maintenance_equipment_id" enable_counters="1" icon="fa-building"/>
|
||||||
@@ -772,7 +776,7 @@
|
|||||||
<field name="name">CAM工单程序用刀计划</field>
|
<field name="name">CAM工单程序用刀计划</field>
|
||||||
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree create="0">
|
||||||
<field name="name" string="工单编码"/>
|
<field name="name" string="工单编码"/>
|
||||||
<field name="cam_procedure_code"/>
|
<field name="cam_procedure_code"/>
|
||||||
<field name="filename"/>
|
<field name="filename"/>
|
||||||
@@ -806,7 +810,7 @@
|
|||||||
<field name="name">CAM工单程序用刀计划</field>
|
<field name="name">CAM工单程序用刀计划</field>
|
||||||
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
<field name="model">sf.cam.work.order.program.knife.plan</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form create="0">
|
||||||
<header>
|
<header>
|
||||||
<button string="申请装刀" name="apply_for_tooling" type="object" class="btn-primary"
|
<button string="申请装刀" name="apply_for_tooling" type="object" class="btn-primary"
|
||||||
attrs="{'invisible': [('plan_execute_status', '!=', '0')]}" confirm="是否确认申请装刀"/>
|
attrs="{'invisible': [('plan_execute_status', '!=', '0')]}" confirm="是否确认申请装刀"/>
|
||||||
@@ -894,6 +898,7 @@
|
|||||||
<field name="need_knife_time"/>
|
<field name="need_knife_time"/>
|
||||||
<field name="applicant_time"/>
|
<field name="applicant_time"/>
|
||||||
<field name="plan_execute_status"/>
|
<field name="plan_execute_status"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="production_line_id" string="生产线" enable_counters="1" icon="fa-filter"/>
|
<field name="production_line_id" string="生产线" enable_counters="1" icon="fa-filter"/>
|
||||||
<field name="functional_tool_type_id" string="功能刀具类型" enable_counters="1"
|
<field name="functional_tool_type_id" string="功能刀具类型" enable_counters="1"
|
||||||
@@ -969,10 +974,10 @@
|
|||||||
}"
|
}"
|
||||||
attrs="{'invisible': [('assemble_status', '!=', '0')]}" groups="sf_base.group_sf_mrp_user"
|
attrs="{'invisible': [('assemble_status', '!=', '0')]}" groups="sf_base.group_sf_mrp_user"
|
||||||
class="btn-primary"/>
|
class="btn-primary"/>
|
||||||
<!-- <button string="组装单打印" name="assemble_single_print" type="object"-->
|
<!-- <button string="组装单打印" name="assemble_single_print" type="object"-->
|
||||||
<!-- groups="sf_base.group_sf_mrp_user"-->
|
<!-- groups="sf_base.group_sf_mrp_user"-->
|
||||||
<!-- attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"-->
|
<!-- attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"-->
|
||||||
<!-- confirm="是否确认打印组装单"/>-->
|
<!-- confirm="是否确认打印组装单"/>-->
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -1008,10 +1013,10 @@
|
|||||||
attrs="{'invisible': [('assemble_status', '!=', '0')]}"
|
attrs="{'invisible': [('assemble_status', '!=', '0')]}"
|
||||||
class="btn-primary"/>
|
class="btn-primary"/>
|
||||||
|
|
||||||
<!-- <button string="组装单打印" name="assemble_single_print" type="object"-->
|
<!-- <button string="组装单打印" name="assemble_single_print" type="object"-->
|
||||||
<!-- groups="sf_base.group_sf_mrp_user"-->
|
<!-- groups="sf_base.group_sf_mrp_user"-->
|
||||||
<!-- attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"-->
|
<!-- attrs="{'invisible': [('assemble_status', '=', '0')]}" class="btn-primary"-->
|
||||||
<!-- confirm="是否确认打印组装单"/>-->
|
<!-- confirm="是否确认打印组装单"/>-->
|
||||||
<field name="assemble_status" widget="statusbar" statusbar_visible="0,1"/>
|
<field name="assemble_status" widget="statusbar" statusbar_visible="0,1"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
@@ -1238,6 +1243,8 @@
|
|||||||
<field name="functional_tool_type_id"/>
|
<field name="functional_tool_type_id"/>
|
||||||
<filter name="no_assemble_status" string="未组装" domain="[('assemble_status', '=', '0')]"/>
|
<filter name="no_assemble_status" string="未组装" domain="[('assemble_status', '=', '0')]"/>
|
||||||
<filter name="yes_assemble_status" string="已组装" domain="[('assemble_status', '=', '1')]"/>
|
<filter name="yes_assemble_status" string="已组装" domain="[('assemble_status', '=', '1')]"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="functional_tool_type_id" enable_counters="1" icon="fa-filter"/>
|
<field name="functional_tool_type_id" enable_counters="1" icon="fa-filter"/>
|
||||||
<!-- <field name="assemble_status" enable_counters="1" icon="fa-filter"/>-->
|
<!-- <field name="assemble_status" enable_counters="1" icon="fa-filter"/>-->
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<field name="name">sf.tool.material.search.tree</field>
|
<field name="name">sf.tool.material.search.tree</field>
|
||||||
<field name="model">sf.tool.material.search</field>
|
<field name="model">sf.tool.material.search</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="刀具物料查询">
|
<tree string="刀具物料查询" create="0">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="cutting_tool_material_id"/>
|
<field name="cutting_tool_material_id"/>
|
||||||
<field name="cutting_tool_standard_library_id"/>
|
<field name="cutting_tool_standard_library_id"/>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<field name="name">sf.tool.material.search.form</field>
|
<field name="name">sf.tool.material.search.form</field>
|
||||||
<field name="model">sf.tool.material.search</field>
|
<field name="model">sf.tool.material.search</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="刀具物料查询">
|
<form string="刀具物料查询" create="0">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<h1>
|
<h1>
|
||||||
@@ -78,6 +78,7 @@
|
|||||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||||
<field name="cutting_tool_standard_library_id" string="刀具型号搜索"/>
|
<field name="cutting_tool_standard_library_id" string="刀具型号搜索"/>
|
||||||
<field name="specification_id" string="规格搜索"/>
|
<field name="specification_id" string="规格搜索"/>
|
||||||
|
<filter string="已归档" name="inactive" domain="[('active', '=', False)]"/>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="cutting_tool_material_id" icon="fa-building" enable_counters="1"/>
|
<field name="cutting_tool_material_id" icon="fa-building" enable_counters="1"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
<field name="new_former"/>
|
<field name="new_former"/>
|
||||||
<field name="use_tool_time"/>
|
<field name="use_tool_time"/>
|
||||||
<field name="reason_for_applying"/>
|
<field name="reason_for_applying"/>
|
||||||
<!-- <field name="functional_tool_cutting_type"/>-->
|
<!-- <field name="functional_tool_cutting_type"/>-->
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="组装物料信息" col="1">
|
<group string="组装物料信息" col="1">
|
||||||
@@ -208,6 +208,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="integral_code_id" placeholder="请选择" string="序列号"
|
<field name="integral_code_id" placeholder="请选择" string="序列号"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -229,6 +230,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="blade_code_id" placeholder="请选择" string="序列号"
|
<field name="blade_code_id" placeholder="请选择" string="序列号"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -251,6 +253,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="bar_code_id" placeholder="请选择" string="序列号"
|
<field name="bar_code_id" placeholder="请选择" string="序列号"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -273,6 +276,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="pad_code_id" placeholder="请选择" string="序列号"
|
<field name="pad_code_id" placeholder="请选择" string="序列号"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -294,6 +298,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="handle_code_id" string="序列号" placeholder="请选择"
|
<field name="handle_code_id" string="序列号" placeholder="请选择"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -315,6 +320,7 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="chuck_code_id" string="序列号" placeholder="请选择"
|
<field name="chuck_code_id" string="序列号" placeholder="请选择"
|
||||||
|
class="custom_required"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
@@ -335,13 +341,15 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="barcode_id" invisible="True"/>
|
<field name="barcode_id" invisible="True"/>
|
||||||
<field name="tool_code" readonly="True"/>
|
<field name="tool_code" readonly="True"/>
|
||||||
<field name="rfid" placeholder="请输入rfid码"/>
|
<field name="rfid" placeholder="请输入rfid码" class="custom_required"/>
|
||||||
<field name="after_assembly_functional_tool_name" string="功能刀具名称"/>
|
<field name="after_assembly_functional_tool_name" string="功能刀具名称"/>
|
||||||
<field name="after_assembly_functional_tool_type_id" string="功能刀具类型"
|
<field name="after_assembly_functional_tool_type_id" string="功能刀具类型"
|
||||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||||
<field name="tool_groups_id"/>
|
<field name="tool_groups_id"/>
|
||||||
<field name="after_assembly_functional_tool_diameter" string="刀具直径(mm)"/>
|
<field name="after_assembly_functional_tool_diameter" string="刀具直径(mm)"
|
||||||
<field name="after_assembly_knife_tip_r_angle" string="刀尖R角(mm)"/>
|
class="custom_required"/>
|
||||||
|
<field name="after_assembly_knife_tip_r_angle" string="刀尖R角(mm)"
|
||||||
|
class="custom_required"/>
|
||||||
<field name="after_assembly_new_former" string="新/旧"/>
|
<field name="after_assembly_new_former" string="新/旧"/>
|
||||||
<field name="cut_time" attrs="{'invisible': [('after_assembly_new_former','=','0')]}"/>
|
<field name="cut_time" attrs="{'invisible': [('after_assembly_new_former','=','0')]}"/>
|
||||||
<field name="cut_length" attrs="{'invisible': [('after_assembly_new_former','=','0')]}"/>
|
<field name="cut_length" attrs="{'invisible': [('after_assembly_new_former','=','0')]}"/>
|
||||||
@@ -350,13 +358,16 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="after_assembly_whether_standard_knife" string="是否标准刀"/>
|
<field name="after_assembly_whether_standard_knife" string="是否标准刀"/>
|
||||||
<field name="after_assembly_coarse_middle_thin" string="粗/中/精"/>
|
<field name="after_assembly_coarse_middle_thin" string="粗/中/精"/>
|
||||||
<field name="after_assembly_max_lifetime_value" string="最大寿命值(min)"/>
|
<field name="after_assembly_max_lifetime_value" string="最大寿命值(min)"
|
||||||
<field name="after_assembly_alarm_value" string="报警值(min)"/>
|
class="custom_required"/>
|
||||||
|
<field name="after_assembly_alarm_value" string="报警值(min)" class="custom_required"/>
|
||||||
<field name="after_assembly_used_value" string="已使用值(min)"/>
|
<field name="after_assembly_used_value" string="已使用值(min)"/>
|
||||||
<field name="after_assembly_tool_loading_length" string="总长度(mm)"/>
|
<field name="after_assembly_tool_loading_length" string="总长度(mm)"
|
||||||
<field name="after_assembly_functional_tool_length" string="伸出长(mm)"/>
|
class="custom_required"/>
|
||||||
<field name="after_assembly_effective_length" string="有效长(mm)"/>
|
<field name="after_assembly_functional_tool_length" string="伸出长(mm)"
|
||||||
<field name="hiding_length"/>
|
class="custom_required"/>
|
||||||
|
<field name="after_assembly_effective_length" string="有效长(mm)" class="custom_required"/>
|
||||||
|
<field name="hiding_length" class="custom_required"/>
|
||||||
<field name="L_D_number"/>
|
<field name="L_D_number"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ class SfShelf(models.Model):
|
|||||||
class ShelfLocation(models.Model):
|
class ShelfLocation(models.Model):
|
||||||
_name = 'sf.shelf.location'
|
_name = 'sf.shelf.location'
|
||||||
_description = '货位'
|
_description = '货位'
|
||||||
_order = 'name'
|
_order = 'name, id'
|
||||||
|
|
||||||
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')
|
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')
|
||||||
# # 目的位置
|
# # 目的位置
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ access_product_tag_stock_manager_group_sf_stock_user,product.tag.stock.manager,p
|
|||||||
access_stock_warehouse_orderpoint_group_sf_stock_user,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,0,0,0
|
access_stock_warehouse_orderpoint_group_sf_stock_user,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,0,0,0
|
||||||
access_stock_warehouse_orderpoint_system_group_sf_stock_user,stock.warehouse.orderpoint system,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,1,1,0
|
access_stock_warehouse_orderpoint_system_group_sf_stock_user,stock.warehouse.orderpoint system,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,1,1,0
|
||||||
access_stock_quant_user_group_sf_stock_user,stock.quant user,stock.model_stock_quant,sf_warehouse.group_sf_stock_user,1,1,1,0
|
access_stock_quant_user_group_sf_stock_user,stock.quant user,stock.model_stock_quant,sf_warehouse.group_sf_stock_user,1,1,1,0
|
||||||
|
|
||||||
access_stock_quant_all,stock.quant all users,stock.model_stock_quant,base.group_user,1,0,0,0
|
access_stock_quant_all,stock.quant all users,stock.model_stock_quant,base.group_user,1,0,0,0
|
||||||
access_stock_quant_package_all,stock.quant.package all users,stock.model_stock_quant_package,base.group_user,1,0,0,0
|
access_stock_quant_package_all,stock.quant.package all users,stock.model_stock_quant_package,base.group_user,1,0,0,0
|
||||||
access_stock_quant_package_stock_manager_group_sf_stock_user,stock.quant.package stock manager,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
|
access_stock_quant_package_stock_manager_group_sf_stock_user,stock.quant.package stock manager,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
|
||||||
|
|||||||
|
Reference in New Issue
Block a user