Skip to content

Commit b34d027

Browse files
committed
[ADD] delivery_deliverea: This module allows integration with deliverea
1 parent ba85ba8 commit b34d027

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5406
-0
lines changed

delivery_deliverea/README.rst

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
==================
2+
Delivery Deliverea
3+
==================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e13a47c28824400ca66cb46c940aad702b916627002c4c506163caa28c56c554
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
20+
:target: https://github.com/OCA/delivery-carrier/tree/16.0/delivery_deliverea
21+
:alt: OCA/delivery-carrier
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-16-0/delivery-carrier-16-0-delivery_deliverea
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Deliverea API integration with Odoo.
32+
33+
Deliverea is a multi-carrier solution that allows you to work with multiple carriers and
34+
has the main carriers integrated into a single platform.
35+
36+
It allows you to manage customer shipments and package pickups.
37+
38+
It allows bidirectional communication, both to record shipments and to receive tracking
39+
status changes.
40+
41+
**Table of contents**
42+
43+
.. contents::
44+
:local:
45+
46+
Installation
47+
============
48+
49+
This module needs the `unidecode` python library.
50+
51+
It depends on the modules:
52+
53+
* `base_delivery_carrier_label <https://github.com/OCA/delivery-carrier/tree/16.0/base_delivery_carrier_label>`_ repositorio OCA/delivery-carrier
54+
* `delivery_package_number <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_package_number>`_ repositorio OCA/delivery-carrier
55+
* `delivery_state <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_state>`_ repositorio OCA/delivery-carrier
56+
57+
Configuration
58+
=============
59+
60+
To configure your Deliverea services, go to:
61+
62+
- *Inventory > Configuration > Delivery methods* and create a new one.
63+
- Choose *Deliverea* as provider.
64+
- Configure your Deliverea credentials: user and password.
65+
- You can configure the next fields:
66+
* Deliverea production environment URL
67+
* Deliverea test environment URL
68+
* Deliverea tracking URL
69+
* Deliverea Distribution Center
70+
* Deliverea carrier
71+
* Deliverea carrier service
72+
* Deliverea articles description
73+
* Select note field
74+
* Notify by sms
75+
* Notify by email
76+
* Hide sender
77+
* Return label
78+
* Return proof delivery
79+
* Saturday delivery
80+
81+
Usage
82+
=====
83+
84+
Shipping codes are generated when a stock pick is validated whose carrier is configured
85+
for Deliverea as a supplier is validated.
86+
for Deliverea as a supplier is validated. The label is generated and attached to the
87+
the document according to the previously configured label generation parameters.
88+
89+
In case you accidentally delete the attached label, you can generate it again by
90+
clicking on the *Deliverea button. On the *Deliverea Label* button at the top of the
91+
picking form.
92+
93+
In order to select the Deliverea distribution center you have to click on the Import
94+
distribution centers button, which will import all available distribution centers.
95+
96+
In order to select the type of carrier and the type of service to be used for this
97+
shipping method, click on the Import carriers and services button.
98+
99+
Once the distribution centers and services are imported, we can select them in the
100+
fields.
101+
102+
Changelog
103+
=========
104+
105+
16.0.1.0.0 (2023-06-07)
106+
~~~~~~~~~~~~~~~~~~~~~~~
107+
108+
* Start of the history
109+
110+
Bug Tracker
111+
===========
112+
113+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
114+
In case of trouble, please check there if your issue has already been reported.
115+
If you spotted it first, help us to smash it by providing a detailed and welcomed
116+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_deliverea%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
117+
118+
Do not contact contributors directly about support or help with technical issues.
119+
120+
Credits
121+
=======
122+
123+
Authors
124+
~~~~~~~
125+
126+
* FactorLibre
127+
128+
Contributors
129+
~~~~~~~~~~~~
130+
131+
* `FactorLibre <https://factorlibre.com>`_:
132+
133+
* Jorge Martínez <jorge.martinez@factorlibre.com>
134+
* Zahra Velasco <zahra.velasco@factorlibre.com>
135+
* Nacho Morales <ignacio.morales@factorlibre.com>
136+
* Oscar Indias <oscar.indias@factorlibre.com>
137+
138+
Maintainers
139+
~~~~~~~~~~~
140+
141+
This module is maintained by the OCA.
142+
143+
.. image:: https://odoo-community.org/logo.png
144+
:alt: Odoo Community Association
145+
:target: https://odoo-community.org
146+
147+
OCA, or the Odoo Community Association, is a nonprofit organization whose
148+
mission is to support the collaborative development of Odoo features and
149+
promote its widespread use.
150+
151+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_deliverea>`_ project on GitHub.
152+
153+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

delivery_deliverea/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import controllers
2+
from . import models

delivery_deliverea/__manifest__.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2022 FactorLibre - Jorge Martínez <jorge.martinez@factorlibre.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
{
4+
"name": "Delivery Deliverea",
5+
"summary": "Delivery Carrier implementation for Deliverea using their API",
6+
"version": "16.0.1.0.0",
7+
"category": "Stock",
8+
"website": "https://github.com/OCA/delivery-carrier",
9+
"author": "FactorLibre, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"application": False,
12+
"installable": True,
13+
"depends": [
14+
"delivery_state",
15+
"delivery_package_number",
16+
],
17+
"external_dependencies": {"python": ["unidecode"]},
18+
"data": [
19+
"data/deliverea_states_data.xml",
20+
"data/product_packaging_data.xml",
21+
"data/ir_cron.xml",
22+
"security/ir.model.access.csv",
23+
"views/deliverea_distribution_center_views.xml",
24+
"views/deliverea_state_mapping.xml",
25+
"views/delivery_carrier_views.xml",
26+
"views/stock_picking_views.xml",
27+
],
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import main
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# © 2022 - FactorLibre - Jore Martínez <jorge.martinez@factorlibre.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
import json
4+
5+
# from odoo.addons.queue_job.job import job
6+
from odoo import http
7+
from odoo.http import request
8+
9+
10+
class DelivereaWebhook(http.Controller):
11+
@http.route(
12+
["/deliverea-tracking-webhook"],
13+
type="json",
14+
auth="public",
15+
methods=["POST"],
16+
csrf=False,
17+
no_jsonrpc=True,
18+
)
19+
def order_import_webhook(self, **post):
20+
SudoStockPicking = request.env["stock.picking"].sudo()
21+
data = json.loads(
22+
request.httprequest.data.decode(request.httprequest.charset or "utf-8")
23+
)
24+
for line in data:
25+
SudoStockPicking.deliverea_update_tracking_state(line)
26+
return self.return_response("Tracking OK")
27+
28+
@staticmethod
29+
def return_response(msg, code=200):
30+
return http.Response(
31+
json.dumps({"message": msg, "status": code}),
32+
code,
33+
headers=[("Content-Type", "application/json")],
34+
)

0 commit comments

Comments
 (0)