Skip to content

[MIG][REF] delivery_carrier_label_gls#376

Closed
len-foss wants to merge 17 commits into
OCA:10.0from
acsone:10.0-gls-len
Closed

[MIG][REF] delivery_carrier_label_gls#376
len-foss wants to merge 17 commits into
OCA:10.0from
acsone:10.0-gls-len

Conversation

@len-foss
Copy link
Copy Markdown

@len-foss len-foss commented Jun 7, 2021

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.

@len-foss len-foss changed the title [MIG] delivery_carrier_label_gls [WIP][MIG] delivery_carrier_label_gls Jun 7, 2021
@pedrobaeza
Copy link
Copy Markdown
Member

@chienandalu is this webservice the same as the Spanish one?

@len-foss
Copy link
Copy Markdown
Author

len-foss commented Jun 7, 2021

@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?

@pedrobaeza
Copy link
Copy Markdown
Member

@len-foss
Copy link
Copy Markdown
Author

len-foss commented Jun 7, 2021

Oh thanks for the pointer.
It's definitely not the same API. I'll have to check in which countries this one can really be used.

@pedrobaeza
Copy link
Copy Markdown
Member

The one in Spanish localization is AFAIK inherited from the old carrier (ASM) that was absorbed by GLS.

@len-foss len-foss force-pushed the 10.0-gls-len branch 6 times, most recently from eabc3ca to 1e6462f Compare June 14, 2021 15:39
@len-foss len-foss changed the title [WIP][MIG] delivery_carrier_label_gls [MIG][REF] delivery_carrier_label_gls Jun 14, 2021
@len-foss len-foss force-pushed the 10.0-gls-len branch 2 times, most recently from f809d0d to b7661bd Compare June 15, 2021 16:02
}
],
u"PickupLocation": u"BE7100",
u"PrintData": [{u"Data": u"JVeryLongString==", u"LabelFormat": u"PDF"}],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@len-foss The LabelFormat should be configurable on the carrier info

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@len-foss len-foss force-pushed the 10.0-gls-len branch 11 times, most recently from 287d5de to 27a4be8 Compare June 24, 2021 09:17
nans added 3 commits June 28, 2021 11:27
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.
lmignon and others added 6 commits June 28, 2021 11:27
…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.
nans added 2 commits August 9, 2021 15:31
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.
@rousseldenis
Copy link
Copy Markdown
Contributor

@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):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@len-foss what about pack_operation_pack_ids?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2022

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 6, 2022
@github-actions github-actions Bot closed this Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement migration stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants