odoo-somconnexio-python-client 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/PKG-INFO +3 -1
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/README.md +2 -0
- odoo_somconnexio_python_client-0.2.4/odoo_somconnexio_python_client/__init__.py +1 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/project_task.py +26 -1
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/PKG-INFO +3 -1
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_project_task.py +29 -1
- odoo_somconnexio_python_client-0.2.3/odoo_somconnexio_python_client/__init__.py +0 -1
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/LICENSE +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/client.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/exceptions.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/helpers.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/__init__.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/address.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/broadband_isp_info.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/contract.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/coop_agreement.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/crm_lead.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/crm_lead_line.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/discovery_channel.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/documents.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/fiber_contracts.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/invoice.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/knowledge.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/mobile_isp_info.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/mobile_offer_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/multimedia_contract.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/odoo_paging.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/one_shot_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/partner.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/product_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/provider.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/sponsees.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client/resources/subscription_request.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/SOURCES.txt +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/dependency_links.txt +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/not-zip-safe +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/requires.txt +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/odoo_somconnexio_python_client.egg-info/top_level.txt +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/setup.cfg +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/setup.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/__init__.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_address.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_contract.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_coop_agreement.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_crm_lead.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_discovery_channel.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_documents.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_fiber_contracts.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_invoice.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_knowledge.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_mobile_offer_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_multimedia_contract.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_one_shot_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_partner.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_product_catalog.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_providers.py +0 -0
- {odoo_somconnexio_python_client-0.2.3 → odoo_somconnexio_python_client-0.2.4}/tests/resources/test_subscription_request.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo_somconnexio_python_client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Python wrapper for SomConnexio's Odoo (using REST API)
|
|
5
5
|
Home-page: https://gitlab.com/coopdevs/odoo-somconnexio-python-client
|
|
6
6
|
Author: Coopdevs
|
|
@@ -33,6 +33,8 @@ More info about the customizations in [SomConnexio Odoo module](https://gitlab.c
|
|
|
33
33
|
* Contract - Contract information
|
|
34
34
|
* ProductCatalog - Sales product variants
|
|
35
35
|
* CoopAgreement - lit for coop agreement code
|
|
36
|
+
* ProjectTask - Odoo project task information
|
|
37
|
+
* EsimChangeProjectTask - SIM to eSIM change request
|
|
36
38
|
|
|
37
39
|
## Installation
|
|
38
40
|
|
|
@@ -16,6 +16,8 @@ More info about the customizations in [SomConnexio Odoo module](https://gitlab.c
|
|
|
16
16
|
* Contract - Contract information
|
|
17
17
|
* ProductCatalog - Sales product variants
|
|
18
18
|
* CoopAgreement - lit for coop agreement code
|
|
19
|
+
* ProjectTask - Odoo project task information
|
|
20
|
+
* EsimChangeProjectTask - SIM to eSIM change request
|
|
19
21
|
|
|
20
22
|
## Installation
|
|
21
23
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.4"
|
|
@@ -6,6 +6,9 @@ from ..exceptions import ResourceNotFound, HTTPError
|
|
|
6
6
|
class ProjectTask:
|
|
7
7
|
_name = "project_task"
|
|
8
8
|
_url_path = "/project_tasks"
|
|
9
|
+
# Subresource appended to `_url_path` on create. Subclasses that open a
|
|
10
|
+
# specific kind of task define it to post to their own endpoint.
|
|
11
|
+
_create_path = None
|
|
9
12
|
|
|
10
13
|
def __init__(
|
|
11
14
|
self,
|
|
@@ -38,6 +41,17 @@ class ProjectTask:
|
|
|
38
41
|
self.tag_ids = tag_ids or []
|
|
39
42
|
self.sequence = sequence
|
|
40
43
|
|
|
44
|
+
@classmethod
|
|
45
|
+
def _create_url(cls):
|
|
46
|
+
"""
|
|
47
|
+
URL the `create` request is sent to: the resource path, extended with
|
|
48
|
+
`_create_path` when the subclass defines one.
|
|
49
|
+
"""
|
|
50
|
+
if cls._create_path:
|
|
51
|
+
return "{}/{}".format(cls._url_path, cls._create_path)
|
|
52
|
+
|
|
53
|
+
return cls._url_path
|
|
54
|
+
|
|
41
55
|
@classmethod
|
|
42
56
|
def get(cls, id):
|
|
43
57
|
"""
|
|
@@ -83,7 +97,7 @@ class ProjectTask:
|
|
|
83
97
|
:param kwargs: ProjectTask fields
|
|
84
98
|
:return: ProjectTask object (created)
|
|
85
99
|
"""
|
|
86
|
-
response_data = Client().post(cls.
|
|
100
|
+
response_data = Client().post(cls._create_url(), kwargs)
|
|
87
101
|
if not response_data:
|
|
88
102
|
raise HTTPError(
|
|
89
103
|
"Unexpected empty response creating {} with data: {}".format(
|
|
@@ -115,3 +129,14 @@ class ProjectTask:
|
|
|
115
129
|
)
|
|
116
130
|
|
|
117
131
|
return cls(**response_data)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class EsimChangeProjectTask(ProjectTask):
|
|
135
|
+
"""
|
|
136
|
+
Task opening a SIM to eSIM change. The task name, project and properties
|
|
137
|
+
are resolved in Odoo from the contract, so `create` only expects
|
|
138
|
+
`partner_ref` and `contract_code`.
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
_name = "esim_change_project_task"
|
|
142
|
+
_create_path = "esim-change"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-somconnexio-python-client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Python wrapper for SomConnexio's Odoo (using REST API)
|
|
5
5
|
Home-page: https://gitlab.com/coopdevs/odoo-somconnexio-python-client
|
|
6
6
|
Author: Coopdevs
|
|
@@ -33,6 +33,8 @@ More info about the customizations in [SomConnexio Odoo module](https://gitlab.c
|
|
|
33
33
|
* Contract - Contract information
|
|
34
34
|
* ProductCatalog - Sales product variants
|
|
35
35
|
* CoopAgreement - lit for coop agreement code
|
|
36
|
+
* ProjectTask - Odoo project task information
|
|
37
|
+
* EsimChangeProjectTask - SIM to eSIM change request
|
|
36
38
|
|
|
37
39
|
## Installation
|
|
38
40
|
|
|
@@ -2,7 +2,10 @@ import pytest
|
|
|
2
2
|
import unittest2 as unittest
|
|
3
3
|
|
|
4
4
|
from odoo_somconnexio_python_client.exceptions import ResourceNotFound
|
|
5
|
-
from odoo_somconnexio_python_client.resources.project_task import
|
|
5
|
+
from odoo_somconnexio_python_client.resources.project_task import (
|
|
6
|
+
EsimChangeProjectTask,
|
|
7
|
+
ProjectTask,
|
|
8
|
+
)
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
def assert_model(project_task, name="Implement authentication"):
|
|
@@ -70,3 +73,28 @@ class ProjectTaskTests(unittest.TestCase):
|
|
|
70
73
|
project_task = ProjectTask.update(id=1, **update_data)
|
|
71
74
|
|
|
72
75
|
assert_model(project_task, name="Updated task name")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class EsimChangeProjectTaskTests(unittest.TestCase):
|
|
79
|
+
@pytest.mark.vcr()
|
|
80
|
+
def test_create(self):
|
|
81
|
+
esim_change_data = {
|
|
82
|
+
"partner_ref": "1234",
|
|
83
|
+
"contract_code": "1",
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
esim_change_task = EsimChangeProjectTask.create(**esim_change_data)
|
|
87
|
+
|
|
88
|
+
assert esim_change_task.id == 78
|
|
89
|
+
assert esim_change_task.name == "Canvi a eSIM 654987654"
|
|
90
|
+
assert esim_change_task.description is None
|
|
91
|
+
assert esim_change_task.project_id == 14
|
|
92
|
+
assert esim_change_task.partner_phone == "654987654"
|
|
93
|
+
assert esim_change_task.partner_email == "felipdata@demo.net"
|
|
94
|
+
assert esim_change_task.priority == "0"
|
|
95
|
+
assert esim_change_task.kanban_state == "normal"
|
|
96
|
+
assert esim_change_task.partner_id == 78
|
|
97
|
+
assert esim_change_task.stage_id == 35
|
|
98
|
+
assert esim_change_task.date_deadline is None
|
|
99
|
+
assert esim_change_task.tag_ids == []
|
|
100
|
+
assert esim_change_task.sequence == 10
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|