Skip to content

Commit 693c197

Browse files
[MIG] delivery_postlogistics_server_env: Migration to 18.0
1 parent 84a65d1 commit 693c197

File tree

6 files changed

+55
-2
lines changed

6 files changed

+55
-2
lines changed

delivery_postlogistics_server_env/README.rst

+4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Contributors
6767

6868
- Jack Le <anlh@trobz.com>
6969

70+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
71+
72+
- Bhavesh Heliconia
73+
7074
Other credits
7175
-------------
7276

delivery_postlogistics_server_env/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Delivery Postlogistics Server Environment",
55
"summary": "Server Environment layer for Delivery Postlogistics",
6-
"version": "16.0.1.0.0",
6+
"version": "18.0.1.0.0",
77
"category": "Operations/Inventory/Delivery",
88
"author": "Camptocamp, Odoo Community Association (OCA)",
99
"license": "AGPL-3",
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
- Thierry Ducrest \<<thierry.ducrest@camptocamp.com>\>
22

3-
- [Trobz](https://trobz.com):
3+
- [Trobz](https://trobz.com):
44
- Jack Le \<<anlh@trobz.com>\>
5+
6+
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
7+
- Bhavesh Heliconia

delivery_postlogistics_server_env/static/description/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
414414
<li>Jack Le &lt;<a class="reference external" href="mailto:anlh&#64;trobz.com">anlh&#64;trobz.com</a>&gt;</li>
415415
</ul>
416416
</li>
417+
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
418+
<li>Bhavesh Heliconia</li>
419+
</ul>
420+
</li>
417421
</ul>
418422
</div>
419423
<div class="section" id="other-credits">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import test_delivery_postlogistics_server_env
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright 2021 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo.tests import TransactionCase
5+
6+
7+
class TestDeliveryCarrier(TransactionCase):
8+
@classmethod
9+
def setUpClass(cls):
10+
super().setUpClass()
11+
12+
# Create a delivery product
13+
cls.delivery_product = cls.env["product.product"].create(
14+
{
15+
"name": "Test Delivery Product",
16+
"type": "service",
17+
}
18+
)
19+
20+
# Create the delivery carrier with the required product_id
21+
cls.carrier = cls.env["delivery.carrier"].create(
22+
{
23+
"name": "Test Carrier",
24+
"product_id": cls.delivery_product.id, # Ensure product_id is set
25+
"delivery_type": "fixed",
26+
}
27+
)
28+
29+
def test_server_env_fields(self):
30+
expected_fields = {"postlogistics_client_id", "postlogistics_client_secret"}
31+
carrier_fields = self.carrier._server_env_fields
32+
33+
for field in expected_fields:
34+
self.assertIn(
35+
field, carrier_fields, f"Field {field} is missing in _server_env_fields"
36+
)
37+
38+
self.assertTrue(
39+
isinstance(carrier_fields, dict),
40+
"_server_env_fields should return a dictionary",
41+
)

0 commit comments

Comments
 (0)