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

View File

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

View File

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

View File

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

View File

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