Accept Merge Request #1729: (feature/零件图号名称优化需求 -> develop)
Merge Request: 制造订单、工单页面导航优化 Created By: @管欢 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @管欢 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1729
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
<field name="construction_period_status" select="multi" icon="fa-building" enable_counters="1"/>
|
||||
<field name="tag_type" select="multi" icon="fa-building" enable_counters="1"/>
|
||||
<field name="processing_panel_selection" select="multi" icon="fa-building" enable_counters="1"/>
|
||||
<!-- <field name="manual_quotation" select="multi" string="" icon="fa-building" enable_counters="1"/>-->
|
||||
</searchpanel>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class MrpProduction(models.Model):
|
||||
_description = "制造订单"
|
||||
_order = 'create_date desc'
|
||||
sale_order_id = fields.Many2one('sale.order', string='销售订单', compute='_compute_sale_order_id', store=True)
|
||||
deadline_of_delivery = fields.Date('订单交期', tracking=True, compute='_compute_deadline_of_delivery')
|
||||
deadline_of_delivery = fields.Date('订单交期', tracking=True, compute='_compute_deadline_of_delivery', store=True)
|
||||
# tray_ids = fields.One2many('sf.tray', 'production_id', string="托盘")
|
||||
maintenance_count = fields.Integer(compute='_compute_maintenance_count', string="Number of maintenance requests")
|
||||
request_ids = fields.One2many('maintenance.request', 'production_id')
|
||||
|
||||
@@ -40,6 +40,11 @@ class ResMrpWorkOrder(models.Model):
|
||||
# workcenter_id = fields.Many2one('mrp.workcenter', string='工作中心', required=False)
|
||||
users_ids = fields.Many2many("res.users", 'users_workorder', related="workcenter_id.users_ids")
|
||||
processing_panel = fields.Char('加工面')
|
||||
processing_panel_selection = fields.Selection([
|
||||
('ZM', 'ZM'),
|
||||
('FM', 'FM'),
|
||||
('YC', 'YC'),
|
||||
('QC', 'QC')], string="加工面", compute='_compute_processing_panel_selection', store=True)
|
||||
sequence = fields.Integer(string='工序')
|
||||
routing_type = fields.Selection([
|
||||
('装夹预调', '装夹预调'),
|
||||
@@ -63,6 +68,14 @@ class ResMrpWorkOrder(models.Model):
|
||||
delivery_warning = fields.Selection([('normal', '正常'), ('warning', '告警'), ('overdue', '逾期')], string='时效',
|
||||
tracking=True)
|
||||
|
||||
@api.depends('processing_panel')
|
||||
def _compute_processing_panel_selection(self):
|
||||
for record in self:
|
||||
if record.processing_panel in ['ZM', 'FM', 'YC', 'QC']:
|
||||
record.processing_panel_selection = record.processing_panel
|
||||
else:
|
||||
record.processing_panel_selection = False
|
||||
|
||||
@api.depends('production_id.manual_quotation')
|
||||
def _compute_manual_quotation(self):
|
||||
for item in self:
|
||||
@@ -130,7 +143,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
Y10_axis = fields.Float(default=0)
|
||||
Z10_axis = fields.Float(default=0)
|
||||
X_deviation_angle = fields.Integer(string="X轴偏差度", default=0)
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], default='合格',
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工")], default='合格',
|
||||
string="检测结果", tracking=True)
|
||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
||||
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
||||
|
||||
@@ -558,6 +558,27 @@
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="attributes">
|
||||
<attribute name="string">单据编码</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="part_name"/>
|
||||
<field name="part_number"/>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="deadline_of_delivery" icon="fa-calendar" enable_counters="1" filter_domain="[('deadline_of_delivery', 'ilike', self)]"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_variant_attributes']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_raw_ids']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name'][last()]" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='origin']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//filter[@name='filter_in_progress']" position="before">
|
||||
<filter string="返工" name="filter_rework" domain="[('state', '=', 'rework')]"/>
|
||||
<filter string="报废" name="filter_scrap" domain="[('state', '=', 'scrap')]"/>
|
||||
|
||||
@@ -160,8 +160,11 @@
|
||||
<!-- <filter name="archived" string="已归档" domain="[('active','=',False)]"/> -->
|
||||
<!-- <filter name="not archived" string="未归档" domain="[('active','=',True)]"/> -->
|
||||
<field name="name"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="state"/>
|
||||
<field name="origin"/>
|
||||
<field name="part_name"/>
|
||||
<field name="part_number"/>
|
||||
<field name="order_deadline" filter_domain="[('order_deadline', 'ilike', self)]"/>
|
||||
<field name="production_line_id"/>
|
||||
<filter string="待排程" name="draft" domain="[('state','=','draft')]"/>
|
||||
<filter string="已排程" name="done" domain="[('state','=','done')]"/>
|
||||
<filter string="加工中" name="processing" domain="[('state','=','processing')]"/>
|
||||
@@ -176,6 +179,7 @@
|
||||
<!-- <field name="state" icon="fa-filter"/> -->
|
||||
<field name="production_line_id" select="multi" string="生产线" icon="fa-building" enable_counters="1"/>
|
||||
<field name="state" select="multi" string="状态" icon="fa-building" enable_counters="1"/>
|
||||
<field name="production_type" select="multi" string="制造类型" icon="fa-building" enable_counters="1"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -20,10 +20,15 @@ class Action_Plan_All_Wizard(models.TransientModel):
|
||||
logging.info('计划开始时间: %s', planned_start_date)
|
||||
return planned_start_date
|
||||
|
||||
def _get_production_line_id(self):
|
||||
sf_production_line = self.env['sf.production.line'].sudo().search(
|
||||
[('name', '=', '1#CNC自动生产线')], limit=1)
|
||||
return sf_production_line.id
|
||||
|
||||
# 选择生产线
|
||||
production_line_id = fields.Many2one('sf.production.line', string=u'生产线', required=True)
|
||||
date_planned_start = fields.Datetime(string='计划开始时间', index=True, copy=False,
|
||||
default=_get_date_planned_start)
|
||||
production_line_id = fields.Many2one('sf.production.line', string=u'生产线', required=True,
|
||||
default=_get_production_line_id)
|
||||
date_planned_start = fields.Datetime(string='计划开始时间', index=True, copy=False, required=True)
|
||||
|
||||
# 接收传递过来的计划ID
|
||||
plan_ids = fields.Many2many('sf.production.plan', string=u'计划ID')
|
||||
|
||||
@@ -25,7 +25,7 @@ class SfQualityCncTest(models.Model):
|
||||
('pass', '合格'),
|
||||
('fail', '不合格')], string='判定结果')
|
||||
number = fields.Integer('数量', default=1)
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], string="检测结果")
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工")], string="检测结果")
|
||||
reason = fields.Selection(
|
||||
[("programming", "编程"), ("cutter", "刀具"), ("clamping", "装夹"), ("operate computer", "操机"),
|
||||
("technology", "工艺"), ("customer redrawing", "客户改图")], string="原因")
|
||||
|
||||
@@ -770,6 +770,7 @@
|
||||
<searchpanel>
|
||||
<field name="assemble_status" enable_counters="1" icon="fa-filter"/>
|
||||
<field name="functional_tool_type_id" enable_counters="1" icon="fa-filter"/>
|
||||
<field name="loading_task_source" enable_counters="1" icon="fa-filter" string="任务来源"/>
|
||||
</searchpanel>
|
||||
|
||||
<group expand="0" string="Group By...">
|
||||
|
||||
Reference in New Issue
Block a user