搭建排程基础架构
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
'author': 'jikimo',
|
||||
'website': 'https://sf.cs.jikimo.com',
|
||||
# 此处依赖sf_manufacturing是因为我要重写其中的一个字段operation_id的string,故需要sf_manufacturing先安装
|
||||
'depends': ['mrp', 'mrp_workorder'],
|
||||
'depends': ['mrp', 'mrp_workorder', 'sf_manufacturing'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/view.xml'
|
||||
|
||||
@@ -13,7 +13,8 @@ class sf_pl_plan(models.Model):
|
||||
# sequence = fields.Integer(string='序号', required=True, copy=False, readonly=True, index=True,
|
||||
# default=lambda self: self.env['ir.sequence'].sudo().next_by_code('sf.pl.plan'))
|
||||
sequence = fields.Integer(string='序号', required=True, copy=False, readonly=True, index=True)
|
||||
current_operation_name = fields.Char(string='当前工序名称', size=64, default='坯料预制')
|
||||
current_operation_name = fields.Char(string='当前工序名称', size=64, default='生产计划')
|
||||
production_line_id = fields.Many2one('sf.production.line', string='生产线')
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<field name="plan_start_time"/>
|
||||
<field name="plan_end_time"/>
|
||||
<field name="state"/>
|
||||
<field name="production_line_id"/>
|
||||
</group>
|
||||
<group string="规格信息" col="1">
|
||||
<group col="3">
|
||||
@@ -86,7 +87,7 @@
|
||||
<field name="model">sf.pl.plan</field>
|
||||
<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"
|
||||
string="制造订单生产计划" default_group_by="production_line_id" create="0"
|
||||
delete="0" sample="1"
|
||||
display_unavailability="1"
|
||||
color="state"
|
||||
@@ -142,16 +143,22 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <record id="sf_pl_plan_action" model="ir.actions.act_window"> -->
|
||||
<!-- <field name="name">制造订单生产计划</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">sf.pl.plan</field> -->
|
||||
<!-- <field name="view_mode">tree,form,gantt</field> -->
|
||||
<!-- </record> -->
|
||||
<record id="sf_pl_plan_action" model="ir.actions.act_window">
|
||||
<field name="name">坯料预制计划</field>
|
||||
<field name="name">制造订单生产计划</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.pl.plan</field>
|
||||
<field name="view_mode">tree,form,gantt</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_mode">gantt,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="sf_pl_plan_menu"
|
||||
name="坯料预制计划"
|
||||
name="制造订单生产计划"
|
||||
parent="mrp_workorder.mrp_workorder_menu_planning"
|
||||
sequence="10"
|
||||
action="sf_pl_plan_action"
|
||||
|
||||
Reference in New Issue
Block a user