[IMP] agreement_serviceprofile: black, isort, prettier

This commit is contained in:
Olga Marco
2021-12-29 12:08:03 +01:00
parent 2e19f4a2ba
commit 2e5bb8795b
7 changed files with 13 additions and 34 deletions

View File

@@ -4,7 +4,7 @@
{
"name": "Agreement Service Profile",
"summary": "Adds an Agreement Service Profile object",
"version": "14.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Contract",
"author": "Pavlov Media, "
"Open Source Integrators, "
@@ -20,8 +20,6 @@
"views/agreement.xml",
],
"development_status": "Beta",
"maintainers": [
"max3903",
],
"maintainers": ["max3903"],
"installable": True,
}

View File

@@ -2,42 +2,35 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="servpro_stage_draft" model="agreement.stage">
<field name="name">Draft</field>
<field name="sequence">10</field>
<field name="stage_type">serviceprofile</field>
</record>
<record id="servpro_stage_progress" model="agreement.stage">
<field name="name">In Progress</field>
<field name="sequence">20</field>
<field name="stage_type">serviceprofile</field>
</record>
<record id="servpro_stage_suspend" model="agreement.stage">
<field name="name">Suspended</field>
<field name="sequence">30</field>
<field name="stage_type">serviceprofile</field>
</record>
<record id="servpro_stage_renew" model="agreement.stage">
<field name="name">To Renew</field>
<field name="sequence">40</field>
<field name="stage_type">serviceprofile</field>
</record>
<record id="servpro_stage_close" model="agreement.stage">
<field name="name">Closed</field>
<field name="sequence">50</field>
<field name="stage_type">serviceprofile</field>
</record>
<record id="servpro_stage_cancel" model="agreement.stage">
<field name="name">Cancelled</field>
<field name="sequence">60</field>
<field name="fold">True</field>
<field name="stage_type">serviceprofile</field>
</record>
</odoo>

View File

@@ -11,10 +11,7 @@ class TestAgreementServiceProfile(TransactionCase):
super().setUp()
self.test_customer = self.env["res.partner"].create({"name": "TestCustomer"})
self.agreement_type = self.env["agreement.type"].create(
{
"name": "Test Agreement Type",
"domain": "sale",
}
{"name": "Test Agreement Type", "domain": "sale"}
)
self.test_agreement = self.env["agreement"].create(
{
@@ -27,10 +24,7 @@ class TestAgreementServiceProfile(TransactionCase):
}
)
self.test_serviceprofile = self.env["agreement.serviceprofile"].create(
{
"name": "TestServiceProfile",
"agreement_id": self.test_agreement.id,
}
{"name": "TestServiceProfile", "agreement_id": self.test_agreement.id}
)
# TEST 01: Check Default Stage
@@ -44,7 +38,6 @@ class TestAgreementServiceProfile(TransactionCase):
self.assertEqual(
sp_01._read_group_stage_ids(self.env["agreement.stage"], [], "id"),
self.env["agreement.stage"].search(
[("stage_type", "=", "serviceprofile")],
order="id",
[("stage_type", "=", "serviceprofile")], order="id",
),
)

View File

@@ -1,5 +1,4 @@
<odoo>
<!-- Agreement Service Profile List View-->
<record id="agreement_serviceprofile_tree" model="ir.ui.view">
<field name="name">Agreement Service Profile Tree</field>
@@ -15,7 +14,6 @@
</tree>
</field>
</record>
<!-- Agreement Service Profile Form View -->
<record id="agreement_serviceprofile_form" model="ir.ui.view">
<field name="name">Agreement Service Profile Form</field>
@@ -65,7 +63,7 @@
</group>
</group>
<group string="Notes">
<field name="notes" nolabel="1" widget="html" />
<field name="notes" nolabel="1" widget="html" />
</group>
</sheet>
<div class="oe_chatter">
@@ -75,7 +73,6 @@
</form>
</field>
</record>
<!-- Agreement Service Profile Kanban View -->
<record id="agreement_serviceprofile_kanban" model="ir.ui.view">
<field name="name">Agreement Service Profile Kanban</field>
@@ -97,7 +94,6 @@
</kanban>
</field>
</record>
<!-- Agreement Service Profile Search View -->
<record id="agreement_serviceprofile_search" model="ir.ui.view">
<field name="name">Agreement Service Profile Search</field>
@@ -126,20 +122,17 @@
</search>
</field>
</record>
<!-- Actions opening views on models -->
<record id="agreement_serviceprofile_action" model="ir.actions.act_window">
<field name="name">Service Profiles</field>
<field name="res_model">agreement.serviceprofile</field>
<field name="view_mode">tree,form</field>
</record>
<record id="agreement_serviceprofile_dashboard" model="ir.actions.act_window">
<field name="name">Service Profiles</field>
<field name="res_model">agreement.serviceprofile</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<menuitem
name="Service Profiles"
id="agreement_serviceprofiles"
@@ -147,7 +140,6 @@
sequence="50"
action="agreement_serviceprofile_action"
/>
<menuitem
name="Service Profiles"
id="dashboard_serviceprofiles"
@@ -155,5 +147,4 @@
sequence="20"
action="agreement_serviceprofile_dashboard"
/>
</odoo>

View File

@@ -1,7 +1,6 @@
<!-- Copyright 2019 Open Source Integrators
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<!-- Product Template Form View -->
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.form.view</field>
@@ -20,7 +19,6 @@
</xpath>
</field>
</record>
<!-- Product Template Form View -->
<record id="product_product_form_view" model="ir.ui.view">
<field name="name">product.product.form.view</field>
@@ -39,5 +37,4 @@
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1 @@
../../../../agreement_serviceprofile

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)