Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/刀具物料与夹具物料的反注册
# Conflicts: # sf_base/views/base_view.xml # sf_base/views/common_view.xml # sf_tool_management/models/base.py
This commit is contained in:
28
mrp_workorder/static/src/scss/table_custom.scss
Normal file
28
mrp_workorder/static/src/scss/table_custom.scss
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
.o_form_view.o_xxl_form_view {
|
||||||
|
flex-flow: column !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_form_view_container {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html .o_web_client > .o_action_manager > .o_action {
|
||||||
|
height: unset !important;
|
||||||
|
overflow: scroll !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_FormRenderer_chatterContainer.o-aside {
|
||||||
|
width: 100% !important;
|
||||||
|
max-width: 1320px !important;
|
||||||
|
background-color: #fff !important;
|
||||||
|
padding-left: 32px !important;
|
||||||
|
padding-right: 32px !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
border: 1px solid #dee2e6;
|
||||||
|
//margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_form_view {
|
||||||
|
background-color: unset !important;
|
||||||
|
min-height: unset !important;
|
||||||
|
}
|
||||||
@@ -1,226 +1,231 @@
|
|||||||
.o_web_client {
|
.o_web_client {
|
||||||
$o-wo-tablet-padding: $o-horizontal-padding;
|
$o-wo-tablet-padding: $o-horizontal-padding;
|
||||||
$o-wo-tablet-btn-margin: 2px;
|
$o-wo-tablet-btn-margin: 2px;
|
||||||
$o-wo-tablet-bg: #404040; // emulate the pdf reader
|
$o-wo-tablet-bg: #404040; // emulate the pdf reader
|
||||||
$o-wo-tablet-text: color-contrast($o-wo-tablet-bg, $body-color, #FFF);
|
$o-wo-tablet-text: color-contrast($o-wo-tablet-bg, $body-color, #FFF);
|
||||||
|
|
||||||
.o_legacy_form_view.o_workorder_tablet {
|
.o_legacy_form_view.o_workorder_tablet {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: $o-wo-tablet-bg;
|
background-color: $o-wo-tablet-bg;
|
||||||
background-image: url(/web/static/lib/pdfjs/web/images/texture.png);
|
background-image: url(/web/static/lib/pdfjs/web/images/texture.png);
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
|
color: $o-wo-tablet-text;
|
||||||
|
height: auto;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(xl) {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Components
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: $o-wo-tablet-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 0.4em 1em;
|
||||||
|
margin: 0 $o-wo-tablet-btn-margin;
|
||||||
|
|
||||||
|
&.btn-secondary {
|
||||||
color: $o-wo-tablet-text;
|
color: $o-wo-tablet-text;
|
||||||
|
background-color: $o-wo-tablet-bg;
|
||||||
|
border: $o-wo-tablet-bg;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.fa-plus-square-o {
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.o_workorder_icon_btn {
|
||||||
|
padding: 0.4em;
|
||||||
|
|
||||||
|
&.o_workorder_icon_back {
|
||||||
|
padding: 0.4em 0.8em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_workorder_btn_icon_small {
|
||||||
|
font-size: 0.8em;
|
||||||
|
margin-top: -1em;
|
||||||
|
|
||||||
|
&.float-end {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_input {
|
||||||
|
background-color: $o-wo-tablet-bg;
|
||||||
|
color: $o-wo-tablet-text;
|
||||||
|
padding: 0.4em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_field_widget {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_workorder_bar_content {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row nowrap;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&.workorder_bar_left {
|
||||||
|
word-break: break-all;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
justify-content: flex-start;
|
||||||
|
&.workorder_bar_left {
|
||||||
|
flex-flow: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.o_workorder_bar_content_right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
justify-content: flex-start;
|
||||||
|
.o_actions {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Both Top Blocks
|
||||||
|
.workorder_bar, .workorder_actions {
|
||||||
|
background-color: darken($o-wo-tablet-bg, 5%);
|
||||||
|
background-image: url(/web/static/lib/pdfjs/web/images/texture.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
// First Top Block
|
||||||
|
.workorder_bar {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding;
|
||||||
|
padding-left: $o-wo-tablet-padding - $o-wo-tablet-btn-margin;
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
flex-flow: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Last top Block
|
||||||
|
.workorder_actions {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row nowrap;
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
flex-flow: column;
|
||||||
|
}
|
||||||
|
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding - $o-wo-tablet-btn-margin $o-wo-tablet-padding;
|
||||||
|
box-shadow: 0 1px 1px rgba(black, 0.3);
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_form_label {
|
||||||
|
color: $o-wo-tablet-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step's info block
|
||||||
|
.o_workorder_data {
|
||||||
|
background-color: $o-wo-tablet-bg;
|
||||||
|
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding 0;
|
||||||
|
font-size: 0.9em;
|
||||||
|
|
||||||
|
// Final resume table
|
||||||
|
table.o_list_table {
|
||||||
|
color: $body-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Horizontal form
|
||||||
|
.o_workorder_form {
|
||||||
|
padding-bottom: $o-wo-tablet-padding*0.5;
|
||||||
|
justify-content: space-between;
|
||||||
|
@include media-breakpoint-down(md) {
|
||||||
|
flex-flow: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_workorder_field {
|
||||||
|
> div.o_workorder_lot {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
> .o_lot_number {
|
||||||
|
width: 50%;
|
||||||
|
|
||||||
|
&:not(.o_with_button) button.o_external_button {
|
||||||
|
display: block !important;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> div {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_form_label {
|
||||||
|
opacity: 0.7;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a::first-line {
|
||||||
|
font-weight: bold;
|
||||||
|
color: $o-wo-tablet-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PDF Viewer block
|
||||||
|
.workorder_pdf {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
|
||||||
|
div.o_field_pdfviewer, div.o_field_pdf_viewer, span.o_embed_url_viewer {
|
||||||
|
margin: 0;
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
height: auto;
|
height: auto;
|
||||||
overflow: auto;
|
}
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex: 1 0 auto;
|
||||||
|
|
||||||
font-size: 16px;
|
iframe {
|
||||||
|
display: block;
|
||||||
@include media-breakpoint-up(xl) {
|
margin: 0;
|
||||||
font-size: 18px;
|
width: 100%;
|
||||||
}
|
height: 100%;
|
||||||
|
@include o-position-absolute(0, 0, 0, 0);
|
||||||
// Components
|
}
|
||||||
h1,h2,h3,h4,h5,h6 {
|
|
||||||
color: $o-wo-tablet-text;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 0.4em 1em;
|
|
||||||
margin: 0 $o-wo-tablet-btn-margin;
|
|
||||||
|
|
||||||
&.btn-secondary {
|
|
||||||
color: $o-wo-tablet-text;
|
|
||||||
background-color: $o-wo-tablet-bg;
|
|
||||||
border: $o-wo-tablet-bg;
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.fa-plus-square-o {
|
|
||||||
margin-bottom: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.o_workorder_icon_btn {
|
|
||||||
padding: 0.4em;
|
|
||||||
|
|
||||||
&.o_workorder_icon_back {
|
|
||||||
padding: 0.4em 0.8em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_workorder_btn_icon_small {
|
|
||||||
font-size: 0.8em;
|
|
||||||
margin-top: -1em;
|
|
||||||
|
|
||||||
&.float-end {
|
|
||||||
margin-top: 0.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_input {
|
|
||||||
background-color: $o-wo-tablet-bg;
|
|
||||||
color: $o-wo-tablet-text;
|
|
||||||
padding: 0.4em 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_field_widget {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_workorder_bar_content {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
flex: 1 0 auto;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&.workorder_bar_left {
|
|
||||||
word-break: break-all;
|
|
||||||
flex-shrink: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
justify-content: flex-start;
|
|
||||||
&.workorder_bar_left {
|
|
||||||
flex-flow: wrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.o_workorder_bar_content_right {
|
|
||||||
justify-content: flex-end;
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
justify-content: flex-start;
|
|
||||||
.o_actions {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Both Top Blocks
|
|
||||||
.workorder_bar, .workorder_actions {
|
|
||||||
background-color: darken($o-wo-tablet-bg, 5%);
|
|
||||||
background-image: url(/web/static/lib/pdfjs/web/images/texture.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
// First Top Block
|
|
||||||
.workorder_bar {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding;
|
|
||||||
padding-left: $o-wo-tablet-padding - $o-wo-tablet-btn-margin;
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
flex-flow: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Last top Block
|
|
||||||
.workorder_actions {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
flex-flow: column;
|
|
||||||
}
|
|
||||||
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding - $o-wo-tablet-btn-margin $o-wo-tablet-padding;
|
|
||||||
box-shadow: 0 1px 1px rgba(black, 0.3);
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_form_label {
|
|
||||||
color: $o-wo-tablet-text;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step's info block
|
|
||||||
.o_workorder_data {
|
|
||||||
background-color: $o-wo-tablet-bg;
|
|
||||||
padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding 0;
|
|
||||||
font-size: 0.9em;
|
|
||||||
|
|
||||||
// Final resume table
|
|
||||||
table.o_list_table {
|
|
||||||
color: $body-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Horizontal form
|
|
||||||
.o_workorder_form {
|
|
||||||
padding-bottom: $o-wo-tablet-padding*0.5;
|
|
||||||
justify-content: space-between;
|
|
||||||
@include media-breakpoint-down(md) {
|
|
||||||
flex-flow: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
> div {
|
|
||||||
flex: 1 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_workorder_field {
|
|
||||||
> div.o_workorder_lot {
|
|
||||||
width: 100%;
|
|
||||||
justify-content: center;
|
|
||||||
> .o_lot_number {
|
|
||||||
width: 50%;
|
|
||||||
&:not(.o_with_button) button.o_external_button {
|
|
||||||
display: block !important;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
> div {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.o_form_label {
|
|
||||||
opacity: 0.7;
|
|
||||||
display: inline-block;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a, a::first-line {
|
|
||||||
font-weight: bold;
|
|
||||||
color: $o-wo-tablet-text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// PDF Viewer block
|
// Work order Modal
|
||||||
.workorder_pdf {
|
.workorder_menu {
|
||||||
display: flex;
|
.btn {
|
||||||
flex: 1 0 auto;
|
margin-bottom: $o-wo-tablet-padding;
|
||||||
|
padding: 1em;
|
||||||
div.o_field_pdfviewer, div.o_field_pdf_viewer, span.o_embed_url_viewer {
|
font-size: 2em;
|
||||||
margin: 0;
|
text-transform: uppercase;
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex: 1 0 auto;
|
|
||||||
|
|
||||||
iframe {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
@include o-position-absolute(0,0,0,0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Work order Modal
|
|
||||||
.workorder_menu {
|
|
||||||
.btn {
|
|
||||||
margin-bottom: $o-wo-tablet-padding;
|
|
||||||
padding: 1em;
|
|
||||||
font-size: 2em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,24 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- <record id="mrp_production_form_inherit_planning" model="ir.ui.view">-->
|
||||||
|
<!-- <field name="name">mrp.production.form_inherit_planning</field>-->
|
||||||
|
<!-- <field name="model">mrp.production</field>-->
|
||||||
|
<!-- <field name="inherit_id" ref="mrp.mrp_production_form_view"/>-->
|
||||||
|
<!-- <field name="arch" type="xml">-->
|
||||||
|
<!-- <xpath expr="div[hasclass('oe_chatter')]" position="replace">-->
|
||||||
|
<!-- <!– 这里放置替换后的内容 –>-->
|
||||||
|
<!-- </xpath>-->
|
||||||
|
<!-- <xpath expr="//notebook" position="after">-->
|
||||||
|
<!-- <div class="oe_chatter">-->
|
||||||
|
<!-- <field name="message_follower_ids"/>-->
|
||||||
|
<!-- <field name="activity_ids"/>-->
|
||||||
|
<!-- <field name="message_ids"/>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </xpath>-->
|
||||||
|
<!-- </field>-->
|
||||||
|
<!-- </record>-->
|
||||||
|
|
||||||
<record id="mrp_production_view_search_inherit_planning" model="ir.ui.view">
|
<record id="mrp_production_view_search_inherit_planning" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.search.view.inherit.planning</field>
|
<field name="name">mrp.production.search.view.inherit.planning</field>
|
||||||
<field name="model">mrp.production</field>
|
<field name="model">mrp.production</field>
|
||||||
|
|||||||
@@ -124,16 +124,16 @@ class MrsProcessingOrder(models.Model):
|
|||||||
production_process_id = fields.Many2one('sf.production.process', string="表面工艺")
|
production_process_id = fields.Many2one('sf.production.process', string="表面工艺")
|
||||||
|
|
||||||
|
|
||||||
class Tray(models.Model):
|
# class Tray(models.Model):
|
||||||
_name = 'sf.tray'
|
# _name = 'sf.tray'
|
||||||
_description = '托盘'
|
# _description = '托盘'
|
||||||
|
#
|
||||||
code = fields.Char('编码', copy=False)
|
# code = fields.Char('编码', copy=False)
|
||||||
name = fields.Char('名称')
|
# name = fields.Char('名称')
|
||||||
state = fields.Selection(
|
# state = fields.Selection(
|
||||||
[("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")],
|
# [("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")],
|
||||||
default="空闲", string="状态")
|
# default="空闲", string="状态")
|
||||||
active = fields.Boolean('有效', default=True)
|
# active = fields.Boolean('有效', default=True)
|
||||||
|
|
||||||
|
|
||||||
class SupplierSort(models.Model):
|
class SupplierSort(models.Model):
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ access_sf_production_process,sf_production_process,model_sf_production_process,b
|
|||||||
access_sf_production_materials,sf_production_materials,model_sf_production_materials,base.group_user,1,1,1,1
|
access_sf_production_materials,sf_production_materials,model_sf_production_materials,base.group_user,1,1,1,1
|
||||||
access_sf_materials_model,sf_materials_model,model_sf_materials_model,base.group_user,1,1,1,1
|
access_sf_materials_model,sf_materials_model,model_sf_materials_model,base.group_user,1,1,1,1
|
||||||
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,base.group_user,1,1,1,1
|
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,base.group_user,1,1,1,1
|
||||||
access_sf_tray,sf_tray,model_sf_tray,base.group_user,1,1,1,1
|
|
||||||
access_sf_supplier_sort,sf_supplier_sort,model_sf_supplier_sort,base.group_user,1,1,1,1
|
access_sf_supplier_sort,sf_supplier_sort,model_sf_supplier_sort,base.group_user,1,1,1,1
|
||||||
access_sf_production_process_parameter,sf_production_process_parameter,model_sf_production_process_parameter,base.group_user,1,1,1,1
|
access_sf_production_process_parameter,sf_production_process_parameter,model_sf_production_process_parameter,base.group_user,1,1,1,1
|
||||||
access_sf_production_process_category,sf_production_process_category,model_sf_production_process_category,base.group_user,1,1,1,1
|
access_sf_production_process_category,sf_production_process_category,model_sf_production_process_category,base.group_user,1,1,1,1
|
||||||
|
|||||||
|
@@ -1,15 +1,39 @@
|
|||||||
.test_model {
|
.test_model {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
.test_model>.o_form_label {
|
|
||||||
|
.test_model > .o_form_label {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-right: 0px !important;
|
margin-right: 0px !important;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.o_form_label.o_field_invalid::after {
|
|
||||||
|
div:has(.o_required_modifier)>label::before {
|
||||||
content: '*' !important;
|
content: '*' !important;
|
||||||
color: red !important;
|
color: red !important;
|
||||||
padding: 0 4px !important;
|
padding: 0 4px !important;
|
||||||
vertical-align: top !important;
|
vertical-align: top !important;
|
||||||
font-size: 1.5rem !important;
|
font-size: 1.5rem !important;
|
||||||
}
|
}
|
||||||
|
.my-image div {
|
||||||
|
width: 100px !important;
|
||||||
|
height: 130px !important;
|
||||||
|
}
|
||||||
|
.add_flex {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.maintenance_name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.o_kanban_renderer .o_kanban_record .o_kanban_record_has_image_fill .o_kanban_image_fill_left {
|
||||||
|
flex:unset !important;
|
||||||
|
}
|
||||||
|
.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom {
|
||||||
|
margin-top: 5px;
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o_required_modifier {
|
||||||
|
display: flex !important;
|
||||||
|
}
|
||||||
@@ -11,9 +11,12 @@
|
|||||||
<field name="name" string="模糊搜索"
|
<field name="name" string="模糊搜索"
|
||||||
filter_domain="['|',('name', 'ilike', self),('code', 'ilike', self)]"/>
|
filter_domain="['|',('name', 'ilike', self),('code', 'ilike', self)]"/>
|
||||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||||
<!-- <searchpanel>-->
|
<group string="分组">
|
||||||
<!-- <field name="tag_ids" icon="fa-filter"/>-->
|
<filter name="tag_ids" string="标签" domain="[]" context="{'group_by': 'tag_ids'}"/>
|
||||||
<!-- </searchpanel>-->
|
</group>
|
||||||
|
<searchpanel>
|
||||||
|
<field name="tag_ids" select="multi" icon="fa-building" enable_counters="1"/>
|
||||||
|
</searchpanel>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -352,18 +352,18 @@
|
|||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
#------------------托盘------------------
|
<!-- #------------------托盘-------------------->
|
||||||
<record id="action_sf_tray" model="ir.actions.act_window">
|
<!-- <record id="action_sf_tray" 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.tray</field>
|
<!-- <field name="res_model">sf.tray</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">-->
|
||||||
创建托盘吧
|
<!-- 创建托盘吧-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
|
|
||||||
<record id="view_sf_tray_search" model="ir.ui.view">
|
<record id="view_sf_tray_search" model="ir.ui.view">
|
||||||
<field name="name">sf.tray.search</field>
|
<field name="name">sf.tray.search</field>
|
||||||
@@ -377,21 +377,34 @@
|
|||||||
<filter name="state" string="状态" domain="[]" context="{'group_by': 'state'}"/>
|
<filter name="state" string="状态" domain="[]" context="{'group_by': 'state'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
<!-- <record id="view_sf_tray_search" model="ir.ui.view">-->
|
||||||
|
<!-- <field name="name">sf.tray.search</field>-->
|
||||||
|
<!-- <field name="model">sf.tray</field>-->
|
||||||
|
<!-- <field name="arch" type="xml">-->
|
||||||
|
<!-- <search string="托盘">-->
|
||||||
|
<!-- <field name="name" string="名称" filter_domain="[('name','ilike',self)]"/>-->
|
||||||
|
<!-- <field name="code" string="编码" filter_domain="[('code','ilike',self)]"/>-->
|
||||||
|
<!-- <group string="分组">-->
|
||||||
|
<!-- <filter name="state" string="状态" domain="[]" context="{'group_by': 'state'}"/>-->
|
||||||
|
<!-- </group>-->
|
||||||
|
<!-- </search>-->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="tree_sf_tray_view">
|
<!-- </field>-->
|
||||||
<field name="name">sf.tray.tree</field>
|
<!-- </record>-->
|
||||||
<field name="model">sf.tray</field>
|
|
||||||
<field name="arch" type="xml">
|
<!-- <record model="ir.ui.view" id="tree_sf_tray_view">-->
|
||||||
<tree string="托盘">
|
<!-- <field name="name">sf.tray.tree</field>-->
|
||||||
<field name="code"/>
|
<!-- <field name="model">sf.tray</field>-->
|
||||||
<field name="name"/>
|
<!-- <field name="arch" type="xml">-->
|
||||||
<field name="state"/>
|
<!-- <tree string="托盘">-->
|
||||||
</tree>
|
<!-- <field name="code"/>-->
|
||||||
</field>
|
<!-- <field name="name"/>-->
|
||||||
</record>
|
<!-- <field name="state"/>-->
|
||||||
|
<!-- </tree>-->
|
||||||
|
<!-- </field>-->
|
||||||
|
<!-- </record>-->
|
||||||
|
|
||||||
<record model="ir.ui.view" id="sf_tray_form">
|
<record model="ir.ui.view" id="sf_tray_form">
|
||||||
<field name="name">sf.tray.form</field>
|
<field name="name">sf.tray.form</field>
|
||||||
@@ -416,5 +429,28 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
=======
|
||||||
|
<!-- <record model="ir.ui.view" id="sf_tray_form">-->
|
||||||
|
<!-- <field name="name">sf.tray.form</field>-->
|
||||||
|
<!-- <field name="model">sf.tray</field>-->
|
||||||
|
<!-- <field name="arch" type="xml">-->
|
||||||
|
<!-- <form string="托盘">-->
|
||||||
|
<!-- <header>-->
|
||||||
|
<!-- <field name='state' widget="radio" options="{'horizontal': True}"/>-->
|
||||||
|
<!-- </header>-->
|
||||||
|
<!-- <sheet>-->
|
||||||
|
<!-- <group name="group1">-->
|
||||||
|
<!-- <group>-->
|
||||||
|
<!-- <field name="code" required="1"/>-->
|
||||||
|
<!-- </group>-->
|
||||||
|
<!-- <group>-->
|
||||||
|
<!-- <field name="name" required="1"/>-->
|
||||||
|
<!-- </group>-->
|
||||||
|
<!-- </group>-->
|
||||||
|
<!-- </sheet>-->
|
||||||
|
<!-- </form>-->
|
||||||
|
<!-- </field>-->
|
||||||
|
<!-- </record>-->
|
||||||
|
>>>>>>> ae07a515b7846f3ab9dea426ae5a88c0472cf6b6
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -44,13 +44,13 @@
|
|||||||
sequence="2"
|
sequence="2"
|
||||||
action="action_sf_machine_tool_type"/>
|
action="action_sf_machine_tool_type"/>
|
||||||
|
|
||||||
<menuitem
|
<!-- <menuitem-->
|
||||||
id="menu_sf_tray"
|
<!-- id="menu_sf_tray"-->
|
||||||
parent="mrp.menu_mrp_configuration"
|
<!-- parent="mrp.menu_mrp_configuration"-->
|
||||||
name="托盘"
|
<!-- name="托盘"-->
|
||||||
sequence="8"
|
<!-- sequence="8"-->
|
||||||
action="action_sf_tray"
|
<!-- action="action_sf_tray"-->
|
||||||
/>
|
<!-- />-->
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
sequence="2"
|
sequence="2"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='production_id']" position="before">
|
<xpath expr="//field[@name='production_id']" position="before">
|
||||||
<!-- <field name="name" filter_domain="['|', '|', ('明确的字段内容', 'ilike', self), ('shortdesc', 'ilike', self), ('name', 'ilike', self)]" string="Theme"/>-->
|
<!-- <field name="name" filter_domain="['|', '|', ('明确的字段内容', 'ilike', self), ('shortdesc', 'ilike', self), ('name', 'ilike', self)]" string="Theme"/>-->
|
||||||
<field name="tray_code" filter_domain="[('production_id.tray_ids.code','=',self)]"/>
|
<!-- <field name="tray_code" filter_domain="[('production_id.tray_ids.code','=',self)]"/>-->
|
||||||
<!-- <field name="production_id"/>-->
|
<!-- <field name="production_id"/>-->
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- <xpath expr="//search//group//filter[@name='product']" position="before">-->
|
<!-- <xpath expr="//search//group//filter[@name='product']" position="before">-->
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'security/group_security.xml',
|
'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'views/maintenance_views.xml',
|
|
||||||
'views/maintenance_logs_views.xml',
|
'views/maintenance_logs_views.xml',
|
||||||
|
'views/maintenance_views.xml',
|
||||||
'views/equipment_maintenance_standards_views.xml',
|
'views/equipment_maintenance_standards_views.xml',
|
||||||
'views/maintenance_request_views.xml',
|
'views/maintenance_request_views.xml',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ class SfMaintenanceEquipment(models.Model):
|
|||||||
active = fields.Boolean('有效', default=True)
|
active = fields.Boolean('有效', default=True)
|
||||||
# 多个型号对应一个机床
|
# 多个型号对应一个机床
|
||||||
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
machine_tool_id = fields.Many2one('sf.machine_tool', '机床')
|
||||||
|
sf_maintenance_logs_ids = fields.One2many('sf.maintenance.logs','maintenance_equipment_id', '设备故障日志')
|
||||||
|
|
||||||
|
|
||||||
def name_get(self):
|
def name_get(self):
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class SfMaintenanceLogs(models.Model):
|
|||||||
name = fields.Char(string='名称')
|
name = fields.Char(string='名称')
|
||||||
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
type = fields.Selection([('type1', '类型1'), ('type2', '类型2')], string='类型')
|
||||||
brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌')
|
brand = fields.Many2one('sf.machine.brand', relared='model.brand_id', string='品牌')
|
||||||
model = fields.Many2one('maintenance.equipment', string='设备')
|
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='设备')
|
||||||
code_location = fields.Char(string='编码位置')
|
code_location = fields.Char(string='编码位置')
|
||||||
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
fault_type = fields.Selection([('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='故障类型')
|
||||||
fault_code = fields.Char(string='故障代码')
|
fault_code = fields.Char(string='故障代码')
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="brand"/>
|
<field name="brand"/>
|
||||||
<field name="model"/>
|
<field name="maintenance_equipment_id"/>
|
||||||
<field name="code_location"/>
|
<field name="code_location"/>
|
||||||
<field name="fault_type"/>
|
<field name="fault_type"/>
|
||||||
<field name="fault_code"/>
|
<field name="fault_code"/>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="brand"/>
|
<field name="brand"/>
|
||||||
<field name="model"/>
|
<field name="maintenance_equipment_id"/>
|
||||||
<field name="code_location"/>
|
<field name="code_location"/>
|
||||||
<field name="fault_type"/>
|
<field name="fault_type"/>
|
||||||
<field name="fault_code"/>
|
<field name="fault_code"/>
|
||||||
@@ -64,13 +64,13 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="model" icon="fa-building" enable_counters="1"/>
|
<field name="maintenance_equipment_id" icon="fa-building" enable_counters="1"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="brand"/>
|
<field name="brand"/>
|
||||||
<field name="model"/>
|
<field name="maintenance_equipment_id"/>
|
||||||
<field name="code_location"/>
|
<field name="code_location"/>
|
||||||
<field name="fault_type"/>
|
<field name="fault_type"/>
|
||||||
<field name="fault_code"/>
|
<field name="fault_code"/>
|
||||||
|
|||||||
@@ -20,131 +20,147 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//sheet" position="before">
|
<xpath expr="//sheet" position="before">
|
||||||
<!-- <button type="object" class="oe_highlight" name='enroll_machine_tool' string="机床注册"/>-->
|
<header>
|
||||||
<field name="state_zc" widget="radio" options="{'horizontal': true}"/>
|
|
||||||
|
<field name="state" widget="statusbar" options="{'clickable': '1'}"/>
|
||||||
|
</header>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//div[@name='button_box']" position="inside">
|
||||||
|
|
||||||
|
<button name="%(action_maintenance_logs)d"
|
||||||
|
type="action"
|
||||||
|
class="oe_stat_button"
|
||||||
|
context="{'default_sf_maintenance_logs_ids': sf_maintenance_logs_ids}"
|
||||||
|
icon="fa-wrench">
|
||||||
|
<field string="设备故障日志" name="sf_maintenance_logs_ids" widget="statinfo"/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='maintenance_team_id']" position="before">
|
<xpath expr="//field[@name='maintenance_team_id']" position="before">
|
||||||
<field name="machine_tool_picture" widget="image"/>
|
<field name="machine_tool_picture" widget="image"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='category_id']" position="after">
|
<xpath expr="//field[@name='category_id']" position="after">
|
||||||
|
<field name="state_zc" readonly="1"/>
|
||||||
<field name="code" readonly="1"/>
|
<field name="code" readonly="1"/>
|
||||||
<field name="state" widget="radio" options="{'horizontal': true}"/>
|
|
||||||
<field name="equipment_type" invisible="1"/>
|
<field name="equipment_type" invisible="1"/>
|
||||||
<field name="brand_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
|
<field name="brand_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
|
||||||
force_save="1"/>
|
force_save="1"/>
|
||||||
<field name="type_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" required="1" domain="[('brand_id', '=', brand_id)]"/>
|
<field name="type_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}" required="1"
|
||||||
|
domain="[('brand_id', '=', brand_id)]"/>
|
||||||
<field name="machine_tool_category" readonly="1" attrs="{'invisible': [('type_id', '=', False)]}"
|
<field name="machine_tool_category" readonly="1" attrs="{'invisible': [('type_id', '=', False)]}"
|
||||||
force_save="1"/>
|
force_save="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@name='description']" position="before">
|
<xpath expr="//page[@name='description']" position="before">
|
||||||
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}">
|
<page string="设备参数" name="sf_equipment" attrs="{'invisible': [('type_id', '=', False)]}">
|
||||||
<group>
|
<group>
|
||||||
<group string="基本参数">
|
<group string="基本参数">
|
||||||
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
<field name="control_system_id" required="1" options="{'no_create': True}"/>
|
||||||
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
<label for="workbench_L" string="工作台尺寸(mm)"/>
|
||||||
<div class="test_model">
|
<div class="test_model">
|
||||||
<label for="workbench_L" string="长"/>
|
<label for="workbench_L" string="长"/>
|
||||||
<field name="workbench_L" class="o_address_zip" required="1"
|
<field name="workbench_L" class="o_address_zip" required="1"
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="workbench_W" string="宽"/>
|
|
||||||
<field name="workbench_W" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
</div>
|
|
||||||
<label for="machine_tool_L" string="机床尺寸(mm)"/>
|
|
||||||
<div class="test_model">
|
|
||||||
<label for="machine_tool_L" string="长"/>
|
|
||||||
<field name="machine_tool_L" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="machine_tool_W" string="宽"/>
|
|
||||||
<field name="machine_tool_W" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<label for="machine_tool_H" string="高"/>
|
|
||||||
<field name="machine_tool_H" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
</div>
|
|
||||||
<field name="feed_speed" required="1"/>
|
|
||||||
<label for="precision_min" string="X轴定位精度(mm)"/>
|
|
||||||
<div class="test_model">
|
|
||||||
<label for="precision_min" string="最小(min)"/>
|
|
||||||
<field name="precision_min" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="precision_max" string="最大(max)"/>
|
|
||||||
<field name="precision_max" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
</div>
|
|
||||||
<field name="workpiece_load" required="1"/>
|
|
||||||
<field name="number_of_knife_library" required="1" options="{'format': false}"/>
|
|
||||||
<field name="lead_screw" required="1"/>
|
|
||||||
<field name="number_of_axles" required="1" widget="radio"
|
|
||||||
options="{'horizontal': true}"/>
|
|
||||||
<label for="x_axis" string="加工行程(mm)"
|
|
||||||
attrs="{'invisible': [('number_of_axles', '=', False)]}"/>
|
|
||||||
<div class="test_model"
|
|
||||||
attrs="{'invisible': [('number_of_axles', '=', False)]}">
|
|
||||||
<label for="x_axis" string="x"/>
|
|
||||||
<field name="x_axis" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="y_axis" string="y"/>
|
|
||||||
<field name="y_axis" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="z_axis" string="z"/>
|
|
||||||
<field name="z_axis" class="o_address_zip" required="1"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<br></br>
|
|
||||||
<label for="b_axis" string="b"
|
|
||||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"/>
|
|
||||||
<field name="b_axis" class="o_address_zip" required="1"
|
|
||||||
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
<span>&nbsp;</span>
|
|
||||||
<label for="c_axis" string="c"
|
|
||||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
|
||||||
<field name="c_axis" class="o_address_zip" required="1"
|
|
||||||
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
|
||||||
options="{'format': false}"/>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group string="主轴">
|
|
||||||
<field name="taper" required="1"/>
|
|
||||||
<field name="rotate_speed" string="主轴转速(min/s)" required="1"
|
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
<field name="heightened_way" required="1"/>
|
<span>&nbsp;</span>
|
||||||
<field name="torque" required="1"/>
|
<label for="workbench_W" string="宽"/>
|
||||||
<field name="motor_power" required="1"/>
|
<field name="workbench_W" class="o_address_zip" required="1"
|
||||||
<label for="distance_min" string="主轴端面-工作台距离(mm)"/>
|
options="{'format': false}"/>
|
||||||
<div class="test_model">
|
</div>
|
||||||
<label for="distance_min" string="最小(min)"/>
|
<label for="machine_tool_L" string="机床尺寸(mm)"/>
|
||||||
<field name="distance_min" class="o_address_zip" required="1"
|
<div class="test_model">
|
||||||
options="{'format': false}"/>
|
<label for="machine_tool_L" string="长"/>
|
||||||
<span>&nbsp;</span>
|
<field name="machine_tool_L" class="o_address_zip" required="1"
|
||||||
<label for="distance_max" string="最大(max)"/>
|
options="{'format': false}"/>
|
||||||
<field name="distance_max" class="o_address_zip" required="1"
|
<span>&nbsp;</span>
|
||||||
options="{'format': false}"/>
|
<label for="machine_tool_W" string="宽"/>
|
||||||
</div>
|
<field name="machine_tool_W" class="o_address_zip" required="1"
|
||||||
<field name="guide_rail" required="1"/>
|
options="{'format': false}"/>
|
||||||
</group>
|
<label for="machine_tool_H" string="高"/>
|
||||||
<group string="刀具">
|
<field name="machine_tool_H" class="o_address_zip" required="1"
|
||||||
<field name="knife_type" required="1"/>
|
options="{'format': false}"/>
|
||||||
<field name="tool_speed" required="1"/>
|
</div>
|
||||||
<field name="tool_long_max" required="1"/>
|
<field name="feed_speed" required="1"/>
|
||||||
<label for="tool_diameter_min" string="刀具刀径(mm)"/>
|
<label for="precision_min" string="X轴定位精度(mm)"/>
|
||||||
<div class="test_model">
|
<div class="test_model">
|
||||||
<label for="tool_diameter_min" string="最小(min)"/>
|
<label for="precision_min" string="最小(min)"/>
|
||||||
<field name="tool_diameter_min" class="o_address_zip" required="1"
|
<field name="precision_min" class="o_address_zip" required="1"
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
<span>&nbsp;</span>
|
<span>&nbsp;</span>
|
||||||
<label for="tool_diameter_max" string="最大(max)"/>
|
<label for="precision_max" string="最大(max)"/>
|
||||||
<field name="tool_diameter_max" class="o_address_zip" required="1"
|
<field name="precision_max" class="o_address_zip" required="1"
|
||||||
options="{'format': false}"/>
|
options="{'format': false}"/>
|
||||||
</div>
|
</div>
|
||||||
<field name="tool_quality_max" required="1"/>
|
<field name="workpiece_load" required="1"/>
|
||||||
</group>
|
<field name="number_of_knife_library" required="1" options="{'format': false}"/>
|
||||||
</group>
|
<field name="lead_screw" required="1"/>
|
||||||
|
<field name="number_of_axles" required="1" widget="radio"
|
||||||
|
options="{'horizontal': true}"/>
|
||||||
|
<label for="x_axis" string="加工行程(mm)"
|
||||||
|
attrs="{'invisible': [('number_of_axles', '=', False)]}"/>
|
||||||
|
<div class="test_model"
|
||||||
|
attrs="{'invisible': [('number_of_axles', '=', False)]}">
|
||||||
|
<label for="x_axis" string="x"/>
|
||||||
|
<field name="x_axis" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>&nbsp;</span>
|
||||||
|
<label for="y_axis" string="y"/>
|
||||||
|
<field name="y_axis" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>&nbsp;</span>
|
||||||
|
<label for="z_axis" string="z"/>
|
||||||
|
<field name="z_axis" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<br></br>
|
||||||
|
<label for="b_axis" string="b"
|
||||||
|
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"/>
|
||||||
|
<field name="b_axis" class="o_address_zip" required="1"
|
||||||
|
attrs="{'invisible': [('number_of_axles', '=', '三轴')]}"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>&nbsp;</span>
|
||||||
|
<label for="c_axis" string="c"
|
||||||
|
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"/>
|
||||||
|
<field name="c_axis" class="o_address_zip" required="1"
|
||||||
|
attrs="{'invisible': [('number_of_axles', 'in', ['三轴','四轴'])]}"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<group string="主轴">
|
||||||
|
<field name="taper" required="1"/>
|
||||||
|
<field name="rotate_speed" string="主轴转速(r/min)" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<field name="heightened_way" required="1"/>
|
||||||
|
<field name="torque" required="1"/>
|
||||||
|
<field name="motor_power" required="1"/>
|
||||||
|
<label for="distance_min" string="主轴端面-工作台距离(mm)"/>
|
||||||
|
<div class="test_model">
|
||||||
|
<label for="distance_min" string="最小(min)"/>
|
||||||
|
<field name="distance_min" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>&nbsp;</span>
|
||||||
|
<label for="distance_max" string="最大(max)"/>
|
||||||
|
<field name="distance_max" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
</div>
|
||||||
|
<field name="guide_rail" required="1"/>
|
||||||
|
</group>
|
||||||
|
<group string="刀具">
|
||||||
|
<field name="knife_type" required="1"/>
|
||||||
|
<field name="tool_speed" required="1"/>
|
||||||
|
<field name="tool_long_max" required="1"/>
|
||||||
|
<label for="tool_diameter_min" string="刀具刀径(mm)"/>
|
||||||
|
<div class="test_model">
|
||||||
|
<label for="tool_diameter_min" string="最小(min)"/>
|
||||||
|
<field name="tool_diameter_min" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
<span>&nbsp;</span>
|
||||||
|
<label for="tool_diameter_max" string="最大(max)"/>
|
||||||
|
<field name="tool_diameter_max" class="o_address_zip" required="1"
|
||||||
|
options="{'format': false}"/>
|
||||||
|
</div>
|
||||||
|
<field name="tool_quality_max" required="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
|
||||||
</page>
|
</page>
|
||||||
@@ -196,6 +212,8 @@
|
|||||||
<xpath expr="//field[@name='category_id']" position="after">
|
<xpath expr="//field[@name='category_id']" position="after">
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="category_id" icon="fa-building" enable_counters="1"/>
|
<field name="category_id" icon="fa-building" enable_counters="1"/>
|
||||||
|
<field name="state" icon="fa-building" enable_counters="1"/>
|
||||||
|
<field name="state_zc" icon="fa-building" enable_counters="1"/>
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
@@ -249,6 +267,52 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="sf_maintenance_equipment_view_kanban_inherit_hr" model="ir.ui.view">
|
||||||
|
<field name="name">sf.maintenance.equipment.view.kanban.inherit.hr</field>
|
||||||
|
<field name="model">maintenance.equipment</field>
|
||||||
|
<field name="inherit_id" ref="maintenance.hr_equipment_view_kanban"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='activity_state']" position="before">
|
||||||
|
<field name="state"/>
|
||||||
|
<field name="machine_tool_picture"/>
|
||||||
|
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//templates" position="inside">
|
||||||
|
<t t-name="kanban-box">
|
||||||
|
<div t-attf-class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record oe_kanban_card oe_kanban_global_click
|
||||||
|
#{record.state.raw_value == '正常' ? 'kanban_color_1' : ''}
|
||||||
|
#{record.state.raw_value == '故障' ? 'kanban_color_2' : ''}
|
||||||
|
#{record.state.raw_value == '不可用' ? 'kanban_color_3' : ''}">
|
||||||
|
|
||||||
|
<field name="machine_tool_picture" class="o_kanban_image_fill_left d-block my-image"
|
||||||
|
preview_image="image_128" widget="background_image"/>
|
||||||
|
<!-- <field name="machine_tool_picture" widget="image" options="{'previewImage': false}"/>-->
|
||||||
|
<div class="add_flex">
|
||||||
|
<div class="o_kanban_card_header">
|
||||||
|
<div class="o_kanban_card_header_title maintenance_name">
|
||||||
|
<field name="name"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 内容 -->
|
||||||
|
<div class="o_kanban_record_bottom state_zc">
|
||||||
|
<field name="state_zc"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_kanban_record_bottom state_zc">
|
||||||
|
<field name="state"/>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="o_kanban_record_bottom">-->
|
||||||
|
<!-- <field name="factory_id"/>-->
|
||||||
|
<!-- <span> | </span>-->
|
||||||
|
<!-- <field name="supplier_id"/>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_equipment_form1"
|
id="menu_equipment_form1"
|
||||||
name="设备清单"
|
name="设备清单"
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
'security/group_security.xml',
|
'security/group_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'views/mrp_production_addional_change.xml',
|
'views/mrp_production_addional_change.xml',
|
||||||
'report/tray_report.xml',
|
# 'report/tray_report.xml',
|
||||||
# 'views/mrp_maintenance_views.xml',
|
# 'views/mrp_maintenance_views.xml',
|
||||||
'views/mrp_routing_workcenter_view.xml',
|
'views/mrp_routing_workcenter_view.xml',
|
||||||
'views/mrp_workcenter_views.xml',
|
'views/mrp_workcenter_views.xml',
|
||||||
'views/mrp_workorder_view.xml',
|
'views/mrp_workorder_view.xml',
|
||||||
'views/production_line_view.xml',
|
'views/production_line_view.xml',
|
||||||
'views/tray_view.xml',
|
# 'views/tray_view.xml',
|
||||||
'views/model_type_view.xml',
|
'views/model_type_view.xml',
|
||||||
# 'views/kanban_change.xml'
|
# 'views/kanban_change.xml'
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class MrpProduction(models.Model):
|
|||||||
_description = "制造订单"
|
_description = "制造订单"
|
||||||
_order = 'create_date desc'
|
_order = 'create_date desc'
|
||||||
|
|
||||||
tray_ids = fields.One2many('sf.tray', 'production_id', string="托盘")
|
# tray_ids = fields.One2many('sf.tray', 'production_id', string="托盘")
|
||||||
maintenance_count = fields.Integer(compute='_compute_maintenance_count', string="Number of maintenance requests")
|
maintenance_count = fields.Integer(compute='_compute_maintenance_count', string="Number of maintenance requests")
|
||||||
request_ids = fields.One2many('maintenance.request', 'production_id')
|
request_ids = fields.One2many('maintenance.request', 'production_id')
|
||||||
model_file = fields.Binary('模型文件', related='product_id.model_file')
|
model_file = fields.Binary('模型文件', related='product_id.model_file')
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], default='合格',
|
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], default='合格',
|
||||||
string="检测结果")
|
string="检测结果")
|
||||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工")
|
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工")
|
||||||
tray_code = fields.Char(string="托盘")
|
tray_code = fields.Char(string="托盘编码")
|
||||||
glb_file = fields.Binary("glb模型文件")
|
glb_file = fields.Binary("glb模型文件")
|
||||||
is_subcontract = fields.Boolean(string='是否外协')
|
is_subcontract = fields.Boolean(string='是否外协')
|
||||||
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
||||||
@@ -252,32 +252,32 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
'domain': [('workorder_id', '=', self.id)]
|
'domain': [('workorder_id', '=', self.id)]
|
||||||
}
|
}
|
||||||
|
|
||||||
tray_id = fields.Many2one('sf.tray', string="托盘信息", tracking=True)
|
# tray_id = fields.Many2one('sf.tray', string="托盘信息", tracking=True)
|
||||||
|
|
||||||
# 扫码绑定托盘方法
|
# 扫码绑定托盘方法
|
||||||
|
|
||||||
def gettray(self):
|
# def gettray(self):
|
||||||
if self.tray_code != False:
|
# if self.tray_code != False:
|
||||||
values = self.env['sf.tray'].search([("code", "=", self.tray_code)])
|
# values = self.env['sf.tray'].search([("code", "=", self.tray_code)])
|
||||||
if values:
|
# if values:
|
||||||
if values.state == "占用":
|
# if values.state == "占用":
|
||||||
raise UserError('该托盘已占用')
|
# raise UserError('该托盘已占用')
|
||||||
if values.state == "报损":
|
# if values.state == "报损":
|
||||||
raise UserError('该托盘已损坏')
|
# raise UserError('该托盘已损坏')
|
||||||
else:
|
# else:
|
||||||
values.update({
|
# values.update({
|
||||||
'workorder_id': self,
|
# 'workorder_id': self,
|
||||||
'production_id': self.production_id,
|
# 'production_id': self.production_id,
|
||||||
'state': '占用',
|
# 'state': '占用',
|
||||||
})
|
# })
|
||||||
self.work_state = "已绑定"
|
# self.work_state = "已绑定"
|
||||||
orders = self.env['mrp.workorder'].search([('production_id', '=', self.production_id.id)])
|
# orders = self.env['mrp.workorder'].search([('production_id', '=', self.production_id.id)])
|
||||||
for a in orders:
|
# for a in orders:
|
||||||
a.tray_id = values
|
# a.tray_id = values
|
||||||
else:
|
# else:
|
||||||
raise UserError('该托盘编码已失效')
|
# raise UserError('该托盘编码已失效')
|
||||||
else:
|
# else:
|
||||||
raise UserError('托盘码不能为空')
|
# raise UserError('托盘码不能为空')
|
||||||
|
|
||||||
# 验证坯料序列号是否正确
|
# 验证坯料序列号是否正确
|
||||||
def pro_code_is_ok(self, barcode):
|
def pro_code_is_ok(self, barcode):
|
||||||
@@ -293,50 +293,50 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
pro_code_ok = fields.Boolean(default=False)
|
pro_code_ok = fields.Boolean(default=False)
|
||||||
|
|
||||||
# 托盘扫码绑定
|
# 托盘扫码绑定
|
||||||
def gettray_auto(self, barcode):
|
# def gettray_auto(self, barcode):
|
||||||
if barcode != False:
|
# if barcode != False:
|
||||||
values = self.env['sf.tray'].search([("code", "=", barcode)])
|
# values = self.env['sf.tray'].search([("code", "=", barcode)])
|
||||||
|
#
|
||||||
if values:
|
# if values:
|
||||||
if values.state == "占用":
|
# if values.state == "占用":
|
||||||
raise UserError('该托盘已占用')
|
# raise UserError('该托盘已占用')
|
||||||
if values.state == "报损":
|
# if values.state == "报损":
|
||||||
raise UserError('该托盘已损坏')
|
# raise UserError('该托盘已损坏')
|
||||||
else:
|
# else:
|
||||||
values.update({
|
# values.update({
|
||||||
'workorder_id': self,
|
# 'workorder_id': self,
|
||||||
'production_id': self.production_id,
|
# 'production_id': self.production_id,
|
||||||
'state': '占用',
|
# 'state': '占用',
|
||||||
})
|
# })
|
||||||
self.work_state = "已绑定"
|
# self.work_state = "已绑定"
|
||||||
orders = self.env['mrp.workorder'].search([('production_id', '=', self.production_id.id)])
|
# orders = self.env['mrp.workorder'].search([('production_id', '=', self.production_id.id)])
|
||||||
for a in orders:
|
# for a in orders:
|
||||||
a.tray_id = values
|
# a.tray_id = values
|
||||||
|
#
|
||||||
return values
|
# return values
|
||||||
|
#
|
||||||
# return {
|
# # return {
|
||||||
# 'name': _('New Maintenance Request'),
|
# # 'name': _('New Maintenance Request'),
|
||||||
# 'view_mode': 'form',
|
# # 'view_mode': 'form',
|
||||||
# 'res_model': 'maintenance.request',
|
# # 'res_model': 'maintenance.request',
|
||||||
# 'type': 'ir.actions.act_window',
|
# # 'type': 'ir.actions.act_window',
|
||||||
# 'context': {
|
# # 'context': {
|
||||||
# 'default_company_id': self.company_id.id,
|
# # 'default_company_id': self.company_id.id,
|
||||||
# 'default_production_id': self.id,
|
# # 'default_production_id': self.id,
|
||||||
# },
|
# # },
|
||||||
# 'domain': [('production_id', '=', self.id)],
|
# # 'domain': [('production_id', '=', self.id)],
|
||||||
# }
|
# # }
|
||||||
else:
|
# else:
|
||||||
raise UserError('该托盘编码已失效')
|
# raise UserError('该托盘编码已失效')
|
||||||
else:
|
# else:
|
||||||
raise UserError('托盘码不能为空')
|
# raise UserError('托盘码不能为空')
|
||||||
|
|
||||||
# 解除托盘绑定
|
# 解除托盘绑定
|
||||||
def unbindtray(self):
|
# def unbindtray(self):
|
||||||
tray = self.env['sf.tray'].search([("production_id", "=", self.production_id.id)])
|
# tray = self.env['sf.tray'].search([("production_id", "=", self.production_id.id)])
|
||||||
if tray:
|
# if tray:
|
||||||
tray.unclamp()
|
# tray.unclamp()
|
||||||
self.tray_id = False
|
# self.tray_id = False
|
||||||
|
|
||||||
# return {
|
# return {
|
||||||
# 'name': _('New Maintenance Request'),
|
# 'name': _('New Maintenance Request'),
|
||||||
@@ -682,51 +682,51 @@ class SfWorkOrderBarcodes(models.Model):
|
|||||||
_name = "mrp.workorder"
|
_name = "mrp.workorder"
|
||||||
_inherit = ["mrp.workorder", "barcodes.barcode_events_mixin"]
|
_inherit = ["mrp.workorder", "barcodes.barcode_events_mixin"]
|
||||||
|
|
||||||
def on_barcode_scanned(self, barcode):
|
# def on_barcode_scanned(self, barcode):
|
||||||
workorder = self.env['mrp.workorder'].browse(self.ids)
|
# workorder = self.env['mrp.workorder'].browse(self.ids)
|
||||||
if "*" not in barcode:
|
# if "*" not in barcode:
|
||||||
if self.routing_type == '装夹':
|
# if self.routing_type == '装夹':
|
||||||
tray_code = self.env['sf.tray'].search([('code', '=', barcode)])
|
# tray_code = self.env['sf.tray'].search([('code', '=', barcode)])
|
||||||
self.tray_code = tray_code.code
|
# self.tray_code = tray_code.code
|
||||||
self.tray_id = workorder.gettray_auto(barcode)
|
# self.tray_id = workorder.gettray_auto(barcode)
|
||||||
elif self.routing_type == '前置三元定位检测':
|
# elif self.routing_type == '前置三元定位检测':
|
||||||
print('我是前置三元检测')
|
# print('我是前置三元检测')
|
||||||
logging.info('我是前置三元检测')
|
# logging.info('我是前置三元检测')
|
||||||
elif self.routing_type == 'CNC加工':
|
# elif self.routing_type == 'CNC加工':
|
||||||
if barcode == 'UP-ALL':
|
# if barcode == 'UP-ALL':
|
||||||
print("我是一键合并下发")
|
# print("我是一键合并下发")
|
||||||
logging.info('我是一键合并下发')
|
# logging.info('我是一键合并下发')
|
||||||
self.up_merge_all()
|
# self.up_merge_all()
|
||||||
else:
|
# else:
|
||||||
print('CNC加工')
|
# print('CNC加工')
|
||||||
# print(barcode)
|
# # print(barcode)
|
||||||
# a = self.env['sf.tray'].search([('code', '=', barcode)])
|
# # a = self.env['sf.tray'].search([('code', '=', barcode)])
|
||||||
# print(a)
|
# # print(a)
|
||||||
# # workorder_obj = self.env['mrp.workorder'].search([('tray_code', '=', barcode)], limit=1)
|
# # # workorder_obj = self.env['mrp.workorder'].search([('tray_code', '=', barcode)], limit=1)
|
||||||
# workorder_obj = self.env['mrp.workorder'].search([('tray_code', '=', barcode)])
|
# # workorder_obj = self.env['mrp.workorder'].search([('tray_code', '=', barcode)])
|
||||||
# e = workorder_obj.id
|
# # e = workorder_obj.id
|
||||||
# print(workorder_obj)
|
# # print(workorder_obj)
|
||||||
# action = {
|
# # action = {
|
||||||
# 'name': '工单',
|
# # 'name': '工单',
|
||||||
# 'type': 'ir.actions.act_window',
|
# # 'type': 'ir.actions.act_window',
|
||||||
# # 'view_type': 'form',
|
# # # 'view_type': 'form',
|
||||||
# 'view_mode': 'form',
|
# # 'view_mode': 'form',
|
||||||
# 'res_model': 'mrp.workorder',
|
# # 'res_model': 'mrp.workorder',
|
||||||
# 'view_id': self.env.ref('mrp.mrp_production_workorder_form_view_inherit').id,
|
# # 'view_id': self.env.ref('mrp.mrp_production_workorder_form_view_inherit').id,
|
||||||
# # 'res_id': workorder_obj.id,
|
# # # 'res_id': workorder_obj.id,
|
||||||
# 'res_id': 1023,
|
# # 'res_id': 1023,
|
||||||
# 'target': 'current',
|
# # 'target': 'current',
|
||||||
# # 'context': self.env.context,
|
# # # 'context': self.env.context,
|
||||||
# # 'flags': {'initial_mode': 'edit'},
|
# # # 'flags': {'initial_mode': 'edit'},
|
||||||
# }
|
# # }
|
||||||
# return action
|
# # return action
|
||||||
|
#
|
||||||
elif self.routing_type == '后置三元质量检测':
|
# elif self.routing_type == '后置三元质量检测':
|
||||||
print('后置三元检测')
|
# print('后置三元检测')
|
||||||
elif self.routing_type == '解除装夹':
|
# elif self.routing_type == '解除装夹':
|
||||||
print("我是解除装夹")
|
# print("我是解除装夹")
|
||||||
else:
|
# else:
|
||||||
pass
|
# pass
|
||||||
|
#
|
||||||
else:
|
# else:
|
||||||
self.pro_code_ok = workorder.pro_code_is_ok(barcode)
|
# self.pro_code_ok = workorder.pro_code_is_ok(barcode)
|
||||||
|
|||||||
@@ -1,60 +1,60 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# # -*- coding: utf-8 -*-
|
||||||
# Part of SmartGo. See LICENSE file for full copyright and licensing details.
|
# # Part of SmartGo. See LICENSE file for full copyright and licensing details.
|
||||||
import base64
|
# import base64
|
||||||
from io import BytesIO
|
# from io import BytesIO
|
||||||
from odoo import api, fields, models
|
# from odoo import api, fields, models
|
||||||
#from pystrich.code128 import Code128Encoder
|
# #from pystrich.code128 import Code128Encoder
|
||||||
|
#
|
||||||
|
#
|
||||||
class Tray(models.Model):
|
# class Tray(models.Model):
|
||||||
_inherit = 'sf.tray'
|
# _inherit = 'sf.tray'
|
||||||
_description = '托盘'
|
# _description = '托盘'
|
||||||
qr_image = fields.Binary(string="托盘二维码", compute='compute_qr_image')
|
# qr_image = fields.Binary(string="托盘二维码", compute='compute_qr_image')
|
||||||
production_id = fields.Many2one('mrp.production', string='制造订单',
|
# production_id = fields.Many2one('mrp.production', string='制造订单',
|
||||||
related='workorder_id.production_id'
|
# related='workorder_id.production_id'
|
||||||
)
|
# )
|
||||||
workorder_id = fields.Many2one('mrp.workorder', string="工单"
|
# workorder_id = fields.Many2one('mrp.workorder', string="工单"
|
||||||
)
|
# )
|
||||||
|
#
|
||||||
@api.onchange('production_id')
|
# @api.onchange('production_id')
|
||||||
def updateTrayState(self):
|
# def updateTrayState(self):
|
||||||
if self.workorder_id != False and self.create_date != False:
|
# if self.workorder_id != False and self.create_date != False:
|
||||||
|
#
|
||||||
self.state = '占用'
|
# self.state = '占用'
|
||||||
else:
|
# else:
|
||||||
self.state = '空闲'
|
# self.state = '空闲'
|
||||||
|
#
|
||||||
#解绑托盘
|
# #解绑托盘
|
||||||
def unclamp(self):
|
# def unclamp(self):
|
||||||
self.workorder_id = False
|
# self.workorder_id = False
|
||||||
self.production_id = False
|
# self.production_id = False
|
||||||
self.state = '空闲'
|
# self.state = '空闲'
|
||||||
|
#
|
||||||
@api.depends('code')
|
# @api.depends('code')
|
||||||
def compute_qr_image(self):
|
# def compute_qr_image(self):
|
||||||
for item in self:
|
# for item in self:
|
||||||
if not item.code:
|
# if not item.code:
|
||||||
item.qr_image = False
|
# item.qr_image = False
|
||||||
continue
|
# continue
|
||||||
# 根据code动态生成二维码图片
|
# # 根据code动态生成二维码图片
|
||||||
# qr = qrcode.QRCode(
|
# # qr = qrcode.QRCode(
|
||||||
# version=1,
|
# # version=1,
|
||||||
# error_correction=qrcode.constants.ERROR_CORRECT_L,
|
# # error_correction=qrcode.constants.ERROR_CORRECT_L,
|
||||||
# box_size=10,
|
# # box_size=10,
|
||||||
# border=4,
|
# # border=4,
|
||||||
# )
|
# # )
|
||||||
# qr.add_data(item.code)
|
# # qr.add_data(item.code)
|
||||||
# qr.make(fit=True)
|
# # qr.make(fit=True)
|
||||||
# img = qr.make_image()
|
# # img = qr.make_image()
|
||||||
# 生成条形码文件
|
# # 生成条形码文件
|
||||||
# bar = barcode.get("ean13", "123456789102", writer=ImageWriter())
|
# # bar = barcode.get("ean13", "123456789102", writer=ImageWriter())
|
||||||
# a = bar.get_fullcode()
|
# # a = bar.get_fullcode()
|
||||||
# b = bar.save('occ')
|
# # b = bar.save('occ')
|
||||||
# 生成条形码图片
|
# # 生成条形码图片
|
||||||
partner_encoder = Code128Encoder(item.code)
|
# partner_encoder = Code128Encoder(item.code)
|
||||||
# 转换bytes流
|
# # 转换bytes流
|
||||||
temp = BytesIO()
|
# temp = BytesIO()
|
||||||
partner_encoder.save(temp)
|
# partner_encoder.save(temp)
|
||||||
# img.save(temp, format='PNG')
|
# # img.save(temp, format='PNG')
|
||||||
qr_image = base64.b64encode(temp.getvalue())
|
# qr_image = base64.b64encode(temp.getvalue())
|
||||||
item.qr_image = qr_image
|
# item.qr_image = qr_image
|
||||||
|
|||||||
@@ -102,197 +102,202 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="mrp_workcenter_view_kanban_inherit_maintenance" model="ir.ui.view"> -->
|
<record id="mrp_workcenter_view_kanban_inherit_maintenance" model="ir.ui.view">
|
||||||
<!-- <field name="name">mrp.workcenter.view.kanban.inherit.maintenance</field> -->
|
<field name="name">mrp.workcenter.view.kanban.inherit.maintenance</field>
|
||||||
<!-- <field name="model">mrp.workcenter</field> -->
|
<field name="model">mrp.workcenter</field>
|
||||||
<!-- <field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/> -->
|
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||||
<!-- <field name="arch" type="xml"> -->
|
<field name="arch" type="xml">
|
||||||
<!-- <xpath expr="//div[@name='plan_order']" position="after"> -->
|
<xpath expr="//div[@name='plan_order']" position="after">
|
||||||
<!-- <div> -->
|
<div>
|
||||||
<!-- <a name="%(maintenance.hr_equipment_request_action)d" type="action">Maintenance</a> -->
|
<a name="%(maintenance.hr_equipment_request_action)d" type="action">Maintenance</a>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
<!-- </xpath> -->
|
</xpath>
|
||||||
<!-- </field> -->
|
</field>
|
||||||
<!-- </record> -->
|
</record>
|
||||||
<!-- 继承原有的看板视图 -->
|
|
||||||
<record id="mrp_workcenter_kanban_inherit1" model="ir.ui.view">
|
|
||||||
<field name="name">mrp.workcenter.kanban.inherit</field>
|
|
||||||
<field name="model">mrp.workcenter</field>
|
|
||||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//kanban" position="replace">
|
|
||||||
<kanban class="oe_background_grey o_kanban_dashboard o_workcenter_kanban" create="0" sample="1"
|
|
||||||
js_class="custom_kanban1">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="color"/>
|
|
||||||
<field name="workorder_count"/>
|
|
||||||
<field name="working_state"/>
|
|
||||||
<field name="oee_target"/>
|
|
||||||
<field name="production_line_show"/>
|
|
||||||
<field name="production_line_id"/>
|
|
||||||
<templates>
|
|
||||||
<t t-name="kanban-box"
|
|
||||||
t-if="record.production_line_id.value == record.production_line_show.raw_value">
|
|
||||||
<!-- <div t-on-click="console.log(record.production_line_id,'11111111111')"></div>-->
|
|
||||||
<!-- <div t-on-click="console.log(record.production_line_show,'22222222222')"></div>-->
|
|
||||||
<div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}">
|
|
||||||
<div t-attf-class="o_kanban_card_header o_kanban_record_top">
|
|
||||||
<div class="o_kanban_record_headings o_kanban_card_header_title">
|
|
||||||
<span class="o_primary ml8" style="display: inline-block">
|
|
||||||
<field name="name"/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="o_kanban_manage_button_section">
|
|
||||||
<a class="o_kanban_manage_toggle_button" href="#">
|
|
||||||
<i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container o_kanban_card_content">
|
|
||||||
<div class="row mb16">
|
|
||||||
<div class="col-6 o_kanban_primary_left">
|
|
||||||
<div class="btn-group" name="o_wo">
|
|
||||||
<t t-if="record.workorder_count.raw_value > 0">
|
|
||||||
<button class="btn btn-primary" name="action_work_order"
|
|
||||||
type="object"
|
|
||||||
context="{'search_default_ready': 1, 'search_default_progress': 1}">
|
|
||||||
<span>WORK ORDERS</span>
|
|
||||||
</button>
|
|
||||||
</t>
|
|
||||||
<t t-if="record.workorder_count.raw_value <= 0">
|
|
||||||
<button class="btn btn-warning"
|
|
||||||
name="%(mrp.act_product_mrp_production_workcenter)d"
|
|
||||||
type="action">
|
|
||||||
<span>PLAN ORDERS</span>
|
|
||||||
</button>
|
|
||||||
</t>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 o_kanban_primary_right">
|
|
||||||
<div class="row" t-if="record.workorder_ready_count.raw_value > 0">
|
|
||||||
<div class="col-8">
|
|
||||||
<a name="action_work_order" type="object"
|
|
||||||
context="{'search_default_ready': 1}">
|
|
||||||
To Launch
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 text-end">
|
|
||||||
<field name="workorder_ready_count"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" t-if="record.workorder_progress_count.raw_value > 0">
|
|
||||||
<div class="col-8">
|
|
||||||
<a name="action_work_order" type="object"
|
|
||||||
context="{'search_default_progress': 1}">
|
|
||||||
In Progress
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 text-end">
|
|
||||||
<field name="workorder_progress_count"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" t-if="record.workorder_late_count.raw_value > 0">
|
|
||||||
<div class="col-8">
|
|
||||||
<a name="action_work_order" type="object"
|
|
||||||
context="{'search_default_late': 1}">
|
|
||||||
Late
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 text-end">
|
|
||||||
<field name="workorder_late_count"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" t-if="record.oee.raw_value > 0">
|
|
||||||
<div class="col-6">
|
|
||||||
<a name="%(mrp.mrp_workcenter_productivity_report_oee)d"
|
|
||||||
type="action">
|
|
||||||
OEE
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 text-end">
|
|
||||||
<span t-att-class="record.oee_target.raw_value and (record.oee.raw_value < record.oee_target.raw_value) and 'text-danger' or (record.oee.raw_value > record.oee_target.raw_value) and 'text-success' or 'text-warning'">
|
|
||||||
<strong>
|
|
||||||
<field name="oee" widget="integer"/>%
|
|
||||||
</strong>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 o_kanban_primary_left"
|
|
||||||
style="position:absolute; bottom:10px;" name="wc_stages">
|
|
||||||
<a name="%(mrp.act_mrp_block_workcenter)d" type="action"
|
|
||||||
class="o_status float-end"
|
|
||||||
title="No workorder currently in progress. Click to mark work center as blocked."
|
|
||||||
aria-label="No workorder currently in progress. Click to mark work center as blocked."
|
|
||||||
attrs="{'invisible': [('working_state','in',('blocked','done'))]}"/>
|
|
||||||
<a name="unblock" type="object" class=" o_status o_status_red float-end"
|
|
||||||
title="Workcenter blocked, click to unblock."
|
|
||||||
aria-label="Workcenter blocked, click to unblock."
|
|
||||||
attrs="{'invisible': [('working_state','in',('normal','done'))]}"/>
|
|
||||||
<a name="%(mrp.act_mrp_block_workcenter)d" type="action"
|
|
||||||
class="o_status o_status_green float-end"
|
|
||||||
title="Work orders in progress. Click to block work center."
|
|
||||||
aria-label="Work orders in progress. Click to block work center."
|
|
||||||
attrs="{'invisible': [('working_state','in',('normal','blocked'))]}"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_view">
|
|
||||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
|
||||||
<span>Actions</span>
|
|
||||||
</div>
|
|
||||||
<div role="menuitem" name="plan_order">
|
|
||||||
<a name="action_work_order" type="object">Plan Orders</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a name="%(maintenance.hr_equipment_request_action)d" type="action">
|
|
||||||
Maintenance
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
|
|
||||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
|
||||||
<span>Reporting</span>
|
|
||||||
</div>
|
|
||||||
<div role="menuitem">
|
|
||||||
<a name="%(mrp.mrp_workcenter_productivity_report_oee)d" type="action">
|
|
||||||
OEE
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div role="menuitem">
|
|
||||||
<a name="%(mrp.mrp_workorder_workcenter_report)d" type="action"
|
|
||||||
context="{'search_default_thisyear':True}">
|
|
||||||
Performance
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div role="menuitem">
|
|
||||||
<a name="action_work_order" type="object"
|
|
||||||
context="{'search_default_waiting': 1}">Waiting Availability
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div t-if="widget.editable" class="o_kanban_card_manage_settings row">
|
|
||||||
<div role="menuitem" aria-haspopup="true" class="col-8">
|
<!-- 此段勿删,备用。待生产线驾驶舱完全确定下拉并完成后再行删除!!! -->
|
||||||
<ul role="menu" class="oe_kanban_colorpicker" data-field="color"/>
|
|
||||||
</div>
|
|
||||||
<div role="menuitem" class="text-end">
|
<!-- --><!-- 继承原有的看板视图 -->
|
||||||
<a type="edit">Settings</a>
|
<!-- <record id="mrp_workcenter_kanban_inherit1" model="ir.ui.view"> -->
|
||||||
</div>
|
<!-- <field name="name">mrp.workcenter.kanban.inherit</field> -->
|
||||||
</div>
|
<!-- <field name="model">mrp.workcenter</field> -->
|
||||||
</div>
|
<!-- <field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/> -->
|
||||||
</div>
|
<!-- <field name="arch" type="xml"> -->
|
||||||
</t>
|
<!-- <xpath expr="//kanban" position="replace"> -->
|
||||||
</templates>
|
<!-- <kanban class="oe_background_grey o_kanban_dashboard o_workcenter_kanban" create="0" sample="1" -->
|
||||||
</kanban>
|
<!-- > -->
|
||||||
</xpath>
|
<!-- <field name="name"/> -->
|
||||||
</field>
|
<!-- <field name="color"/> -->
|
||||||
</record>
|
<!-- <field name="workorder_count"/> -->
|
||||||
|
<!-- <field name="working_state"/> -->
|
||||||
|
<!-- <field name="oee_target"/> -->
|
||||||
|
<!-- <field name="production_line_show"/> -->
|
||||||
|
<!-- <field name="production_line_id"/> -->
|
||||||
|
<!-- <templates> -->
|
||||||
|
<!-- <t t-name="kanban-box" -->
|
||||||
|
<!-- t-if="record.production_line_id.value == record.production_line_show.raw_value"> -->
|
||||||
|
<!-- <div t-on-click="console.log(record.production_line_id,'11111111111')"></div>--> -->
|
||||||
|
<!-- <div t-on-click="console.log(record.production_line_show,'22222222222')"></div>--> -->
|
||||||
|
<!-- <div t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}"> -->
|
||||||
|
<!-- <div t-attf-class="o_kanban_card_header o_kanban_record_top"> -->
|
||||||
|
<!-- <div class="o_kanban_record_headings o_kanban_card_header_title"> -->
|
||||||
|
<!-- <span class="o_primary ml8" style="display: inline-block"> -->
|
||||||
|
<!-- <field name="name"/> -->
|
||||||
|
<!-- </span> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="o_kanban_manage_button_section"> -->
|
||||||
|
<!-- <a class="o_kanban_manage_toggle_button" href="#"> -->
|
||||||
|
<!-- <i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/> -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="container o_kanban_card_content"> -->
|
||||||
|
<!-- <div class="row mb16"> -->
|
||||||
|
<!-- <div class="col-6 o_kanban_primary_left"> -->
|
||||||
|
<!-- <div class="btn-group" name="o_wo"> -->
|
||||||
|
<!-- <t t-if="record.workorder_count.raw_value > 0"> -->
|
||||||
|
<!-- <button class="btn btn-primary" name="action_work_order" -->
|
||||||
|
<!-- type="object" -->
|
||||||
|
<!-- context="{'search_default_ready': 1, 'search_default_progress': 1}"> -->
|
||||||
|
<!-- <span>WORK ORDERS</span> -->
|
||||||
|
<!-- </button> -->
|
||||||
|
<!-- </t> -->
|
||||||
|
<!-- <t t-if="record.workorder_count.raw_value <= 0"> -->
|
||||||
|
<!-- <button class="btn btn-warning" -->
|
||||||
|
<!-- name="%(mrp.act_product_mrp_production_workcenter)d" -->
|
||||||
|
<!-- type="action"> -->
|
||||||
|
<!-- <span>PLAN ORDERS</span> -->
|
||||||
|
<!-- </button> -->
|
||||||
|
<!-- </t> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-6 o_kanban_primary_right"> -->
|
||||||
|
<!-- <div class="row" t-if="record.workorder_ready_count.raw_value > 0"> -->
|
||||||
|
<!-- <div class="col-8"> -->
|
||||||
|
<!-- <a name="action_work_order" type="object" -->
|
||||||
|
<!-- context="{'search_default_ready': 1}"> -->
|
||||||
|
<!-- To Launch -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-4 text-end"> -->
|
||||||
|
<!-- <field name="workorder_ready_count"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="row" t-if="record.workorder_progress_count.raw_value > 0"> -->
|
||||||
|
<!-- <div class="col-8"> -->
|
||||||
|
<!-- <a name="action_work_order" type="object" -->
|
||||||
|
<!-- context="{'search_default_progress': 1}"> -->
|
||||||
|
<!-- In Progress -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-4 text-end"> -->
|
||||||
|
<!-- <field name="workorder_progress_count"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="row" t-if="record.workorder_late_count.raw_value > 0"> -->
|
||||||
|
<!-- <div class="col-8"> -->
|
||||||
|
<!-- <a name="action_work_order" type="object" -->
|
||||||
|
<!-- context="{'search_default_late': 1}"> -->
|
||||||
|
<!-- Late -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-4 text-end"> -->
|
||||||
|
<!-- <field name="workorder_late_count"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="row" t-if="record.oee.raw_value > 0"> -->
|
||||||
|
<!-- <div class="col-6"> -->
|
||||||
|
<!-- <a name="%(mrp.mrp_workcenter_productivity_report_oee)d" -->
|
||||||
|
<!-- type="action"> -->
|
||||||
|
<!-- OEE -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-6 text-end"> -->
|
||||||
|
<!-- <span t-att-class="record.oee_target.raw_value and (record.oee.raw_value < record.oee_target.raw_value) and 'text-danger' or (record.oee.raw_value > record.oee_target.raw_value) and 'text-success' or 'text-warning'"> -->
|
||||||
|
<!-- <strong> -->
|
||||||
|
<!-- <field name="oee" widget="integer"/>% -->
|
||||||
|
<!-- </strong> -->
|
||||||
|
<!-- </span> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="row"> -->
|
||||||
|
<!-- <div class="col-12 o_kanban_primary_left" -->
|
||||||
|
<!-- style="position:absolute; bottom:10px;" name="wc_stages"> -->
|
||||||
|
<!-- <a name="%(mrp.act_mrp_block_workcenter)d" type="action" -->
|
||||||
|
<!-- class="o_status float-end" -->
|
||||||
|
<!-- title="No workorder currently in progress. Click to mark work center as blocked." -->
|
||||||
|
<!-- aria-label="No workorder currently in progress. Click to mark work center as blocked." -->
|
||||||
|
<!-- attrs="{'invisible': [('working_state','in',('blocked','done'))]}"/> -->
|
||||||
|
<!-- <a name="unblock" type="object" class=" o_status o_status_red float-end" -->
|
||||||
|
<!-- title="Workcenter blocked, click to unblock." -->
|
||||||
|
<!-- aria-label="Workcenter blocked, click to unblock." -->
|
||||||
|
<!-- attrs="{'invisible': [('working_state','in',('normal','done'))]}"/> -->
|
||||||
|
<!-- <a name="%(mrp.act_mrp_block_workcenter)d" type="action" -->
|
||||||
|
<!-- class="o_status o_status_green float-end" -->
|
||||||
|
<!-- title="Work orders in progress. Click to block work center." -->
|
||||||
|
<!-- aria-label="Work orders in progress. Click to block work center." -->
|
||||||
|
<!-- attrs="{'invisible': [('working_state','in',('normal','blocked'))]}"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="container o_kanban_card_manage_pane dropdown-menu" role="menu"> -->
|
||||||
|
<!-- <div class="row"> -->
|
||||||
|
<!-- <div class="col-6 o_kanban_card_manage_section o_kanban_manage_view"> -->
|
||||||
|
<!-- <div role="menuitem" class="o_kanban_card_manage_title"> -->
|
||||||
|
<!-- <span>Actions</span> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div role="menuitem" name="plan_order"> -->
|
||||||
|
<!-- <a name="action_work_order" type="object">Plan Orders</a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div> -->
|
||||||
|
<!-- <a name="%(maintenance.hr_equipment_request_action)d" type="action"> -->
|
||||||
|
<!-- Maintenance -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div class="col-6 o_kanban_card_manage_section o_kanban_manage_new"> -->
|
||||||
|
<!-- <div role="menuitem" class="o_kanban_card_manage_title"> -->
|
||||||
|
<!-- <span>Reporting</span> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div role="menuitem"> -->
|
||||||
|
<!-- <a name="%(mrp.mrp_workcenter_productivity_report_oee)d" type="action"> -->
|
||||||
|
<!-- OEE -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div role="menuitem"> -->
|
||||||
|
<!-- <a name="%(mrp.mrp_workorder_workcenter_report)d" type="action" -->
|
||||||
|
<!-- context="{'search_default_thisyear':True}"> -->
|
||||||
|
<!-- Performance -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div role="menuitem"> -->
|
||||||
|
<!-- <a name="action_work_order" type="object" -->
|
||||||
|
<!-- context="{'search_default_waiting': 1}">Waiting Availability -->
|
||||||
|
<!-- </a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
<!-- <div t-if="widget.editable" class="o_kanban_card_manage_settings row"> -->
|
||||||
|
<!-- <div role="menuitem" aria-haspopup="true" class="col-8"> -->
|
||||||
|
<!-- <ul role="menu" class="oe_kanban_colorpicker" data-field="color"/> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- <div role="menuitem" class="text-end"> -->
|
||||||
|
<!-- <a type="edit">Settings</a> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </t> -->
|
||||||
|
<!-- </templates> -->
|
||||||
|
<!-- </kanban> -->
|
||||||
|
<!-- </xpath> -->
|
||||||
|
<!-- </field> -->
|
||||||
|
<!-- </record> -->
|
||||||
|
|
||||||
<!-- MRP.PRODUCTION -->
|
<!-- MRP.PRODUCTION -->
|
||||||
<record id="mrp_production_view_form_inherit_maintenance" model="ir.ui.view">
|
<record id="mrp_production_view_form_inherit_maintenance" model="ir.ui.view">
|
||||||
@@ -321,22 +326,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!--<!– 测试searchpanel –>-->
|
<!-- 生产线驾驶舱searchpanel -->
|
||||||
<!-- <record id="view_location_search_sf11111_inherit" model="ir.ui.view">-->
|
<record id="view_location_search_sf11111_inherit" model="ir.ui.view">
|
||||||
<!-- <field name="name">mrp.workcenter.inherit</field>-->
|
<field name="name">mrp.workcenter.inherit</field>
|
||||||
<!-- <field name="model">mrp.workcenter</field>-->
|
<field name="model">mrp.workcenter</field>
|
||||||
<!-- <field name="inherit_id" ref="mrp.view_mrp_workcenter_search"/>-->
|
<field name="inherit_id" ref="mrp.view_mrp_workcenter_search"/>
|
||||||
<!-- <field name="arch" type="xml">-->
|
<field name="arch" type="xml">
|
||||||
<!-- <xpath expr="//search[1]" position="inside">-->
|
<xpath expr="//search[1]" position="inside">
|
||||||
<!-- <searchpanel class="account_root">-->
|
<searchpanel>
|
||||||
<!--<!– <field name="location_type" icon="fa-filter"/> –>-->
|
<field name="production_line_id" icon="fa-filter"/>
|
||||||
<!-- <field name="production_line_id" select="multi"/>-->
|
</searchpanel>
|
||||||
<!-- </searchpanel>-->
|
</xpath>
|
||||||
<!-- </xpath>-->
|
</field>
|
||||||
<!-- </field>-->
|
</record>
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> develop
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -425,16 +425,16 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[1]" position="before">
|
<xpath expr="//page[1]" position="before">
|
||||||
<page string="解除装夹" attrs='{"invisible": [("routing_type","!=","解除装夹")]}'>
|
<page string="解除装夹" attrs='{"invisible": [("routing_type","!=","解除装夹")]}'>
|
||||||
<field name="tray_id" readonly="1"/>
|
<!-- <field name="tray_id" readonly="1"/>-->
|
||||||
<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="unbindtray" string="解除装夹"
|
<!-- <button type="object" class="oe_highlight" name="unbindtray" string="解除装夹"-->
|
||||||
attrs='{"invisible": ["|","|",("tray_id","=",False),("state","!=","progress"),("user_permissions","=",False)]}'/>
|
<!-- attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<!-- <div class="col-12 col-lg-6 o_setting_box">-->
|
||||||
<button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"
|
<!-- <button type="action" class="oe_highlight" name="sf_manufacturing.label_sf_tray_code1"-->
|
||||||
string="打印标签"
|
<!-- string="打印标签"-->
|
||||||
attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>
|
<!-- attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<!--<?xml version="1.0" encoding="utf-8"?>-->
|
||||||
<odoo>
|
<!--<odoo>-->
|
||||||
<data>
|
<!-- <data>-->
|
||||||
<record id="sf_tray_form_inherit" model="ir.ui.view">
|
<!-- <record id="sf_tray_form_inherit" model="ir.ui.view">-->
|
||||||
<field name="name">托盘条形码生成</field>
|
<!-- <field name="name">托盘条形码生成</field>-->
|
||||||
<field name="model">sf.tray</field>
|
<!-- <field name="model">sf.tray</field>-->
|
||||||
<field name="inherit_id" ref="sf_base.sf_tray_form"/>
|
<!-- <field name="inherit_id" ref="sf_base.sf_tray_form"/>-->
|
||||||
<field name="arch" type="xml">
|
<!-- <field name="arch" type="xml">-->
|
||||||
<xpath expr="//group[@name='group1']" position="after">
|
<!-- <xpath expr="//group[@name='group1']" position="after">-->
|
||||||
<notebook>
|
<!-- <notebook>-->
|
||||||
<page string="生成条形码">
|
<!-- <page string="生成条形码">-->
|
||||||
<field name='qr_image' widget="image"/>
|
<!-- <field name='qr_image' widget="image"/>-->
|
||||||
<group>
|
<!-- <group>-->
|
||||||
<field name='production_id' readonly="1"
|
<!-- <field name='production_id' readonly="1"-->
|
||||||
attrs='{"invisible": [("production_id","=",False)]}'/>
|
<!-- attrs='{"invisible": [("production_id","=",False)]}'/>-->
|
||||||
<field name="workorder_id"/>
|
<!-- <field name="workorder_id"/>-->
|
||||||
</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="unclamp" string="解除装夹"
|
<!-- <button type="object" class="oe_highlight" name="unclamp" string="解除装夹"-->
|
||||||
attrs='{"invisible": [("state","=","空闲")]}'/>
|
<!-- attrs='{"invisible": [("state","=","空闲")]}'/>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</page>
|
<!-- </page>-->
|
||||||
|
|
||||||
</notebook>
|
<!-- </notebook>-->
|
||||||
</xpath>
|
<!-- </xpath>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
</data>
|
<!-- </data>-->
|
||||||
</odoo>
|
<!--</odoo>-->
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
'web.assets_qweb': [
|
'web.assets_qweb': [
|
||||||
],
|
],
|
||||||
'web.assets_backend': [
|
'web.assets_backend': [
|
||||||
|
'sf_plan/static/src/scss/gannt_change.scss'
|
||||||
],
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
3
sf_plan/static/src/scss/gannt_change.scss
Normal file
3
sf_plan/static/src/scss/gannt_change.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
//.o_gantt_view .o_gantt_row_nogroup .o_gantt_pill {
|
||||||
|
// background-color: #6ec89b !important;
|
||||||
|
//}
|
||||||
@@ -27,8 +27,14 @@
|
|||||||
<form string="坯料预制计划">
|
<form string="坯料预制计划">
|
||||||
<header>
|
<header>
|
||||||
<button string="执行排程" name="get_plan_end_time" type="object" class="oe_highlight"/>
|
<button string="执行排程" name="get_plan_end_time" type="object" class="oe_highlight"/>
|
||||||
|
<field name="state" widget="statusbar" statusbar_visible="draft,produce"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="pl_no" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group string="基本信息">
|
<group string="基本信息">
|
||||||
<field name="pl_no"/>
|
<field name="pl_no"/>
|
||||||
@@ -38,12 +44,25 @@
|
|||||||
<field name="plan_end_time"/>
|
<field name="plan_end_time"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="规格信息">
|
<group string="规格信息" col="1">
|
||||||
<field name="length"/>
|
<group col="3">
|
||||||
<field name="width"/>
|
<group>
|
||||||
<field name="thickness"/>
|
<field name="length"/>
|
||||||
<field name="diameter"/>
|
</group>
|
||||||
<field name="material"/>
|
<group>
|
||||||
|
<field name="width"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="thickness"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<!-- <field name="length"/> -->
|
||||||
|
<!-- <field name="width"/> -->
|
||||||
|
<!-- <field name="thickness"/> -->
|
||||||
|
<group>
|
||||||
|
<field name="diameter"/>
|
||||||
|
<field name="material"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="绑定订单">
|
<group string="绑定订单">
|
||||||
<field name="customer_name"/>
|
<field name="customer_name"/>
|
||||||
@@ -66,12 +85,13 @@
|
|||||||
<field name="name">sf.pl.plan.gantt</field>
|
<field name="name">sf.pl.plan.gantt</field>
|
||||||
<field name="model">sf.pl.plan</field>
|
<field name="model">sf.pl.plan</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<gantt class="o_mrp_workorder_gantt" date_stop="plan_end_time" date_start="plan_start_time" string="坯料预制计划" default_group_by="current_operation_name" create="0"
|
<gantt class="o_mrp_workorder_gantt" date_stop="plan_end_time" date_start="plan_start_time"
|
||||||
delete="0" sample="1"
|
string="坯料预制计划" default_group_by="current_operation_name" create="0"
|
||||||
display_unavailability="1"
|
delete="0" sample="1"
|
||||||
color="pl_name"
|
display_unavailability="1"
|
||||||
progress_bar="pl_name"
|
color="state"
|
||||||
form_view_id="sf_pl_plan_form">
|
progress_bar="pl_name"
|
||||||
|
form_view_id="sf_pl_plan_form">
|
||||||
|
|
||||||
<field name="pl_no"/>
|
<field name="pl_no"/>
|
||||||
<field name="pl_name"/>
|
<field name="pl_name"/>
|
||||||
@@ -80,21 +100,43 @@
|
|||||||
<field name="plan_end_time"/>
|
<field name="plan_end_time"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<templates>
|
<templates>
|
||||||
<div t-name="gantt-popover" class="container-fluid">
|
<div t-name="gantt-popover" class="container-fluid">
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<ul class="ps-1 mb-0 list-unstyled">
|
<ul class="ps-1 mb-0 list-unstyled">
|
||||||
<li><strong>开始时间: </strong> <t t-out="userTimezoneStartDate.format('L LTS')"/></li>
|
<li>
|
||||||
<li><strong>结束时间: </strong> <t t-out="userTimezoneStopDate.format('L LTS')"/></li>
|
<strong>开始时间:</strong>
|
||||||
<li><strong>坯料编号: </strong> <t t-out="pl_no"/></li>
|
<t t-out="userTimezoneStartDate.format('L LTS')"/>
|
||||||
<li><strong>坯料名称: </strong> <t t-out="pl_name"/></li>
|
</li>
|
||||||
<li><strong>数量: </strong> <t t-out="quantity"/></li>
|
<li>
|
||||||
<li><strong>材质: </strong> <t t-out="material"/></li>
|
<strong>结束时间:</strong>
|
||||||
</ul>
|
<t t-out="userTimezoneStopDate.format('L LTS')"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>坯料编号:</strong>
|
||||||
|
<t t-out="pl_no"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>坯料名称:</strong>
|
||||||
|
<t t-out="pl_name"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>数量:</strong>
|
||||||
|
<t t-out="quantity"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>材质:</strong>
|
||||||
|
<t t-out="material"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>状态:</strong>
|
||||||
|
<t t-out="state"/>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</templates>
|
||||||
</templates>
|
|
||||||
</gantt>
|
</gantt>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -113,6 +155,6 @@
|
|||||||
parent="mrp_workorder.mrp_workorder_menu_planning"
|
parent="mrp_workorder.mrp_workorder_menu_planning"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
action="sf_pl_plan_action"
|
action="sf_pl_plan_action"
|
||||||
/>
|
/>
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -52,17 +52,30 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
'sf_functional_cutting_tool_entity_id',
|
'sf_functional_cutting_tool_entity_id',
|
||||||
string='夹头型号', domain=
|
string='夹头型号', domain=
|
||||||
[('cutting_tool_type', '=', '夹头')])
|
[('cutting_tool_type', '=', '夹头')])
|
||||||
|
cutting_tool_material = fields.Selection([('0', '整体式刀具'), ('1', '组合式刀具')], string='刀具物料', default='0')
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material')
|
||||||
|
def _onchange_cutting_tool_material(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
if record.cutting_tool_material == '1':
|
||||||
|
record.mrs_cutting_tool_integral_model_ids = None
|
||||||
|
if record.cutting_tool_material == '0':
|
||||||
|
record.mrs_cutting_tool_blade_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)')
|
diameter = fields.Float('直径(mm)')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级')
|
string='刀具等级')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)')
|
machining_accuracy = fields.Float('加工精度(mm)')
|
||||||
tool_length = fields.Float('装刀长')
|
tool_length = fields.Float('装刀长(mm)')
|
||||||
blade_number = fields.Integer('刃数')
|
blade_number = fields.Integer('刃数')
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)')
|
integral_blade_length = fields.Float('整体刃长(mm)')
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)')
|
effective_blade_length = fields.Float('有效刃长(mm)')
|
||||||
max_life = fields.Float('最大寿命值')
|
max_life = fields.Float('最大寿命值')
|
||||||
is_standard = fields.Boolean('是否标准刀')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')], '是否标准刀')
|
||||||
applicable_range = fields.Char('适用范围')
|
applicable_range = fields.Char('适用范围')
|
||||||
image = fields.Binary('图片')
|
image = fields.Binary('图片')
|
||||||
|
|
||||||
@@ -113,17 +126,30 @@ class FunctionalCuttingToolEntityCache(models.Model):
|
|||||||
'sf_functional_cutting_tool_entity_cache_id',
|
'sf_functional_cutting_tool_entity_cache_id',
|
||||||
string='夹头型号', domain=
|
string='夹头型号', domain=
|
||||||
[('cutting_tool_type', '=', '夹头')])
|
[('cutting_tool_type', '=', '夹头')])
|
||||||
|
cutting_tool_material = fields.Selection([('0', '整体式刀具'), ('1', '组合式刀具')], string='刀具物料', default='0')
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material')
|
||||||
|
def _onchange_cutting_tool_material(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
if record.cutting_tool_material == '1':
|
||||||
|
record.mrs_cutting_tool_integral_model_ids = None
|
||||||
|
if record.cutting_tool_material == '0':
|
||||||
|
record.mrs_cutting_tool_blade_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)')
|
diameter = fields.Float('直径(mm)')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级')
|
string='刀具等级')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)')
|
machining_accuracy = fields.Float('加工精度(mm)')
|
||||||
tool_length = fields.Float('装刀长')
|
tool_length = fields.Float('装刀长(mm)')
|
||||||
blade_number = fields.Integer('刃数')
|
blade_number = fields.Integer('刃数')
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)')
|
integral_blade_length = fields.Float('整体刃长(mm)')
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)')
|
effective_blade_length = fields.Float('有效刃长(mm)')
|
||||||
max_life = fields.Float('最大寿命值')
|
max_life = fields.Float('最大寿命值')
|
||||||
is_standard = fields.Boolean('是否标准刀')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')], '是否标准刀')
|
||||||
applicable_range = fields.Char('适用范围')
|
applicable_range = fields.Char('适用范围')
|
||||||
image = fields.Binary('图片')
|
image = fields.Binary('图片')
|
||||||
|
|
||||||
@@ -177,20 +203,35 @@ class FunctionalToolWarning(models.Model):
|
|||||||
string='夹头型号', readonly=True,
|
string='夹头型号', readonly=True,
|
||||||
domain=[('cutting_tool_type', '=', '夹头')],
|
domain=[('cutting_tool_type', '=', '夹头')],
|
||||||
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
||||||
|
cutting_tool_material = fields.Selection([('0', '整体式刀具'), ('1', '组合式刀具')], string='刀具物料', default='0')
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material')
|
||||||
|
def _onchange_cutting_tool_material(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
if record.cutting_tool_material == '1':
|
||||||
|
record.mrs_cutting_tool_integral_model_ids = None
|
||||||
|
if record.cutting_tool_material == '0':
|
||||||
|
record.mrs_cutting_tool_blade_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
|
|
||||||
tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
|
|
||||||
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.integral_blade_length')
|
related='functional_cutting_tool_id.integral_blade_length')
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Boolean('是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
|
|
||||||
@@ -210,6 +251,7 @@ class FunctionalToolWarning(models.Model):
|
|||||||
machine_tool_code = fields.Char('机台号', readonly=True, related='functional_tool_assembly_id.machine_tool_code')
|
machine_tool_code = fields.Char('机台号', readonly=True, related='functional_tool_assembly_id.machine_tool_code')
|
||||||
cutting_tool_code = fields.Char('刀位号', readonly=True, related='functional_tool_assembly_id.cutter_spacing_code')
|
cutting_tool_code = fields.Char('刀位号', readonly=True, related='functional_tool_assembly_id.cutter_spacing_code')
|
||||||
idle_time = fields.Char('闲置时长', readonly=False)
|
idle_time = fields.Char('闲置时长', readonly=False)
|
||||||
|
idle_time = fields.Char('闲置时长(h)', readonly=False)
|
||||||
alarm_value = fields.Char('报警值', readonly=False)
|
alarm_value = fields.Char('报警值', readonly=False)
|
||||||
used_value = fields.Char('已使用值', readonly=False)
|
used_value = fields.Char('已使用值', readonly=False)
|
||||||
alarm_type = fields.Char('报警类型', readonly=False)
|
alarm_type = fields.Char('报警类型', readonly=False)
|
||||||
@@ -287,20 +329,32 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
string='夹头型号', readonly=True,
|
string='夹头型号', readonly=True,
|
||||||
domain=[('cutting_tool_type', '=', '夹头')],
|
domain=[('cutting_tool_type', '=', '夹头')],
|
||||||
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
||||||
|
cutting_tool_material = fields.Selection([('0', '整体式刀具'), ('1', '组合式刀具')], string='刀具物料', default='0')
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material')
|
||||||
|
def _onchange_cutting_tool_material(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
if record.cutting_tool_material == '1':
|
||||||
|
record.mrs_cutting_tool_integral_model_ids = None
|
||||||
|
if record.cutting_tool_material == '0':
|
||||||
|
record.mrs_cutting_tool_blade_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.integral_blade_length')
|
related='functional_cutting_tool_id.integral_blade_length')
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Boolean('是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
|
|
||||||
@@ -396,20 +450,32 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
|||||||
string='夹头型号', readonly=True,
|
string='夹头型号', readonly=True,
|
||||||
domain=[('cutting_tool_type', '=', '夹头')],
|
domain=[('cutting_tool_type', '=', '夹头')],
|
||||||
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
related='functional_cutting_tool_id.mrs_cutting_tool_cutterhead_model_ids')
|
||||||
|
cutting_tool_material = fields.Selection([('0', '整体式刀具'), ('1', '组合式刀具')], string='刀具物料', default='0')
|
||||||
|
|
||||||
|
@api.onchange('cutting_tool_material')
|
||||||
|
def _onchange_cutting_tool_material(self):
|
||||||
|
for record in self:
|
||||||
|
if record:
|
||||||
|
if record.cutting_tool_material == '1':
|
||||||
|
record.mrs_cutting_tool_integral_model_ids = None
|
||||||
|
if record.cutting_tool_material == '0':
|
||||||
|
record.mrs_cutting_tool_blade_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterbar_model_ids = None
|
||||||
|
record.mrs_cutting_tool_cutterpad_model_ids = None
|
||||||
|
|
||||||
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
diameter = fields.Float('直径(mm)', readonly=True, related='functional_cutting_tool_id.diameter')
|
||||||
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
tool_grade = fields.Selection([('1', 'P1'), ('2', 'P2'), ('3', 'P3'), ('4', 'P4'), ('5', 'P5'), ('6', 'P6')],
|
||||||
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
string='刀具等级', readonly=True, related='functional_cutting_tool_id.tool_grade')
|
||||||
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
machining_accuracy = fields.Float('加工精度(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.machining_accuracy')
|
related='functional_cutting_tool_id.machining_accuracy')
|
||||||
tool_length = fields.Float('装刀长', readonly=True, related='functional_cutting_tool_id.tool_length')
|
tool_length = fields.Float('装刀长(mm)', readonly=True, related='functional_cutting_tool_id.tool_length')
|
||||||
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
blade_number = fields.Integer('刃数', readonly=True, related='functional_cutting_tool_id.blade_number')
|
||||||
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
integral_blade_length = fields.Float('整体刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.integral_blade_length')
|
related='functional_cutting_tool_id.integral_blade_length')
|
||||||
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
effective_blade_length = fields.Float('有效刃长(mm)', readonly=True,
|
||||||
related='functional_cutting_tool_id.effective_blade_length')
|
related='functional_cutting_tool_id.effective_blade_length')
|
||||||
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
max_life = fields.Float('最大寿命值', readonly=True, related='functional_cutting_tool_id.max_life')
|
||||||
is_standard = fields.Boolean('是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
is_standard = fields.Selection([('1', '是'), ('0', '否')],'是否标准刀', readonly=True, related='functional_cutting_tool_id.is_standard')
|
||||||
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
applicable_range = fields.Char('适用范围', readonly=True, related='functional_cutting_tool_id.applicable_range')
|
||||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||||
|
|
||||||
@@ -462,7 +528,8 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
# string='换刀需求信息',
|
# string='换刀需求信息',
|
||||||
# attrs="{'invisible': 1}")
|
# attrs="{'invisible': 1}")
|
||||||
|
|
||||||
name = fields.Many2one('maintenance.equipment', string='CNC机床', readonly=False, tracking=True,
|
|
||||||
|
name = fields.Many2one('maintenance.equipment', string='CNC机床',required=True, readonly=False, tracking=True,
|
||||||
group_expand='_read_group_names')
|
group_expand='_read_group_names')
|
||||||
machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True,
|
machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True,
|
||||||
compute='_compute_name')
|
compute='_compute_name')
|
||||||
@@ -472,7 +539,8 @@ class MachineTableToolChangingApply(models.Model):
|
|||||||
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=False)
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True,
|
||||||
compute='_compute_functional_tool_name_id')
|
compute='_compute_functional_tool_name_id')
|
||||||
diameter = fields.Char(string='直径', readonly=False)
|
|
||||||
|
diameter = fields.Char(string='直径(mm)', readonly=False)
|
||||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False)
|
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False)
|
||||||
hilt_name = fields.Char(string='刀柄名称', readonly=False)
|
hilt_name = fields.Char(string='刀柄名称', readonly=False)
|
||||||
hilt_code = fields.Char(string='刀柄编号', readonly=False)
|
hilt_code = fields.Char(string='刀柄编号', readonly=False)
|
||||||
@@ -633,9 +701,9 @@ class CAMWorkOrderProgramKnifePlan(models.Model):
|
|||||||
return categories.browse(machine_table_name_ids)
|
return categories.browse(machine_table_name_ids)
|
||||||
|
|
||||||
machine_tool_cutter_spacing_code = fields.Char(string='机床刀位号', readonly=False)
|
machine_tool_cutter_spacing_code = fields.Char(string='机床刀位号', readonly=False)
|
||||||
diameter = fields.Char(string='直径(程式)', readonly=False)
|
diameter = fields.Char(string='直径(程式)(mm)', readonly=False)
|
||||||
tool_loading_length = fields.Char(string='装刀长', readonly=False)
|
tool_loading_length = fields.Char(string='装刀长(mm)', readonly=False)
|
||||||
clearance_length = fields.Char(string='避空长', readonly=False)
|
clearance_length = fields.Char(string='避空长(mm)', readonly=False)
|
||||||
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=False)
|
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=False)
|
||||||
L_D = fields.Char(string='L/D', readonly=False)
|
L_D = fields.Char(string='L/D', readonly=False)
|
||||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False,
|
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False,
|
||||||
@@ -726,8 +794,8 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
functional_tool_type_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
functional_tool_type_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||||
return categories.browse(functional_tool_type_ids)
|
return categories.browse(functional_tool_type_ids)
|
||||||
|
|
||||||
functional_tool_diameter = fields.Char(string='功能刀具直径', readonly=True)
|
functional_tool_diameter = fields.Char(string='功能刀具直径(mm)', readonly=True)
|
||||||
functional_tool_length = fields.Char(string='功能刀具伸出长', readonly=True)
|
functional_tool_length = fields.Char(string='功能刀具伸出长(mm)', readonly=True)
|
||||||
functional_tool_cutting_type = fields.Char(string='功能刀具切削类型', readonly=False)
|
functional_tool_cutting_type = fields.Char(string='功能刀具切削类型', readonly=False)
|
||||||
|
|
||||||
# 整体式刀具型号
|
# 整体式刀具型号
|
||||||
@@ -776,11 +844,11 @@ class FunctionalToolAssembly(models.Model):
|
|||||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
||||||
|
|
||||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=True)
|
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=True)
|
||||||
tool_loading_length = fields.Char(string='装刀长', readonly=True)
|
tool_loading_length = fields.Char(string='装刀长(mm)', readonly=True)
|
||||||
new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=True)
|
new_former = fields.Selection([('0', '新'), ('1', '旧')], string='新/旧', readonly=True)
|
||||||
reference_length = fields.Char(string='参考伸出长', readonly=True)
|
reference_length = fields.Char(string='参考伸出长(mm)', readonly=True)
|
||||||
cut_time = fields.Char(string='已切削时间', readonly=True)
|
cut_time = fields.Char(string='已切削时间', readonly=True)
|
||||||
cut_length = fields.Char(string='已切削长度', readonly=True)
|
cut_length = fields.Char(string='已切削长度(mm)', readonly=True)
|
||||||
cut_number = fields.Char(string='已切削次数', readonly=True)
|
cut_number = fields.Char(string='已切削次数', readonly=True)
|
||||||
|
|
||||||
loading_task_source = fields.Selection([('0', 'CAM装刀'), ('1', '机台换刀')], string='装刀任务来源', readonly=True)
|
loading_task_source = fields.Selection([('0', 'CAM装刀'), ('1', '机台换刀')], string='装刀任务来源', readonly=True)
|
||||||
|
|||||||
@@ -27,48 +27,69 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基本信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="code" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="code"/>
|
<field name="name" invisible="True"/>
|
||||||
<field name="name"/>
|
<!-- <field name="functional_cutting_tool_id"/>-->
|
||||||
<field name="mrs_cutting_tool_type_id" options="{'no_create': True, 'no_quick_create': True}"/>
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
|
<field name="cutting_tool_material" required="1" widget="radio"
|
||||||
|
options="{'horizontal': true}"/>
|
||||||
|
<field name="mrs_cutting_tool_integral_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '0')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_blade_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterbar_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterpad_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterpad_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterbar_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhandle_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhead_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
<field name="image" nolabel="1" widget="image"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<notebook>
|
||||||
<group>
|
<page string='参数'>
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<group>
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<group>
|
||||||
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<field name="diameter"/>
|
||||||
</group>
|
<field name="tool_grade"/>
|
||||||
<group>
|
<field name="machining_accuracy"/>
|
||||||
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<field name="tool_length"/>
|
||||||
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
<field name="blade_number"/>
|
||||||
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
</group>
|
||||||
</group>
|
<group>
|
||||||
</group>
|
<field name="integral_blade_length"/>
|
||||||
<group string="参数信息">
|
<field name="effective_blade_length"/>
|
||||||
<group>
|
<field name="max_life"/>
|
||||||
<field name="diameter"/>
|
<field name="is_standard"/>
|
||||||
<field name="tool_grade"/>
|
<field name="applicable_range"/>
|
||||||
<field name="machining_accuracy"/>
|
</group>
|
||||||
<field name="tool_length"/>
|
</group>
|
||||||
<field name="blade_number"/>
|
</page>
|
||||||
</group>
|
</notebook>
|
||||||
<group>
|
|
||||||
<field name="integral_blade_length"/>
|
|
||||||
<field name="effective_blade_length"/>
|
|
||||||
<field name="max_life"/>
|
|
||||||
<field name="is_standard"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group string="其他信息">
|
|
||||||
<group>
|
|
||||||
<field name="applicable_range"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -137,29 +158,49 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="功能刀具预警">
|
<form string="功能刀具预警">
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基本信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="code" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" invisible="True"/>
|
<field name="name" invisible="True"/>
|
||||||
<field name="functional_cutting_tool_id"/>
|
<!-- <field name="functional_cutting_tool_id"/>-->
|
||||||
<field name="code"/>
|
|
||||||
<field name="mrs_cutting_tool_type_id"/>
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
|
<field name="cutting_tool_material" required="1" widget="radio"
|
||||||
|
options="{'horizontal': true}"/>
|
||||||
|
<field name="mrs_cutting_tool_integral_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '0')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_blade_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterbar_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterpad_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterpad_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterbar_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhandle_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhead_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
<field name="image" nolabel="1" widget="image"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="预警信息">
|
<page string="预警信息">
|
||||||
<group>
|
<group>
|
||||||
@@ -286,29 +327,49 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基本信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="code" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" invisible="True"/>
|
<field name="name" invisible="True"/>
|
||||||
<field name="functional_cutting_tool_id"/>
|
<field name="functional_cutting_tool_id"/>
|
||||||
<field name="code"/>
|
|
||||||
<field name="mrs_cutting_tool_type_id"/>
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
|
<field name="cutting_tool_material" required="1" widget="radio"
|
||||||
|
options="{'horizontal': true}"/>
|
||||||
|
<field name="mrs_cutting_tool_integral_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '0')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_blade_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterbar_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterpad_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterpad_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterbar_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhandle_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhead_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
<field name="image" nolabel="1" widget="image"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="实时分布信息">
|
<page string="实时分布信息">
|
||||||
<group>
|
<group>
|
||||||
@@ -423,29 +484,49 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="功能刀具出入库记录">
|
<form string="功能刀具出入库记录">
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基本信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="code" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" invisible="True"/>
|
<field name="name" invisible="True"/>
|
||||||
<field name="functional_cutting_tool_id"/>
|
<field name="functional_cutting_tool_id"/>
|
||||||
<field name="code"/>
|
|
||||||
<field name="mrs_cutting_tool_type_id"/>
|
<field name="mrs_cutting_tool_type_id"/>
|
||||||
|
<field name="cutting_tool_material" required="1" widget="radio"
|
||||||
|
options="{'horizontal': true}"/>
|
||||||
|
<field name="mrs_cutting_tool_integral_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '0')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_blade_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': [('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterbar_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterpad_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterpad_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"
|
||||||
|
attrs="{'invisible': ['|',('mrs_cutting_tool_cutterbar_model_ids','!=',[]),('cutting_tool_material', '!=', '1')]}"
|
||||||
|
/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhandle_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
|
<field name="mrs_cutting_tool_cutterhead_model_ids"
|
||||||
|
options="{'no_create': True, 'no_quick_create': True}"
|
||||||
|
widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="image" nolabel="1" widget="image"/>
|
<field name="image" nolabel="1" widget="image"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="出入库信息">
|
<page string="出入库信息">
|
||||||
<field name="inbound_and_outbound_records_ids"/>
|
<field name="inbound_and_outbound_records_ids"/>
|
||||||
@@ -675,53 +756,63 @@
|
|||||||
<button string="撤回转移" name="revocation_2" type="object" class="btn-primary" attrs="{'invisible': [('status', '!=', '2')]}" confirm="是否确认撤回转移"/>
|
<button string="撤回转移" name="revocation_2" type="object" class="btn-primary" attrs="{'invisible': [('status', '!=', '2')]}" confirm="是否确认撤回转移"/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基础信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
|
||||||
<field name="machine_table_type_id"/>
|
<field name="machine_table_type_id"/>
|
||||||
<field name="machine_tool_code" invisible="True"/>
|
<field name="machine_tool_code" invisible="True"/>
|
||||||
<field name="cutter_spacing_code"/>
|
<field name="cutter_spacing_code"/>
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="functional_tool_code"/>
|
<field name="functional_tool_code"/>
|
||||||
<field name="functional_tool_name_id"/>
|
<field name="functional_tool_name_id"/>
|
||||||
<field name="functional_tool_type_id"/>
|
<field name="functional_tool_type_id"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="数据信息">
|
<notebook>
|
||||||
<group>
|
<page string="待换功能刀具信息">
|
||||||
<field name="hilt_name"/>
|
<group>
|
||||||
<field name="diameter"/>
|
<group>
|
||||||
<field name="coarse_middle_thin"/>
|
<field name="replacement_tool_name_id"/>
|
||||||
<field name="functional_tool_status"/>
|
<field name="replacement_tool_type_id"/>
|
||||||
</group>
|
<field name="replacement_tool_coarse_middle_thin"/>
|
||||||
<group>
|
<field name="applicant"/>
|
||||||
<field name="hilt_code"/>
|
<field name="status" invisible="True"/>
|
||||||
<field name="max_lifetime_value"/>
|
</group>
|
||||||
<field name="alarm_value"/>
|
<group>
|
||||||
<field name="used_value"/>
|
<field name="replacement_tool_code"/>
|
||||||
</group>
|
<field name="used_tool_time"/>
|
||||||
</group>
|
<field name="new_former"/>
|
||||||
<group string="待换功能刀具信息">
|
<field name="reason_for_applying" />
|
||||||
<group>
|
</group>
|
||||||
<field name="replacement_tool_name_id"/>
|
</group>
|
||||||
<field name="replacement_tool_type_id"/>
|
</page>
|
||||||
<field name="replacement_tool_coarse_middle_thin"/>
|
<page string="数据信息">
|
||||||
<field name="applicant"/>
|
<group>
|
||||||
<field name="status" invisible="True"/>
|
<group>
|
||||||
</group>
|
<field name="hilt_name"/>
|
||||||
<group>
|
<field name="diameter"/>
|
||||||
<field name="replacement_tool_code"/>
|
<field name="coarse_middle_thin"/>
|
||||||
<field name="used_tool_time"/>
|
<field name="functional_tool_status"/>
|
||||||
<field name="new_former"/>
|
</group>
|
||||||
<field name="reason_for_applying" />
|
<group>
|
||||||
</group>
|
<field name="hilt_code"/>
|
||||||
</group>
|
<field name="max_lifetime_value"/>
|
||||||
<group string="其他">
|
<field name="alarm_value"/>
|
||||||
<group>
|
<field name="used_value"/>
|
||||||
<field name="remark"/>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</page>
|
||||||
|
<page string="其他">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="remark"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -790,12 +881,17 @@
|
|||||||
<button string="查看组装单" type="object" name="open_sf_functional_tool_assembly"
|
<button string="查看组装单" type="object" name="open_sf_functional_tool_assembly"
|
||||||
class="oe_highlight" attrs="{'invisible': [('plan_execute_status', '!=', '1')]}"/>
|
class="oe_highlight" attrs="{'invisible': [('plan_execute_status', '!=', '1')]}"/>
|
||||||
<button string="撤回" name="revocation" type="object" class="btn-primary" attrs="{'invisible': [('plan_execute_status', '!=', '1')]}" confirm="是否确认撤回装刀"/>
|
<button string="撤回" name="revocation" type="object" class="btn-primary" attrs="{'invisible': [('plan_execute_status', '!=', '1')]}" confirm="是否确认撤回装刀"/>
|
||||||
|
<field name="plan_execute_status" widget="statusbar" statusbar_visible="0,1,2"/>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="基础信息">
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="name"/>
|
|
||||||
<field name="cam_procedure_code"/>
|
<field name="cam_procedure_code"/>
|
||||||
<field name="cam_cutter_spacing_code"/>
|
<field name="cam_cutter_spacing_code"/>
|
||||||
<field name="machine_table_name_id"/>
|
<field name="machine_table_name_id"/>
|
||||||
@@ -807,29 +903,34 @@
|
|||||||
<field name="machine_tool_cutter_spacing_code"/>
|
<field name="machine_tool_cutter_spacing_code"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="数据信息">
|
<notebook>
|
||||||
<group>
|
<page string="数据信息">
|
||||||
<field name="diameter"/>
|
<group>
|
||||||
<field name="tool_loading_length"/>
|
<group>
|
||||||
<field name="clearance_length"/>
|
<field name="diameter"/>
|
||||||
<field name="tool_included_angle"/>
|
<field name="tool_loading_length"/>
|
||||||
<field name="L_D"/>
|
<field name="clearance_length"/>
|
||||||
<field name="coarse_middle_thin"/>
|
<field name="tool_included_angle"/>
|
||||||
</group>
|
<field name="L_D"/>
|
||||||
<group>
|
<field name="coarse_middle_thin"/>
|
||||||
<field name="need_knife_time"/>
|
</group>
|
||||||
<field name="required_cutting_time"/>
|
<group>
|
||||||
<field name="plan_execute_status"/>
|
<field name="need_knife_time"/>
|
||||||
<field name="whether_standard_tool"/>
|
<field name="required_cutting_time"/>
|
||||||
<field name="applicant"/>
|
<field name="whether_standard_tool"/>
|
||||||
<field name="reason_for_applying"/>
|
<field name="applicant"/>
|
||||||
</group>
|
<field name="reason_for_applying"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="其他">
|
</group>
|
||||||
<group>
|
</page>
|
||||||
<field name="remark"/>
|
<page string="其他">
|
||||||
</group>
|
<group>
|
||||||
</group>
|
<group>
|
||||||
|
<field name="remark"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -953,95 +1054,108 @@
|
|||||||
class="oe_highlight" attrs="{'invisible': [('loading_task_source', '!=', '0')]}" />
|
class="oe_highlight" attrs="{'invisible': [('loading_task_source', '!=', '0')]}" />
|
||||||
<button string="查看机床换刀申请" type="object" name="open_sf_machine_table_tool_changing_apply"
|
<button string="查看机床换刀申请" type="object" name="open_sf_machine_table_tool_changing_apply"
|
||||||
class="oe_highlight" attrs="{'invisible': [('loading_task_source', '!=', '1')]}" />
|
class="oe_highlight" attrs="{'invisible': [('loading_task_source', '!=', '1')]}" />
|
||||||
|
<field name="assemble_status" widget="statusbar" statusbar_visible="0,1,2"/>
|
||||||
</header>
|
</header>
|
||||||
|
<div class="oe_title">
|
||||||
|
<h1>
|
||||||
|
<field name="functional_tool_code" readonly="1"/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<sheet>
|
<sheet>
|
||||||
<group string="功能刀具信息">
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="functional_tool_code"/>
|
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="functional_tool_type_id"/>
|
<field name="functional_tool_type_id"/>
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="functional_tool_diameter"/>
|
<field name="functional_tool_diameter"/>
|
||||||
<field name="functional_tool_length"/>
|
<field name="functional_tool_length"/>
|
||||||
<field name="functional_tool_cutting_type"/>
|
<field name="functional_tool_cutting_type"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="组装物料信息">
|
|
||||||
<group>
|
<notebook>
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
<page string="组装信息">
|
||||||
<field name="integral_code" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
<group>
|
||||||
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
<group>
|
||||||
<field name="blade_code" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
<field name="coarse_middle_thin"/>
|
||||||
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
<field name="new_former"/>
|
||||||
<field name="bar_code" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
<field name="tool_loading_length"/>
|
||||||
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
<field name="reference_length"/>
|
||||||
<field name="pad_code" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
</group>
|
||||||
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
<group>
|
||||||
<field name="handle_code" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
<field name="cut_time"/>
|
||||||
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
<field name="cut_length"/>
|
||||||
<field name="chuck_code" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
<field name="cut_number"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
</group>
|
||||||
<field name="integral_name" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
<group>
|
||||||
<field name="sf_tool_brand_id_1" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
<group>
|
||||||
<field name="blade_name" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
<field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
||||||
<field name="sf_tool_brand_id_2" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
<field name="integral_code" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
||||||
<field name="bar_name" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
<field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
||||||
<field name="sf_tool_brand_id_3" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
<field name="blade_code" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
||||||
<field name="pad_name" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
<field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
||||||
<field name="sf_tool_brand_id_4" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
<field name="bar_code" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
||||||
<field name="handle_name" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
<field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
||||||
<field name="sf_tool_brand_id_5" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
<field name="pad_code" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
||||||
<field name="chuck_name" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
<field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
||||||
<field name="sf_tool_brand_id_6" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
<field name="handle_code" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
||||||
</group>
|
<field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
||||||
</group>
|
<field name="chuck_code" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
||||||
<group string="组装参数信息">
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="coarse_middle_thin"/>
|
<field name="integral_name" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
||||||
<field name="new_former"/>
|
<field name="sf_tool_brand_id_1" attrs="{'invisible':[('mrs_cutting_tool_integral_model_ids', '=', [])]}"/>
|
||||||
<field name="tool_loading_length"/>
|
<field name="blade_name" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
||||||
<field name="reference_length"/>
|
<field name="sf_tool_brand_id_2" attrs="{'invisible':[('mrs_cutting_tool_blade_model_ids', '=', [])]}"/>
|
||||||
</group>
|
<field name="bar_name" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
||||||
<group>
|
<field name="sf_tool_brand_id_3" attrs="{'invisible':[('mrs_cutting_tool_cutterbar_model_ids', '=', [])]}"/>
|
||||||
<field name="cut_time"/>
|
<field name="pad_name" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
||||||
<field name="cut_length"/>
|
<field name="sf_tool_brand_id_4" attrs="{'invisible':[('mrs_cutting_tool_cutterpad_model_ids', '=', [])]}"/>
|
||||||
<field name="cut_number"/>
|
<field name="handle_name" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
||||||
</group>
|
<field name="sf_tool_brand_id_5" attrs="{'invisible':[('mrs_cutting_tool_cutterhandle_model_ids', '=', [])]}"/>
|
||||||
</group>
|
<field name="chuck_name" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
||||||
<group string="申请信息">
|
<field name="sf_tool_brand_id_6" attrs="{'invisible':[('mrs_cutting_tool_cutterhead_model_ids', '=', [])]}"/>
|
||||||
<group>
|
</group>
|
||||||
<field name="production_line_name_id"/>
|
</group>
|
||||||
<field name="machine_tool_name_id"/>
|
</page>
|
||||||
<field name="machine_tool_code"/>
|
<page string="申请信息">
|
||||||
<field name="cutter_spacing_code"/>
|
<group>
|
||||||
<field name="applicant"/>
|
<group>
|
||||||
</group>
|
<field name="production_line_name_id"/>
|
||||||
<group>
|
<field name="machine_tool_name_id"/>
|
||||||
<field name="loading_task_source"/>
|
<field name="machine_tool_code"/>
|
||||||
<field name="assemble_status"/>
|
<field name="cutter_spacing_code"/>
|
||||||
<field name="use_tool_time"/>
|
<field name="applicant"/>
|
||||||
<field name="apply_time"/>
|
</group>
|
||||||
<field name="reason_for_applying"/>
|
<group>
|
||||||
</group>
|
<field name="loading_task_source"/>
|
||||||
</group>
|
<field name="use_tool_time"/>
|
||||||
<group string="装刀信息">
|
<field name="apply_time"/>
|
||||||
<group>
|
<field name="reason_for_applying"/>
|
||||||
<field name="tool_loading_person"/>
|
</group>
|
||||||
<field name="receive_person"/>
|
</group>
|
||||||
</group>
|
</page>
|
||||||
<group>
|
<page string="装刀信息">
|
||||||
<field name="tool_loading_time"/>
|
<group>
|
||||||
<field name="receive_time"/>
|
<group>
|
||||||
</group>
|
<field name="tool_loading_person"/>
|
||||||
</group>
|
<field name="receive_person"/>
|
||||||
<group string="其他">
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="check_box_1"/>
|
<field name="tool_loading_time"/>
|
||||||
<field name="remark"/>
|
<field name="receive_time"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
</page>
|
||||||
|
<page string="其他">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="check_box_1" invisible="True"/>
|
||||||
|
<field name="remark"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
code = fields.Char(string='功能刀具编码', readonly=True)
|
code = fields.Char(string='功能刀具编码', readonly=True)
|
||||||
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
functional_tool_name_id = fields.Many2one('sf.functional.cutting.tool', string='功能刀具名称', readonly=True)
|
||||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True)
|
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', readonly=True)
|
||||||
functional_tool_length = fields.Char(string='功能刀具伸出长', readonly=True)
|
functional_tool_length = fields.Char(string='功能刀具伸出长(mm)', readonly=True)
|
||||||
effective_length = fields.Char(string='有效长', readonly=True)
|
effective_length = fields.Char(string='有效长(mm)', readonly=True)
|
||||||
functional_tool_diameter = fields.Char(string='功能刀具直径', readonly=True)
|
functional_tool_diameter = fields.Char(string='功能刀具直径(mm)', readonly=True)
|
||||||
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=True)
|
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=True)
|
||||||
functional_tool_cutting_type = fields.Char(string='功能刀具切削类型', readonly=True)
|
functional_tool_cutting_type = fields.Char(string='功能刀具切削类型', readonly=True)
|
||||||
required_cutting_time = fields.Char(string='需切削时长', readonly=True)
|
required_cutting_time = fields.Char(string='需切削时长', readonly=True)
|
||||||
|
|||||||
@@ -140,55 +140,6 @@
|
|||||||
<field name="required_cutting_time"/>
|
<field name="required_cutting_time"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<!-- <group string="功能刀具组装信息">-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_integral_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_blade_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterbar_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterpad_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhandle_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="mrs_cutting_tool_cutterhead_model_ids" options="{'no_create': True, 'no_quick_create': True}" widget="many2many_tags"/>-->
|
|
||||||
<!-- <field name="tool_loading_length"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="integral_code"/>-->
|
|
||||||
<!-- <field name="blade_code"/>-->
|
|
||||||
<!-- <field name="bar_code"/>-->
|
|
||||||
<!-- <field name="pad_code"/>-->
|
|
||||||
<!-- <field name="handle_code"/>-->
|
|
||||||
<!-- <field name="chuck_code"/>-->
|
|
||||||
<!-- <field name="coarse_middle_thin"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="integral_name"/>-->
|
|
||||||
<!-- <field name="blade_name"/>-->
|
|
||||||
<!-- <field name="bar_name"/>-->
|
|
||||||
<!-- <field name="pad_name"/>-->
|
|
||||||
<!-- <field name="handle_name"/>-->
|
|
||||||
<!-- <field name="chuck_name"/>-->
|
|
||||||
<!-- <field name="new_former"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_1"/>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_2"/>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_3"/>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_4"/>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_5"/>-->
|
|
||||||
<!-- <field name="sf_tool_brand_id_6"/>-->
|
|
||||||
<!-- <field name="reference_length"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="cut_time"/>-->
|
|
||||||
<!-- <field name="cut_length"/>-->
|
|
||||||
<!-- <field name="cut_number"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<group string="组装物料信息">
|
<group string="组装物料信息">
|
||||||
<group>
|
<group>
|
||||||
<field name="mrs_cutting_tool_integral_model_ids" string="整体式刀具型号"
|
<field name="mrs_cutting_tool_integral_model_ids" string="整体式刀具型号"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { Component, onWillUpdateProps, useState, useRef, useEffect } from "@odoo
|
|||||||
|
|
||||||
export class StepViewer extends Component {
|
export class StepViewer extends Component {
|
||||||
setup() {
|
setup() {
|
||||||
|
console.log('setup')
|
||||||
this.props.url = this.formatUrl();
|
this.props.url = this.formatUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,9 +34,11 @@ export class StepViewer extends Component {
|
|||||||
id: JSON.stringify(this.props.record.data['id']),
|
id: JSON.stringify(this.props.record.data['id']),
|
||||||
field: this.props.name}
|
field: this.props.name}
|
||||||
url = url_props['base_url']+'/web/content/'+url_props['model']+'/'+url_props['id']+'/'+url_props['field']+'?download=true'
|
url = url_props['base_url']+'/web/content/'+url_props['model']+'/'+url_props['id']+'/'+url_props['field']+'?download=true'
|
||||||
|
console.log('url', url)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
url = "data:model/gltf-binary;base64," + this.props.value;
|
url = "data:model/gltf-binary;base64," + this.props.value;
|
||||||
|
console.log('url222', url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return url
|
return url
|
||||||
|
|||||||
Reference in New Issue
Block a user