[MIG][REF] delivery_carrier_label_gls#376
Conversation
|
@chienandalu is this webservice the same as the Spanish one? |
|
@pedrobaeza AFAIK this is supposed to be the international API, except for France (they use a Minitel-based protocol probably). Is there already an implementation? |
|
Oh thanks for the pointer. |
|
The one in Spanish localization is AFAIK inherited from the old carrier (ASM) that was absorbed by GLS. |
eabc3ca to
1e6462f
Compare
f809d0d to
b7661bd
Compare
| } | ||
| ], | ||
| u"PickupLocation": u"BE7100", | ||
| u"PrintData": [{u"Data": u"JVeryLongString==", u"LabelFormat": u"PDF"}], |
There was a problem hiding this comment.
@len-foss The LabelFormat should be configurable on the carrier info
287d5de to
27a4be8
Compare
Note that the international API is not available everywhere, notably not in France, but available in Belgium, Luxembourg, Germany, Austria. Ask your local GLS for the availability of the web service.
Note: dependent on odoo/odoo#54321 to actually work.
…at for the delivery label
…delivery carrier Adds constraint to check valid configuration of GLS carriers. Also check that no GLS parameters are set on non_GLS carriers, to avoid incorrect configuration. Remove related fields and config to simplify the code and checks.
The GLS API does not accept weights under 100g, so we automatically integrate that constraint.
…heriting module tests
GLS does not tolerate common ways to write ZIP codes. We introduce automatic normalization for a few countries which can be completeted as necessary.
Although GLS knows Monaco, their system accepts more options if the same Monacan address is sent with country set as FR. This makes absolutely no sense, of course.
|
@len-foss Could you check Travis errors (flake8 and pylint) |
|
|
||
| def _check_is_everything_packaged(self): | ||
| for picking in self: | ||
| if not all(o.result_package_id for o in picking.pack_operation_product_ids): |
There was a problem hiding this comment.
@len-foss what about pack_operation_pack_ids?
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
It's actually essentially rewritten from scratch to use the REST API.
It's available in multiple countries, including Belux, Germany, Austria, excluding France.
You need to contact GLS to check if it is available in your country, as they seem unable to provide the complete list.
Caution:
The API does not offer any idempotent way to make the calls, so any lost call to "createParcel" will be invoiced, even if the parcel is never shipped (wew lad!). Therefore, a call to cancelShipment should be done in case there is a rollback.
However this was only done in odoo/odoo#54321, so you need to pull it in your sources if you want that safety net.