summaryrefslogtreecommitdiff
path: root/addons/purchase_mrp/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/purchase_mrp/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/purchase_mrp/views')
-rw-r--r--addons/purchase_mrp/views/mrp_production_views.xml19
-rw-r--r--addons/purchase_mrp/views/purchase_order_views.xml18
2 files changed, 37 insertions, 0 deletions
diff --git a/addons/purchase_mrp/views/mrp_production_views.xml b/addons/purchase_mrp/views/mrp_production_views.xml
new file mode 100644
index 00000000..8aaffd64
--- /dev/null
+++ b/addons/purchase_mrp/views/mrp_production_views.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo><data>
+ <record id="mrp_production_form_view_purchase" model="ir.ui.view">
+ <field name="name">mrp.production.inherited.form.purchase</field>
+ <field name="model">mrp.production</field>
+ <field name="priority">32</field>
+ <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//button[@name='action_view_mrp_production_childs']" position="before">
+ <button class="oe_stat_button" name="action_view_purchase_orders" type="object" icon="fa-credit-card" groups="purchase.group_purchase_user" attrs="{'invisible': [('purchase_order_count', '=', 0)]}">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value"><field name="purchase_order_count"/></span>
+ <span class="o_stat_text">Purchases</span>
+ </div>
+ </button>
+ </xpath>
+ </field>
+ </record>
+</data></odoo>
diff --git a/addons/purchase_mrp/views/purchase_order_views.xml b/addons/purchase_mrp/views/purchase_order_views.xml
new file mode 100644
index 00000000..a6b2fd12
--- /dev/null
+++ b/addons/purchase_mrp/views/purchase_order_views.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo><data>
+ <record id="purchase_order_form_mrp" model="ir.ui.view">
+ <field name="name">purchase.order.inherited.form.mrp</field>
+ <field name="model">purchase.order</field>
+ <field name="inherit_id" ref="purchase.purchase_order_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='button_box']" position="inside">
+ <button class="oe_stat_button" name="action_view_mrp_productions" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_count', '=', 0)]}" groups="mrp.group_mrp_user">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value"><field name="mrp_production_count"/></span>
+ <span class="o_stat_text">Manufacturing</span>
+ </div>
+ </button>
+ </xpath>
+ </field>
+ </record>
+</data></odoo>