Skip to content

Commit

Permalink
[17.0][MIG] agreement_repair: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilo committed Sep 10, 2024
1 parent bd1c8a2 commit db6e6d5
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 31 deletions.
1 change: 1 addition & 0 deletions agreement_repair/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Contributors

- Sandip Mangukiya <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Italo LOPES. <[email protected]>

Other credits
-------------
Expand Down
2 changes: 1 addition & 1 deletion agreement_repair/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/agreement",
"depends": [
"agreement_serviceprofile",
"agreement",
"repair",
],
"data": [
Expand Down
6 changes: 2 additions & 4 deletions agreement_repair/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import (
repair,
agreement,
)
from . import repair
from . import agreement
1 change: 0 additions & 1 deletion agreement_repair/models/repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ class Repair(models.Model):
_inherit = "repair.order"

agreement_id = fields.Many2one("agreement", "Agreement")
serviceprofile_id = fields.Many2one("agreement.serviceprofile", "Service Profile")
1 change: 1 addition & 0 deletions agreement_repair/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Sandip Mangukiya \<<[email protected]>\>
- Serpent Consulting Services Pvt. Ltd. \<<[email protected]>\>
- Italo LOPES. \<<[email protected]>\>
1 change: 1 addition & 0 deletions agreement_repair/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<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>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
<li>Italo LOPES. &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand Down
4 changes: 2 additions & 2 deletions agreement_repair/tests/test_agreement_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestAgreementRepair(common.TransactionCase):
def setUp(self):
super(TestAgreementRepair, self).setUp()
super().setUp()

self.agreement_obj = self.env["agreement"]
self.agreement_type_id = self.env["agreement.type"].create(
Expand All @@ -19,7 +19,7 @@ def test_fieldservice_purchase(self):
agreement_vals = {
"name": "Test Agreement",
"agreement_type_id": self.agreement_type_id.id,
"description": "Test Agreement",
"code": "TestAgreement",
"start_date": fields.Date.today(),
"end_date": fields.Date.today(),
}
Expand Down
4 changes: 2 additions & 2 deletions agreement_repair/views/agreement_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">repair.order</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('agreement_id', '=', active_id)]</field>
<field name="domain">[('agreement_id', '=', id)]</field>
<field name="context">{'create': False, 'edit': False}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Expand All @@ -18,7 +18,7 @@
<record id="partner_agreement_form_view_repair" model="ir.ui.view">
<field name="name">agreement.form.repair</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view" />
<field name="inherit_id" ref="agreement.agreement_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button
Expand Down
21 changes: 0 additions & 21 deletions agreement_repair/views/repair_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
name="agreement_id"
domain="[('partner_id', '=', partner_id)]"
/>
<field
name="serviceprofile_id"
domain="[('agreement_id', '=', agreement_id)]"
/>
</group>
<group id="agreement-right" />
</group>
Expand All @@ -26,21 +22,4 @@
</field>
</record>

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

</odoo>

0 comments on commit db6e6d5

Please sign in to comment.