Skip to content

Commit

Permalink
11.0 imp fieldservice_agreement (OCA#76)
Browse files Browse the repository at this point in the history
* [IMP] fieldservice_agreement

[UPD] README.rst
  • Loading branch information
Sandip Mangukiya authored and patrickrwilson committed Apr 27, 2021
1 parent 023c1be commit 50b40a3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
9 changes: 6 additions & 3 deletions fieldservice_agreement/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ To use this module:
* Select or create a field service order and set the agreement
* Go to Agreement > Agreements
* Open the previous agreement
* Click on the smart button "Service Orders" to see the list of related field
service orders
* Click on the smart button "Service Orders" to see the list of related field service orders

Bug Tracker
===========
Expand All @@ -72,6 +71,7 @@ Contributors
~~~~~~~~~~~~

* Bhavesh Odedra <[email protected]>
* Sandip Mangukiya <[email protected]>

Other credits
~~~~~~~~~~~~~
Expand Down Expand Up @@ -99,10 +99,13 @@ promote its widespread use.
.. |maintainer-bodedra| image:: https:/bodedra.png?size=40px
:target: https:/bodedra
:alt: bodedra
.. |maintainer-smangukiya| image:: https:/smangukiya.png?size=40px
:target: https:/smangukiya
:alt: smangukiya

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-max3903| |maintainer-bodedra|
|maintainer-max3903| |maintainer-bodedra| |maintainer-smangukiya|

This module is part of the `OCA/field-service <https:/OCA/field-service/tree/11.0/fieldservice_agreement>`_ project on GitHub.

Expand Down
1 change: 1 addition & 0 deletions fieldservice_agreement/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"maintainers": [
"max3903",
"bodedra",
"smangukiya",
],
}
2 changes: 2 additions & 0 deletions fieldservice_agreement/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ class FSMOrder(geo_model.GeoModel):
_inherit = 'fsm.order'

agreement_id = fields.Many2one('agreement', string='Agreement')
serviceprofile_id = fields.Many2one('agreement.serviceprofile',
'Service Profile')
1 change: 1 addition & 0 deletions fieldservice_agreement/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Bhavesh Odedra <[email protected]>
* Sandip Mangukiya <[email protected]>
3 changes: 1 addition & 2 deletions fieldservice_agreement/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ To use this module:
* Select or create a field service order and set the agreement
* Go to Agreement > Agreements
* Open the previous agreement
* Click on the smart button "Service Orders" to see the list of related field
service orders
* Click on the smart button "Service Orders" to see the list of related field service orders
6 changes: 3 additions & 3 deletions fieldservice_agreement/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ <h1><a class="toc-backref" href="#id1">Usage</a></h1>
<li>Select or create a field service order and set the agreement</li>
<li>Go to Agreement &gt; Agreements</li>
<li>Open the previous agreement</li>
<li>Click on the smart button “Service Orders” to see the list of related field
service orders</li>
<li>Click on the smart button “Service Orders” to see the list of related field service orders</li>
</ul>
</div>
<div class="section" id="bug-tracker">
Expand All @@ -420,6 +419,7 @@ <h2><a class="toc-backref" href="#id4">Authors</a></h2>
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#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>
</div>
<div class="section" id="other-credits">
Expand All @@ -437,7 +437,7 @@ <h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https:/max3903"><img alt="max3903" src="https:/max3903.png?size=40px" /></a> <a class="reference external" href="https:/bodedra"><img alt="bodedra" src="https:/bodedra.png?size=40px" /></a></p>
<p><a class="reference external" href="https:/max3903"><img alt="max3903" src="https:/max3903.png?size=40px" /></a> <a class="reference external" href="https:/bodedra"><img alt="bodedra" src="https:/bodedra.png?size=40px" /></a> <a class="reference external" href="https:/smangukiya"><img alt="smangukiya" src="https:/smangukiya.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https:/OCA/field-service/tree/11.0/fieldservice_agreement">OCA/field-service</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
Expand Down
7 changes: 5 additions & 2 deletions fieldservice_agreement/views/agreement_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
<field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
<field name="arch" type="xml">
<div class="oe_button_box" position="inside">
<button name="action_view_service_order" type="object" class="oe_stat_button" icon="fa-pencil-square-o" attrs="{'invisible': [('service_order_count', '=', 0)]}">
<field name="service_order_count" widget="statinfo" string="Service Orders"/>
<button name="action_view_service_order" type="object"
class="oe_stat_button" icon="fa-pencil-square-o"
attrs="{'invisible': [('service_order_count', '=', 0)]}">
<field name="service_order_count" widget="statinfo"
string="Service Orders"/>
</button>
</div>
</field>
Expand Down
15 changes: 15 additions & 0 deletions fieldservice_agreement/views/fsm_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,23 @@
<field name="arch" type="xml">
<field name="location_id" position="after">
<field name="agreement_id"/>
<field name="serviceprofile_id"
domain="[('agreement_id', '=', agreement_id)]"/>
</field>
</field>
</record>

<!-- Inherit fsm.order search view-->
<record id="search_fsm_order_filter_agreement" model="ir.ui.view">
<field name="name">fsm.order.select.agreement</field>
<field name="model">fsm.order</field>
<field name="inherit_id" ref="fieldservice.fsm_order_search_view"/>
<field name="arch" type="xml">
<xpath expr="//group" position="inside">
<filter string="Service Profile" domain="[]"
context="{'group_by':'serviceprofile_id'}"/>
</xpath>
</field>
</record>

</odoo>

0 comments on commit 50b40a3

Please sign in to comment.