还原代码
This commit is contained in:
@@ -1075,6 +1075,13 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
if workorder.state != 'pending':
|
if workorder.state != 'pending':
|
||||||
workorder.state = 'pending'
|
workorder.state = 'pending'
|
||||||
continue
|
continue
|
||||||
|
# ================= 如果制造订单制造类型为【人工线下加工】==========================
|
||||||
|
if (workorder.production_id.production_type == '人工线下加工'
|
||||||
|
and workorder.production_id.schedule_state == '已排'
|
||||||
|
and len(workorder.production_id.picking_ids.filtered(
|
||||||
|
lambda w: w.state not in ['done', 'cancel'])) == 0):
|
||||||
|
workorder.state = 'ready'
|
||||||
|
continue
|
||||||
# ================= 如果制造订单刀具状态为[无效刀、缺刀] 或者 制造订单状态为[返工]==========================
|
# ================= 如果制造订单刀具状态为[无效刀、缺刀] 或者 制造订单状态为[返工]==========================
|
||||||
if (workorder.production_id.tool_state in ['1', '2'] or workorder.production_id.state == 'rework'
|
if (workorder.production_id.tool_state in ['1', '2'] or workorder.production_id.state == 'rework'
|
||||||
or workorder.production_id.schedule_state != '已排'
|
or workorder.production_id.schedule_state != '已排'
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ from odoo.exceptions import ValidationError, UserError
|
|||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
|
|
||||||
|
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
|
|||||||
@@ -120,7 +120,8 @@
|
|||||||
<!-- <field name="production_line_state" readonly="1"/>-->
|
<!-- <field name="production_line_state" readonly="1"/>-->
|
||||||
<field name="part_name"/>
|
<field name="part_name"/>
|
||||||
<field name="part_number" string="零件图号"/>
|
<field name="part_number" string="零件图号"/>
|
||||||
<field name="tool_state" attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工'])]}"/>
|
<field name="tool_state"
|
||||||
|
attrs="{'invisible': [('production_type', 'not in', ['自动化产线加工'])]}"/>
|
||||||
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
<field name="tool_state_remark" string="备注" attrs="{'invisible': [('tool_state', '!=', '1')]}"/>
|
||||||
<field name="deadline_of_delivery" readonly="1"/>
|
<field name="deadline_of_delivery" readonly="1"/>
|
||||||
<field name="tool_state_remark2" invisible="1"/>
|
<field name="tool_state_remark2" invisible="1"/>
|
||||||
@@ -365,7 +366,8 @@
|
|||||||
<field name="sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="route_id" context="{'production_id': production_id}"
|
<field name="route_id" context="{'production_id': production_id}"
|
||||||
attrs="{'readonly': [('id', '!=', False)]}" options="{'no_create': True}"/>
|
attrs="{'readonly': [('id', '!=', False)]}" options="{'no_create': True}"/>
|
||||||
<field name="process_parameters_id" attrs="{'readonly': [('id', '!=', False)]}"
|
<field name="process_parameters_id"
|
||||||
|
attrs="{'readonly': [('id', '!=', False),('routing_tag', '=', 'standard')]}"
|
||||||
string="参数" context="{'route_id':route_id}" options="{'no_create': True}"/>
|
string="参数" context="{'route_id':route_id}" options="{'no_create': True}"/>
|
||||||
<field name="panel" readonly="1"/>
|
<field name="panel" readonly="1"/>
|
||||||
<field name="routing_tag" readonly="1" widget="badge"
|
<field name="routing_tag" readonly="1" widget="badge"
|
||||||
@@ -387,13 +389,16 @@
|
|||||||
</page>
|
</page>
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet/group/group/div[@class='d-flex flex-row align-items-start']/span[last()]" position="attributes">
|
<xpath expr="//sheet/group/group/div[@class='d-flex flex-row align-items-start']/span[last()]"
|
||||||
|
position="attributes">
|
||||||
<attribute name="invisible">True</attribute>
|
<attribute name="invisible">True</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet/group/group/div[@class='d-flex flex-row align-items-start']/button[@name='action_product_forecast_report']" position="attributes">
|
<xpath expr="//sheet/group/group/div[@class='d-flex flex-row align-items-start']/button[@name='action_product_forecast_report']"
|
||||||
|
position="attributes">
|
||||||
<attribute name="invisible">True</attribute>
|
<attribute name="invisible">True</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet/div[@class='oe_button_box']/button[@name='action_view_mrp_production_childs']/div/span[last()]" position="replace">
|
<xpath expr="//sheet/div[@class='oe_button_box']/button[@name='action_view_mrp_production_childs']/div/span[last()]"
|
||||||
|
position="replace">
|
||||||
<span class="o_stat_text">子MO</span>
|
<span class="o_stat_text">子MO</span>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ from datetime import datetime
|
|||||||
import requests
|
import requests
|
||||||
from odoo import http
|
from odoo import http
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import requests
|
|||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
# from OCC.Core.GProp import GProp_GProps
|
# from OCC.Core.GProp import GProp_GProps
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo.addons.sf_base.commons.common import Common
|
from odoo.addons.sf_base.commons.common import Common
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
|
|||||||
Reference in New Issue
Block a user