新增主生产计划模块
This commit is contained in:
16
mrp_mps/views/mrp_bom_views.xml
Normal file
16
mrp_mps/views/mrp_bom_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="mrp_bom_form_view_inherit_mps" model="ir.ui.view">
|
||||
<field name="name">mrp.bom.form.inherit.mps</field>
|
||||
<field name="model">mrp.bom</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@icon='fa-clock-o']" position="before">
|
||||
<button class="oe_stat_button" name="mrp_mps.action_mrp_mps" type="action" attrs="{'invisible':[('schedule_count', '=',0)]}"
|
||||
icon="fa-area-chart" context="{'search_default_bom_id': active_id}" groups="mrp.group_mrp_manager">
|
||||
<field string="Schedules" name="schedule_count" widget="statinfo" />
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
30
mrp_mps/views/mrp_mps_menu_views.xml
Normal file
30
mrp_mps/views/mrp_mps_menu_views.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="action_mrp_mps" model="ir.actions.client">
|
||||
<field name="name">Master Production Schedule</field>
|
||||
<field name="res_model">mrp.production.schedule</field>
|
||||
<field name="tag">mrp_mps_client_action</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_mps_form_view" model="ir.actions.act_window">
|
||||
<field name="name">Add a Product</field>
|
||||
<field name="res_model">mrp.production.schedule</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="mrp_mps_production_schedule_form_view"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="mrp_mps_menu_planning"
|
||||
name="MPS"
|
||||
sequence="301"
|
||||
parent="mrp.menu_mrp_manufacturing"/>
|
||||
|
||||
<menuitem
|
||||
id="mrp_mps_report_menu"
|
||||
name="Master Production Schedule"
|
||||
action="action_mrp_mps"
|
||||
groups="mrp.group_mrp_manager"
|
||||
sequence="1"
|
||||
parent="mrp_mps_menu_planning"/>
|
||||
</odoo>
|
||||
53
mrp_mps/views/mrp_mps_views.xml
Normal file
53
mrp_mps/views/mrp_mps_views.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="mrp_mps_production_schedule_form_view" model="ir.ui.view" >
|
||||
<field name="name">mrp.production.schedule.form.view</field>
|
||||
<field name="model">mrp.production.schedule</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="bom_id" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="warehouse_id" attrs="{'readonly': [('id', '!=', False)]}" groups="stock.group_stock_multi_warehouses"/>
|
||||
</group>
|
||||
<group>
|
||||
<label for="forecast_target_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="forecast_target_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" readonly="1"/>
|
||||
</div>
|
||||
<label for="min_to_replenish_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="min_to_replenish_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" readonly="1"/>
|
||||
</div>
|
||||
<label for="max_to_replenish_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="max_to_replenish_qty"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" readonly="1"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
<button special="save" data-hotkey="v" type="object" string="Save" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn btn-secondary" special="cancel" data-hotkey="z" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_mps_search_view" model="ir.ui.view" >
|
||||
<field name="name">mrp.production.schedule.search.view</field>
|
||||
<field name="model">mrp.production.schedule</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="product_id"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="bom_id"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
16
mrp_mps/views/mrp_product_forecast_views.xml
Normal file
16
mrp_mps/views/mrp_product_forecast_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="mrp_product_forecast_list_view" model="ir.ui.view">
|
||||
<field name="name">mrp.product.forecast.list</field>
|
||||
<field name="model">mrp.product.forecast</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Forecast" edit="false" create="false" default_order="production_schedule_id, date">
|
||||
<field name="production_schedule_id"/>
|
||||
<field name="date"/>
|
||||
<field name="forecast_qty"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
16
mrp_mps/views/product_product_views.xml
Normal file
16
mrp_mps/views/product_product_views.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_normal_form_view_mps" model="ir.ui.view">
|
||||
<field name="name">product.product.view.form.inherit.mrp.mps</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button groups="mrp.group_mrp_manager" class="oe_stat_button" name="mrp_mps.action_mrp_mps" type="action"
|
||||
icon="fa-area-chart" context="{'search_default_product_id': active_id}" attrs="{'invisible':[('schedule_count', '=',0)]}">
|
||||
<field string="Schedules" name="schedule_count" widget="statinfo" />
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
17
mrp_mps/views/product_template_views.xml
Normal file
17
mrp_mps/views/product_template_views.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_template_only_form_view_mps" model="ir.ui.view">
|
||||
<field name="name">product.template.view.form.inherit.mrp.mps</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" name="action_open_mps_view" type="object"
|
||||
groups="mrp.group_mrp_manager"
|
||||
icon="fa-area-chart" attrs="{'invisible':[('schedule_count', '=',0)]}">
|
||||
<field string="Schedules" name="schedule_count" widget="statinfo" />
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
21
mrp_mps/views/res_config_settings_views.xml
Normal file
21
mrp_mps/views/res_config_settings_views.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.mrp.mps</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="mrp.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='content_mrp_mps']" position="replace">
|
||||
<div class="content-group mt16" attrs="{'invisible': [('module_mrp_mps','=',False)]}">
|
||||
<label string="Time Range" for="manufacturing_period" class="o_light_label"/>
|
||||
<field name="manufacturing_period" widget="radio" class="o_light_label"/>
|
||||
<br/>
|
||||
<label string="Number of Columns" for="manufacturing_period_to_display" class="o_light_label"/>
|
||||
<field name="manufacturing_period_to_display"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user