[MIG][12.0] agreement_maintenance

This commit is contained in:
Murtuza Saleh
2019-03-27 19:33:16 +05:30
committed by Olga Marco
parent 0737956801
commit 44d2f7e374
9 changed files with 42 additions and 48 deletions

View File

@@ -14,13 +14,13 @@ Maintenance Agreements
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
:target: https://github.com/OCA/contract/tree/11.0/agreement_maintenance
:target: https://github.com/OCA/contract/tree/12.0/agreement_maintenance
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_maintenance
:target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_maintenance
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/110/11.0
:target: https://runbot.odoo-community.org/runbot/110/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -62,7 +62,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
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
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement_maintenance%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement_maintenance%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -82,6 +82,7 @@ Contributors
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
Other credits
~~~~~~~~~~~~~
@@ -112,6 +113,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-max3903|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/11.0/agreement_maintenance>`_ project on GitHub.
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement_maintenance>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -10,10 +10,10 @@
'website': 'https://github.com/OCA/contract',
'category': 'Maintenance',
'license': 'AGPL-3',
'version': '11.0.0.0.1',
'version': '12.0.1.0.0',
'depends': [
'agreement',
'maintenance',
'agreement_serviceprofile',
],
'data': [
'views/agreement_view.xml',

View File

@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,22 +14,23 @@ msgstr ""
"Plural-Forms: \n"
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_mr_count
#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement__mr_count
msgid "# Maintenance Requests"
msgstr ""
#. module: agreement_maintenance
#: model:ir.ui.view,arch_db:agreement_maintenance.partner_agreement_form_view
#: model_terms:ir.ui.view,arch_db:agreement_maintenance.partner_agreement_form_view
msgid "<span class=\"o_stat_text\">Maintenance Requests</span>"
msgstr ""
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request_agreement_id
#: model:ir.model,name:agreement_maintenance.model_agreement
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request__agreement_id
msgid "Agreement"
msgstr ""
#. module: agreement_maintenance
#: model:ir.actions.act_window,help:agreement_maintenance.action_maintenance_request_agreement_specific
#: model_terms:ir.actions.act_window,help:agreement_maintenance.action_maintenance_request_agreement_specific
msgid "Create Maintenance Requests"
msgstr ""
@@ -40,17 +41,12 @@ msgstr ""
#. module: agreement_maintenance
#: model:ir.model,name:agreement_maintenance.model_maintenance_request
msgid "Maintenance Requests"
msgid "Maintenance Request"
msgstr ""
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request_serviceprofile_id
#: model:ir.ui.view,arch_db:agreement_maintenance.view_maintenance_request_filter_agreement
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request__serviceprofile_id
#: model_terms:ir.ui.view,arch_db:agreement_maintenance.view_maintenance_request_filter_agreement
msgid "Service Profile"
msgstr ""
#. module: agreement_maintenance
#: model:ir.model,name:agreement_maintenance.model_agreement
msgid "agreement"
msgstr ""

View File

@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement_maintenance
# * agreement_maintenance
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-02-22 14:50+0000\n"
"PO-Revision-Date: 2019-06-28 13:42+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: none\n"
"Language: de\n"
@@ -14,25 +14,26 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.4\n"
"X-Generator: Weblate 3.6.1\n"
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_mr_count
#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement__mr_count
msgid "# Maintenance Requests"
msgstr "# Wartungsanfragen"
#. module: agreement_maintenance
#: model:ir.ui.view,arch_db:agreement_maintenance.partner_agreement_form_view
#: model_terms:ir.ui.view,arch_db:agreement_maintenance.partner_agreement_form_view
msgid "<span class=\"o_stat_text\">Maintenance Requests</span>"
msgstr "<span class=\"o_stat_text\">Wartungsanfragen</span>"
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request_agreement_id
#: model:ir.model,name:agreement_maintenance.model_agreement
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request__agreement_id
msgid "Agreement"
msgstr "Vereinbarung"
#. module: agreement_maintenance
#: model:ir.actions.act_window,help:agreement_maintenance.action_maintenance_request_agreement_specific
#: model_terms:ir.actions.act_window,help:agreement_maintenance.action_maintenance_request_agreement_specific
msgid "Create Maintenance Requests"
msgstr "Wartungsanfrage erzeugen"
@@ -43,16 +44,14 @@ msgstr "Wartungsanfragen"
#. module: agreement_maintenance
#: model:ir.model,name:agreement_maintenance.model_maintenance_request
msgid "Maintenance Requests"
msgstr "Wartungsanfragen"
msgid "Maintenance Request"
msgstr "Wartungsanfrage"
#. module: agreement_maintenance
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request_serviceprofile_id
#: model:ir.ui.view,arch_db:agreement_maintenance.view_maintenance_request_filter_agreement
#: model:ir.model.fields,field_description:agreement_maintenance.field_maintenance_request__serviceprofile_id
#: model_terms:ir.ui.view,arch_db:agreement_maintenance.view_maintenance_request_filter_agreement
msgid "Service Profile"
msgstr "Dienstleistungsprofil"
#. module: agreement_maintenance
#: model:ir.model,name:agreement_maintenance.model_agreement
msgid "agreement"
msgstr "Vereinbarung"
#~ msgid "agreement"
#~ msgstr "Vereinbarung"

View File

@@ -12,10 +12,6 @@ class Agreement(models.Model):
@api.multi
def _compute_mr_count(self):
data = self.env['maintenance.request'].read_group(
[('agreement_id', 'in', self.ids)],
['agreement_id'], ['agreement_id'])
count_data = dict((item['agreement_id'][0],
item['agreement_id_count']) for item in data)
for agreement in self:
agreement.mr_count = count_data.get(agreement.id, 0)
for ag_rec in self:
ag_rec.mr_count = self.env['maintenance.request'].search_count(
[('agreement_id', 'in', ag_rec.ids)])

View File

@@ -2,3 +2,4 @@
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Maintenance Agreements</title>
<style type="text/css">
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement_maintenance"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement_maintenance"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_maintenance"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_maintenance"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to manage maintenance agreements and contracts.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@@ -413,7 +413,7 @@ ul.auto-toc {
<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.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement_maintenance%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement_maintenance%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -432,6 +432,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
<li>Wolfgang Hall &lt;<a class="reference external" href="mailto:whall&#64;opensourceintegrators.com">whall&#64;opensourceintegrators.com</a>&gt;</li>
<li>Maxime Chambreuil &lt;<a class="reference external" href="mailto:mchambreuil&#64;opensourceintegrators.com">mchambreuil&#64;opensourceintegrators.com</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
@@ -451,7 +452,7 @@ 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">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement_maintenance">OCA/contract</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_maintenance">OCA/contract</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>
</div>

View File

@@ -19,7 +19,7 @@
<record id="partner_agreement_form_view" model="ir.ui.view">
<field name="name">agreement.form.maintenance.request</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement.partner_agreement_form_view"/>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(action_maintenance_request_agreement_specific)d"

View File

@@ -23,7 +23,7 @@
ref="maintenance.hr_equipment_request_view_search"/>
<field name="arch" type="xml">
<xpath expr="//group" position="inside">
<filter string="Service Profile" domain="[]"
<filter string="Service Profile" name="serviceprofile_id" domain="[]"
context="{'group_by':'serviceprofile_id'}"/>
</xpath>
</field>