Browse Source

[ADD] agreement_stock

pull/295/head
Sandip Mangukiya 6 years ago
committed by Murtuza Saleh
parent
commit
4f4a77f8ee
  1. 5
      agreement_mrp/readme/INSTALL.rst
  2. 4
      agreement_mrp/readme/ROADMAP.rst
  3. 13
      agreement_mrp/views/agreement_view.xml
  4. 6
      agreement_mrp/views/mrp_view.xml

5
agreement_mrp/readme/INSTALL.rst

@ -1,5 +0,0 @@
To install Field Service and have the mapping features,
you need to install agreement and mrp
Please refer to the installation instructions available at:
https://github.com/OCA/contract/agreement_mrp

4
agreement_mrp/readme/ROADMAP.rst

@ -1,2 +1,2 @@
The roadmap of the Field Service application is documented on
`Github <https://github.com/OCA/contract/issues/221>`_.
The roadmap of the Agreement application is documented on
`Github <https://github.com/OCA/contract/issues>`_.

13
agreement_mrp/views/agreement_view.xml

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record model="ir.actions.act_window" id="action_mrp_production_agreement_specific">
<record model="ir.actions.act_window"
id="action_mrp_production_agreement_specific">
<field name="name">Manufacture Orders</field> <field name="name">Manufacture Orders</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.production</field> <field name="res_model">mrp.production</field>
@ -21,9 +22,15 @@
<field name="inherit_id" ref="agreement.partner_agreement_form_view"/> <field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside"> <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">
<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"> <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_value">
<field name="mo_count" widget="statinfo"
nolabel="1"/>
</span>
<span class="o_stat_text">MOs</span> <span class="o_stat_text">MOs</span>
</div> </div>
</button> </button>

6
agreement_mrp/views/mrp_view.xml

@ -8,7 +8,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='bom_id']" position="after"> <xpath expr="//field[@name='bom_id']" position="after">
<field name="agreement_id"/> <field name="agreement_id"/>
<field name="serviceprofile_id" domain="[('agreement_id', '=', agreement_id)]"/>
<field name="serviceprofile_id"
domain="[('agreement_id', '=', agreement_id)]"/>
</xpath> </xpath>
</field> </field>
</record> </record>
@ -20,7 +21,8 @@
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/> <field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//group" position="inside"> <xpath expr="//group" position="inside">
<filter string="Service Profile" domain="[]" context="{'group_by':'serviceprofile_id'}"/>
<filter string="Service Profile" domain="[]"
context="{'group_by':'serviceprofile_id'}"/>
</xpath> </xpath>
</field> </field>
</record> </record>

Loading…
Cancel
Save