mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[ADD] agreement_mrp
This commit is contained in:
committed by
Maxime Chambreuil
parent
19ab42e585
commit
089dbda9b3
34
agreement_mrp/views/agreement_view.xml
Normal file
34
agreement_mrp/views/agreement_view.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_mrp_production_agreement_specific">
|
||||
<field name="name">Manufacture Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('agreement_id', '=', active_id)]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Create MOs
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="partner_agreement_form_view" model="ir.ui.view">
|
||||
<field name="name">agreement.form.mrp</field>
|
||||
<field name="model">agreement</field>
|
||||
<field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="%(action_mrp_production_agreement_specific)d" type="action" attrs="{'invisible': [('mo_count', '=', 0)]}" class="oe_stat_button" icon="fa-wrench">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="mo_count" widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">MOs</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
28
agreement_mrp/views/mrp_view.xml
Normal file
28
agreement_mrp/views/mrp_view.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="mrp_production_form_view_agreement" model="ir.ui.view">
|
||||
<field name="name">mrp.production.form.agreement</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='bom_id']" position="after">
|
||||
<field name="agreement_id"/>
|
||||
<field name="serviceprofile_id" domain="[('agreement_id', '=', agreement_id)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Inherit mrp production search view-->
|
||||
<record id="view_mrp_production_filter_agreement" model="ir.ui.view">
|
||||
<field name="name">mrp.production.select.agreement</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group" position="inside">
|
||||
<filter string="Service Profile" domain="[]" context="{'group_by':'serviceprofile_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user