[ADD] agreement_stock

This commit is contained in:
Sandip Mangukiya
2018-12-26 23:58:52 -08:00
committed by Murtaza Mithaiwala
parent 3794ffcb2f
commit 98d2cd27d8
6 changed files with 39 additions and 52 deletions

View File

@@ -37,15 +37,6 @@ adds a smart button on the agreement to look at the list of related MOs.
.. contents:: .. contents::
:local: :local:
Installation
============
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
Usage Usage
===== =====
@@ -59,8 +50,8 @@ To use this module, you need to:
Known issues / Roadmap Known issues / Roadmap
====================== ======================
The roadmap of the Field Service application is documented on The roadmap of the Agreement application is documented on
`Github <https://github.com/OCA/contract/issues/221>`_. `Github <https://github.com/OCA/contract/issues>`_.
Bug Tracker Bug Tracker
=========== ===========

View File

@@ -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

View File

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

View File

@@ -376,28 +376,20 @@ adds a smart button on the agreement to look at the list of related MOs.</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li> <li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id2">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li> <li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li> <li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li> <li><a class="reference internal" href="#other-credits" id="id7">Other credits</a></li>
<li><a class="reference internal" href="#other-credits" id="id8">Other credits</a></li> <li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
<li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<p>To install Field Service and have the mapping features,
you need to install agreement and mrp</p>
<p>Please refer to the installation instructions available at:
<a class="reference external" href="https://github.com/OCA/contract/agreement_mrp">https://github.com/OCA/contract/agreement_mrp</a></p>
</div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1> <h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>To use this module, you need to:</p> <p>To use this module, you need to:</p>
<ul class="simple"> <ul class="simple">
<li>Go to Manufacturing &gt; Manufacturing Orders</li> <li>Go to Manufacturing &gt; Manufacturing Orders</li>
@@ -407,12 +399,12 @@ you need to install agreement and mrp</p>
</ul> </ul>
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
<p>The roadmap of the Field Service application is documented on <p>The roadmap of the Agreement application is documented on
<a class="reference external" href="https://github.com/OCA/contract/issues/221">Github</a>.</p> <a class="reference external" href="https://github.com/OCA/contract/issues">Github</a>.</p>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1> <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
@@ -420,28 +412,28 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
<h1><a class="toc-backref" href="#id5">Credits</a></h1> <h1><a class="toc-backref" href="#id4">Credits</a></h1>
<div class="section" id="authors"> <div class="section" id="authors">
<h2><a class="toc-backref" href="#id6">Authors</a></h2> <h2><a class="toc-backref" href="#id5">Authors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Open Source Integrators</li> <li>Open Source Integrators</li>
</ul> </ul>
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
<h2><a class="toc-backref" href="#id7">Contributors</a></h2> <h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li> <li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="other-credits"> <div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id8">Other credits</a></h2> <h2><a class="toc-backref" href="#id7">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p> <p>The development of this module has been financially supported by:</p>
<ul class="simple"> <ul class="simple">
<li>Open Source Integrators &lt;<a class="reference external" href="https://opensourceintegrators.com">https://opensourceintegrators.com</a>&gt;</li> <li>Open Source Integrators &lt;<a class="reference external" href="https://opensourceintegrators.com">https://opensourceintegrators.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id9">Maintainers</a></h2> <h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p> <p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose

View File

@@ -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>
@@ -9,8 +10,8 @@
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="domain">[('agreement_id', '=', active_id)]</field> <field name="domain">[('agreement_id', '=', active_id)]</field>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Create MOs Create MOs
</p> </p>
</field> </field>
</record> </record>
@@ -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>

View File

@@ -8,11 +8,12 @@
<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>
<!-- Inherit mrp production search view--> <!-- Inherit mrp production search view-->
<record id="view_mrp_production_filter_agreement" model="ir.ui.view"> <record id="view_mrp_production_filter_agreement" model="ir.ui.view">
<field name="name">mrp.production.select.agreement</field> <field name="name">mrp.production.select.agreement</field>
@@ -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>