工厂日历独立菜单到计划模块
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': ['sf_manufacturing'],
|
||||
'depends': ['sf_manufacturing','resource'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
# 'security/rules.xml',
|
||||
|
||||
@@ -24,15 +24,17 @@
|
||||
<field name="production_line_id"/>
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_planned_finished"/>
|
||||
<field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'" decoration-success="production_type == '自动化产线加工'"/>
|
||||
<field name="production_type" widget="badge" decoration-warning="production_type == '人工线下加工'"
|
||||
decoration-success="production_type == '自动化产线加工'"/>
|
||||
<field name="actual_start_time" optional='hide'/>
|
||||
<field name="actual_end_time" optional='hide'/>
|
||||
<field name="actual_process_time" optional='hide'/>
|
||||
<field name="schedule_setting" optional='hide'/>
|
||||
<!-- <button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object" -->
|
||||
<!-- attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}" -->
|
||||
<!-- groups="sf_base.group_plan_dispatch"/> -->
|
||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程" type="object"
|
||||
<!-- <button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object" -->
|
||||
<!-- attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}" -->
|
||||
<!-- groups="sf_base.group_plan_dispatch"/> -->
|
||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程"
|
||||
type="object"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'done'), ('actual_start_time', '!=', False)]}"
|
||||
groups="sf_base.group_plan_dispatch"/>
|
||||
</tree>
|
||||
@@ -48,9 +50,11 @@
|
||||
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"
|
||||
options='{"calendar_view": true, "date_begin": "2020-01-01", "date_end": "2020-12-31"}'
|
||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}"/>
|
||||
groups="sf_base.group_plan_dispatch"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('actual_start_time', '!=', False)]}"/>
|
||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"
|
||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('actual_start_time', '!=', False)]}"/>
|
||||
groups="sf_base.group_plan_dispatch"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'done'), ('actual_start_time', '!=', False)]}"/>
|
||||
<!-- <button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/> -->
|
||||
<!-- <button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/> -->
|
||||
|
||||
@@ -66,13 +70,13 @@
|
||||
</div>
|
||||
<group>
|
||||
<group string="基本信息">
|
||||
<!-- <field name="active" invisible="1"/> -->
|
||||
<!-- <field name="active" invisible="1"/> -->
|
||||
<field name="production_id" widget="many2one_button"/>
|
||||
<field name="product_id"/>
|
||||
<field name="origin"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="order_deadline" widget="date"/>
|
||||
<!-- <field name="process_time"/> -->
|
||||
<!-- <field name="process_time"/> -->
|
||||
<field name="schedule_setting"/>
|
||||
<field name="production_line_id" domain="[('name', 'ilike', 'CNC')]"/>
|
||||
|
||||
@@ -83,15 +87,16 @@
|
||||
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
||||
<!-- <field name="activity_ids"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="oe_chatter"> -->
|
||||
<!-- <field name="message_follower_ids"/> -->
|
||||
<!-- <field name="message_ids"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="oe_chatter"> -->
|
||||
<!-- <field name="message_follower_ids"/> -->
|
||||
<!-- <field name="message_ids"/> -->
|
||||
<!-- </div> -->
|
||||
</group>
|
||||
|
||||
<group string="加工信息">
|
||||
|
||||
<field name="date_planned_start" placeholder="如果不选择计划开始时间,会取当前时间来做排程" required="1"/>
|
||||
<field name="date_planned_start"
|
||||
placeholder="如果不选择计划开始时间,会取当前时间来做排程" required="1"/>
|
||||
<field name="date_planned_finished" required="0" invisible="1"/>
|
||||
<field name="actual_process_time"/>
|
||||
<field name="actual_start_time"/>
|
||||
@@ -157,8 +162,8 @@
|
||||
<search string="订单计划">
|
||||
|
||||
<!-- Your other filters go here -->
|
||||
<!-- <filter name="archived" string="已归档" domain="[('active','=',False)]"/> -->
|
||||
<!-- <filter name="not archived" string="未归档" domain="[('active','=',True)]"/> -->
|
||||
<!-- <filter name="archived" string="已归档" domain="[('active','=',False)]"/> -->
|
||||
<!-- <filter name="not archived" string="未归档" domain="[('active','=',True)]"/> -->
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="part_name"/>
|
||||
@@ -173,13 +178,16 @@
|
||||
<filter name="group_by_state" string="状态" domain="[]" context="{'group_by': 'state'}"/>
|
||||
</group>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_production_line_id" string="生产线" domain="[]" context="{'group_by': 'production_line_id'}"/>
|
||||
<filter name="group_by_production_line_id" string="生产线" domain="[]"
|
||||
context="{'group_by': 'production_line_id'}"/>
|
||||
</group>
|
||||
<searchpanel>
|
||||
<!-- <field name="state" icon="fa-filter"/> -->
|
||||
<field name="production_line_id" select="multi" string="生产线" icon="fa-building" enable_counters="1"/>
|
||||
<!-- <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"/>
|
||||
<field name="production_type" select="multi" string="制造类型" icon="fa-building"
|
||||
enable_counters="1"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
@@ -275,7 +283,7 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.production.plan</field>
|
||||
<field name="view_mode">tree,gantt,form</field>
|
||||
<!-- <field name="context">{'search_default_group_by_state': 1, 'search_default_draft': 1, 'display_complete': True}</field> -->
|
||||
<!-- <field name="context">{'search_default_group_by_state': 1, 'search_default_draft': 1, 'display_complete': True}</field> -->
|
||||
<field name="context">{'search_default_draft': 1, 'display_complete': True}</field>
|
||||
</record>
|
||||
|
||||
@@ -341,7 +349,7 @@
|
||||
parent="mrp.menu_mrp_manufacturing"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
<menuitem
|
||||
id="sf_workpiece_delivery__empty_racks_menu"
|
||||
name="空料架配送"
|
||||
sequence="11"
|
||||
@@ -363,6 +371,42 @@
|
||||
action="sf_production_plan_action1"
|
||||
parent="sf_production_plan_menu"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_plan_config_root"
|
||||
name="配置"
|
||||
sequence="190"
|
||||
parent="sf_production_plan_menu"
|
||||
/>
|
||||
|
||||
<!-- 二级菜单:工厂日历 -->
|
||||
<menuitem
|
||||
id="menu_factory_calendar"
|
||||
name="工厂日历"
|
||||
parent="menu_plan_config_root"
|
||||
action="resource.action_resource_calendar_form"
|
||||
sequence="10"
|
||||
/>
|
||||
<!-- <record id="action_resource_calendar_form" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Working Times</field>-->
|
||||
<!-- <field name="res_model">resource.calendar</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="False"/>-->
|
||||
<!-- <field name="search_view_id" ref="view_resource_calendar_search"/>-->
|
||||
<!-- <field name="help" type="html">-->
|
||||
<!-- <p class="o_view_nocontent_smiling_face">-->
|
||||
<!-- Define working hours and time table that could be scheduled to your project members-->
|
||||
<!-- </p>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <record id="action_factory_calendar" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">工厂日历</field>-->
|
||||
<!-- <field name="res_model">resource.calendar</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="help" type="html">-->
|
||||
<!-- <p class="o_view_nocontent_smiling_face">-->
|
||||
<!-- 创建和管理工厂工作日历-->
|
||||
<!-- </p>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user