Skip to content

Commit 6b251a4

Browse files
committed
Merge PR #632 into 16.0
Signed-off-by jbaudoux
2 parents 36a88ad + 0e0fa7e commit 6b251a4

31 files changed

+4358
-0
lines changed

delivery_schenker/README.rst

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
=================
2+
Delivery Schenker
3+
=================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
17+
:target: https://github.com/OCA/delivery-carrier/tree/14.0/delivery_schenker
18+
:alt: OCA/delivery-carrier
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_schenker
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
23+
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/delivery-carrier&target_branch=14.0
24+
:alt: Try me on Runboat
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
This module links the `DB Schenker <https://www.dbschenker.com>`_ booking and tracking
29+
APIs with Odoo delivery system.
30+
31+
**Table of contents**
32+
33+
.. contents::
34+
:local:
35+
36+
Installation
37+
============
38+
39+
This module depends on the `zeep` python library and the OCA/delivery-carrier
40+
`delivery_package_number` and `delivery_state` modules.
41+
42+
The Schenker API doesn't provide delivery rating methods, so OCA's
43+
`delivery_price_method` is advised in order to use this carrier in a sales workflow.
44+
45+
Configuration
46+
=============
47+
48+
To configure a Schenker delivery method:
49+
50+
#. Go to *Inventory > Configuration > Delivery > Shipping methods* and create a new one.
51+
#. Choose *DB Schenker* as provider.
52+
#. Configure the service parameters according to your contract considerations.
53+
#. Choose a delivery product and a default packaging. This is mandatory for the booking
54+
request as it needs the packaging code.
55+
56+
To make tests, set the carrier environment to test from the smart button. Don't forget
57+
to set it to production once you're ready to use the delivery method!
58+
59+
Usage
60+
=====
61+
62+
These are the operations possible with this module:
63+
64+
Place shipping bookings
65+
~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
#. When the picking is validated, the shipping will be booked at Schenker.
68+
#. With the response, we'll receive the delivery tracking number and the pdf label in a
69+
chatter message and it will be kept as attachment to the document.
70+
#. You can manage packages number either with the proper Odoo workflows or with the
71+
package number field available in the *Additional Info* tab. You'll get as many
72+
labels as declared packages.
73+
74+
Cancel bookings
75+
~~~~~~~~~~~~~~~
76+
77+
#. As in other carriers, we can cancel the shipping after the picking is done. To do
78+
so, go to *Additional Info* tab and click on the *Cancel* action on the side of the
79+
tracking number.
80+
#. We can generate a new shipping if necessary.
81+
82+
Get labels
83+
~~~~~~~~~~
84+
85+
#. If by chance we delete the generated labels, we can obtain them again hitting the
86+
*Schenker Label* buttons in the header of the picking form.
87+
88+
Tracking
89+
~~~~~~~~
90+
91+
#. The module is integrated with `delivery_state` to be able to get the tracking info
92+
directly from the DB Schenker API.
93+
#. To do so, go to a picking shipped with Schenker. In the *Additional Info* tab you'll
94+
find an action button to *Update tracking state* so the state will be updated from
95+
the Schenker API.
96+
97+
Debugging
98+
~~~~~~~~~
99+
100+
The API calls and responses are tracked in two special fields in the picking that can
101+
be viewed by technical users. You can also log them in as `ir.logging` records setting
102+
the carrier debug on from the smart button.
103+
104+
Known issues / Roadmap
105+
======================
106+
107+
* There's no dummy access key to test API calls so no tests can be performed.
108+
* The test booking and shipping APIs databases aren't connected so it isn't possible to
109+
perform trackings on test mode.
110+
* Only land shipping is implemented, although the module is prepared for extend to
111+
air and ocean just considering the mandatory request fields for those methods.
112+
Some additional adaptations could be needed (e.g.: origin and destination airport,
113+
port) anyway.
114+
* Only volume is supported as a measure unit and with the limitations of Odoo itself. To
115+
enjoy a full fledged volume support, install and configure the OCA’s
116+
`stock_quant_package_dimension` module and its dependencies. The connector is ready to
117+
make use of their volume computations.
118+
* It’d be needed to extend the method to support Schenker measure units such as loading
119+
pieces or pallet space.
120+
* Some more booking features aren’t yet supported although can be extended in the
121+
future. Some of those, although the complete list would be really extensive:
122+
123+
* Dangerous goods.
124+
* Driver pre-advise.
125+
* Transport temperature.
126+
* Customs clearance.
127+
* Cargo insurance.
128+
* Cash on delivery.
129+
130+
Bug Tracker
131+
===========
132+
133+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
134+
In case of trouble, please check there if your issue has already been reported.
135+
If you spotted it first, help us smashing it by providing a detailed and welcomed
136+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_schenker%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
137+
138+
Do not contact contributors directly about support or help with technical issues.
139+
140+
Credits
141+
=======
142+
143+
Authors
144+
~~~~~~~
145+
146+
* Tecnativa
147+
* Studio73
148+
149+
Contributors
150+
~~~~~~~~~~~~
151+
152+
* `Tecnativa <https://www.tecnativa.com>`_:
153+
154+
* David Vidal
155+
156+
* `Studio73 <https://www.studio73.es>`_:
157+
158+
* Ethan Hildick
159+
* Ferran Mora
160+
161+
* Michael Tietz (MT Software) <mtietz@mt-software.de>
162+
163+
Maintainers
164+
~~~~~~~~~~~
165+
166+
This module is maintained by the OCA.
167+
168+
.. image:: https://odoo-community.org/logo.png
169+
:alt: Odoo Community Association
170+
:target: https://odoo-community.org
171+
172+
OCA, or the Odoo Community Association, is a nonprofit organization whose
173+
mission is to support the collaborative development of Odoo features and
174+
promote its widespread use.
175+
176+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/14.0/delivery_schenker>`_ project on GitHub.
177+
178+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

delivery_schenker/__init__.py

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

delivery_schenker/__manifest__.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2021 Tecnativa - David Vidal
2+
# Copyright 2021 Studio73 - Ethan Hildick <ethan@studio73.es>
3+
# Copyright 2023 Studio73 - Ferran Mora <ferran@studio73.es>
4+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
5+
{
6+
"name": "Delivery Schenker",
7+
"summary": "Delivery Carrier implementation for DB Schenker API",
8+
"version": "16.0.1.0.0",
9+
"category": "Stock",
10+
"website": "https://github.com/OCA/delivery-carrier",
11+
"author": "Tecnativa, Studio73, Odoo Community Association (OCA)",
12+
"license": "AGPL-3",
13+
"application": False,
14+
"installable": True,
15+
"depends": ["delivery_package_number", "delivery_state"],
16+
"external_dependencies": {"python": ["zeep"]},
17+
"data": [
18+
"views/delivery_schenker_view.xml",
19+
"views/stock_picking_views.xml",
20+
"data/delivery_schenker_data.xml",
21+
],
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
<?xml version='1.0' encoding='UTF-8'?><definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://www.schenker.com/Booking/v1_1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="BookingWebService" targetNamespace="http://www.schenker.com/Booking/v1_1">
2+
<types>
3+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://www.schenker.com/Booking/v1_1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
4+
5+
<xsd:import namespace="http://www.schenker.com/Booking/v1_1" schemaLocation="https://eschenker-fat.dbschenker.com/webservice/bookingWebServiceV1_1?xsd=BookingWebService_v1.1.xsd"/>
6+
7+
</xsd:schema>
8+
</types>
9+
<message name="getBookingRequestLand">
10+
<part element="tns:getBookingRequestLand" name="parameters">
11+
</part>
12+
</message>
13+
<message name="getBookingRequestOceanFCL">
14+
<part element="tns:getBookingRequestOceanFCL" name="parameters">
15+
</part>
16+
</message>
17+
<message name="getBookingCancelRequest">
18+
<part element="tns:getBookingCancelRequest" name="parameters">
19+
</part>
20+
</message>
21+
<message name="getBookingResponse">
22+
<part element="tns:getBookingResponse" name="parameters">
23+
</part>
24+
</message>
25+
<message name="getBookingBarcodeResponse">
26+
<part element="tns:getBookingBarcodeResponse" name="parameters">
27+
</part>
28+
</message>
29+
<message name="getBookingRequestAir">
30+
<part element="tns:getBookingRequestAir" name="parameters">
31+
</part>
32+
</message>
33+
<message name="schenkerServiceException">
34+
<part element="tns:schenkerServiceException" name="fault">
35+
</part>
36+
</message>
37+
<message name="getBookingBarcodeRequest">
38+
<part element="tns:getBookingBarcodeRequest" name="parameters">
39+
</part>
40+
</message>
41+
<message name="getBookingCancelResponse">
42+
<part element="tns:getBookingCancelResponse" name="parameters">
43+
</part>
44+
</message>
45+
<message name="getBookingRequestOceanLCL">
46+
<part element="tns:getBookingRequestOceanLCL" name="parameters">
47+
</part>
48+
</message>
49+
<portType name="BookingWebService">
50+
<documentation>Booking Web Service to create Land, Ocean and Air bookings</documentation>
51+
<operation name="getBookingRequestLand">
52+
<documentation>Booking Web Service operation to create Land bookings</documentation>
53+
<input message="tns:getBookingRequestLand" name="in" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingRequestLand">
54+
</input>
55+
<output message="tns:getBookingResponse" name="out" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/getBookingResponseLand">
56+
</output>
57+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
58+
</fault>
59+
</operation>
60+
<operation name="getBookingRequestAir">
61+
<documentation>Booking Web Service operation to create Air bookings</documentation>
62+
<input message="tns:getBookingRequestAir" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingRequestAir">
63+
</input>
64+
<output message="tns:getBookingResponse" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/getBookingResponseAir">
65+
</output>
66+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
67+
</fault>
68+
</operation>
69+
<operation name="getBookingRequestOceanLCL">
70+
<documentation>Booking Web Service operation to create Ocean LCL bookings</documentation>
71+
<input message="tns:getBookingRequestOceanLCL" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingRequestOceanLCL">
72+
</input>
73+
<output message="tns:getBookingResponse" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/getBookingResponseOcean">
74+
</output>
75+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
76+
</fault>
77+
</operation>
78+
<operation name="getBookingRequestOceanFCL">
79+
<documentation>Booking Web Service operation to create Ocean FCL bookings</documentation>
80+
<input message="tns:getBookingRequestOceanFCL" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingRequestOceanFCL">
81+
</input>
82+
<output message="tns:getBookingResponse" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/OceanResponse">
83+
</output>
84+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
85+
</fault>
86+
</operation>
87+
<operation name="getBookingBarcodeRequest">
88+
<documentation>Booking Web Service operation to get a barcode based on a booking id</documentation>
89+
<input message="tns:getBookingBarcodeRequest" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingBarcodeRequest">
90+
</input>
91+
<output message="tns:getBookingBarcodeResponse" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/BarcodeResponse">
92+
</output>
93+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
94+
</fault>
95+
</operation>
96+
<operation name="getBookingCancelRequest">
97+
<documentation>Booking Web Service operation to cancel a booking by booking id</documentation>
98+
<input message="tns:getBookingCancelRequest" wsam:Action="http://www.schenker.com/Booking/v1_1/getBookingCancelRequest">
99+
</input>
100+
<output message="tns:getBookingCancelResponse" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/CancelResponse">
101+
</output>
102+
<fault message="tns:schenkerServiceException" name="SchenkerServiceException" wsam:Action="http://www.schenker.com/Booking/v1_1/BookingWebService/Fault/SchenkerServiceException">
103+
</fault>
104+
</operation>
105+
</portType>
106+
<binding name="BookingWebServiceServiceSOAPBinding" type="tns:BookingWebService">
107+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
108+
<operation name="getBookingRequestLand">
109+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingRequestLand"/>
110+
<input>
111+
<soap:body use="literal"/>
112+
</input>
113+
<output>
114+
<soap:body use="literal"/>
115+
</output>
116+
<fault name="SchenkerServiceException">
117+
<soap:fault name="SchenkerServiceException" use="literal"/>
118+
</fault>
119+
</operation>
120+
<operation name="getBookingRequestAir">
121+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingRequestAir"/>
122+
<input>
123+
<soap:body use="literal"/>
124+
</input>
125+
<output>
126+
<soap:body use="literal"/>
127+
</output>
128+
<fault name="SchenkerServiceException">
129+
<soap:fault name="SchenkerServiceException" use="literal"/>
130+
</fault>
131+
</operation>
132+
<operation name="getBookingRequestOceanLCL">
133+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingRequestOceanLCL"/>
134+
<input>
135+
<soap:body use="literal"/>
136+
</input>
137+
<output>
138+
<soap:body use="literal"/>
139+
</output>
140+
<fault name="SchenkerServiceException">
141+
<soap:fault name="SchenkerServiceException" use="literal"/>
142+
</fault>
143+
</operation>
144+
<operation name="getBookingRequestOceanFCL">
145+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingRequestOceanFCL"/>
146+
<input>
147+
<soap:body use="literal"/>
148+
</input>
149+
<output>
150+
<soap:body use="literal"/>
151+
</output>
152+
<fault name="SchenkerServiceException">
153+
<soap:fault name="SchenkerServiceException" use="literal"/>
154+
</fault>
155+
</operation>
156+
<operation name="getBookingBarcodeRequest">
157+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingBarcodeRequest"/>
158+
<input>
159+
<soap:body use="literal"/>
160+
</input>
161+
<output>
162+
<soap:body use="literal"/>
163+
</output>
164+
<fault name="SchenkerServiceException">
165+
<soap:fault name="SchenkerServiceException" use="literal"/>
166+
</fault>
167+
</operation>
168+
<operation name="getBookingCancelRequest">
169+
<soap:operation soapAction="http://www.schenker.com/Booking/v1_1/getBookingCancelRequest"/>
170+
<input>
171+
<soap:body use="literal"/>
172+
</input>
173+
<output>
174+
<soap:body use="literal"/>
175+
</output>
176+
<fault name="SchenkerServiceException">
177+
<soap:fault name="SchenkerServiceException" use="literal"/>
178+
</fault>
179+
</operation>
180+
</binding>
181+
<service name="BookingWebService">
182+
<port binding="tns:BookingWebServiceServiceSOAPBinding" name="BookingWebServiceServiceSOAPBinding">
183+
<soap:address location="https://eschenker-fat.dbschenker.com/webservice/bookingWebServiceV1_1"/>
184+
</port>
185+
</service>
186+
</definitions>

0 commit comments

Comments
 (0)