Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0] [MIG] delivery_postlogistics: Migration to 18.0 #940

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
bbbbb95
[MOV] change module name, prepare to change file structure
hailangvn Jun 8, 2021
9b38a61
[REF] delivery_carrier_label_postlogistics becomes delivery_postlogis…
phuctranfxvn Apr 14, 2021
16742bf
delivery_postlogistics: avoid duplication of labels
sebalix Apr 15, 2021
57a7177
delivery_postlogistics: add pack_weight parameter on _prepare_attributes
santostelmo Mar 29, 2021
952d657
delivery_postlogistics: several fixes
sebalix May 3, 2021
7a9f60c
delivery_postlogistics: Refactor tests
mmequignon Apr 16, 2021
398450d
Do not send disallowed chars on postlogistics api
mmequignon Apr 15, 2021
26065c6
delivery_postlogistics: Handle case where no label is returned by the…
mmequignon Jun 9, 2021
89a8394
[13.0] delivery_postlogistics: Add disallowed chars
mmequignon Jul 21, 2021
dbd4052
[IMP] *: pre-commit execution
joao-p-marques Aug 5, 2021
4f4c3f7
[FIX] delivery_postlogistics: remove obsoleted code, get sale pickings
hailangvn Oct 11, 2021
dfff590
[MIG] delivery_postlogistics: Migration to 14.0
hailangvn Jun 21, 2021
b7898aa
[FIX] delivery_postlogistics: avoid overriding attach_shipping_label…
hailangvn Jan 19, 2022
38efae1
delivery_postlogistics: Reproduce issue
mmequignon Jan 31, 2022
89bd8d1
delivery_postlogistics: Fix bool has no attr split()
mmequignon Jan 31, 2022
5dcfe89
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
4308e05
delivery_postlogistics 14.0.1.0.1
OCA-git-bot Apr 4, 2022
3c8371a
delivery_postlogistics 14.0.1.0.2
OCA-git-bot Apr 7, 2022
8d9143b
Add delivery_postlogistics_dangerous_goods
mmequignon Mar 11, 2021
e39c7a9
[16.0][MIG] delivery_postlogistics: Migration to 16.0
lehoangan Mar 9, 2023
b6c00e1
[UPD] Update delivery_postlogistics.pot
Apr 12, 2023
2098e5a
[UPD] README.rst
OCA-git-bot Apr 12, 2023
95199a4
[FIX] correct customer and recipient depending on picking code
ajaniszewska-dev Jun 27, 2023
3129f81
[FIX] Add validation for recipient's name and street
ajaniszewska-dev Jun 28, 2023
47145fc
[FIX] Add validation for recipient's city and zip
ajaniszewska-dev Jul 10, 2023
6c86b01
[IMP] add button Create Shipping Label
khoivo1601 Jun 20, 2023
a995cd2
[IMP] use native button Print return label for Returns
Jul 11, 2023
923d5dd
[IMP] returns: use same carrier as the original picking by default
Jul 11, 2023
fcca848
[UPD] Update delivery_postlogistics.pot
Jul 12, 2023
55e36a9
delivery_postlogistics 16.0.1.0.1
OCA-git-bot Jul 12, 2023
ac06c09
[fix] delivery_postlogistics: address street order
Jul 4, 2023
47a7ec9
delivery_postlogistics 16.0.1.0.2
OCA-git-bot Jul 18, 2023
2cc3ac9
Added translation using Weblate (Spanish)
Ivorra78 Aug 2, 2023
542b89e
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
f02a34d
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
7289c6c
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9ad9f10
[FIX] delivery_postlogistics: pylint error W8120(translation-position…
RodrigoBM Oct 3, 2023
20c96e0
[UPD] Update delivery_postlogistics.pot
Oct 3, 2023
a4f5821
[BOT] post-merge updates
OCA-git-bot Oct 3, 2023
4d30668
Update translation files
weblate Oct 9, 2023
ba926d8
postlogistics: Set customer name mandatory
mmequignon Aug 23, 2023
28aa1a9
[UPD] Update delivery_postlogistics.pot
Oct 9, 2023
76f36f1
[BOT] post-merge updates
OCA-git-bot Oct 9, 2023
ed21d83
Update translation files
weblate Oct 9, 2023
e654721
Translated using Weblate (Spanish)
Ivorra78 Oct 9, 2023
9c22361
[16.0][FIX] delivery_postlogistics: splitting package label by package
Apr 16, 2024
b729aeb
Added translation using Weblate (Italian)
mymage May 6, 2024
599746e
[BOT] post-merge updates
OCA-git-bot May 18, 2024
0d43b8d
delivery_postlogistics: Trim return address according to API limitation
grindtildeath Jun 20, 2024
6d1bb8e
[BOT] post-merge updates
OCA-git-bot Jun 20, 2024
3844287
postlogistics: use parent name on customer if not set
mmequignon Nov 6, 2023
35d1a29
[BOT] post-merge updates
OCA-git-bot Jun 21, 2024
4b8b00d
[UPD] Update delivery_postlogistics.pot
Jul 1, 2024
56cdb3d
Update translation files
weblate Jul 1, 2024
f5ae43e
[UPD] Update delivery_postlogistics.pot
Sep 9, 2024
a8770f1
[BOT] post-merge updates
OCA-git-bot Sep 9, 2024
ec73a0c
Update translation files
weblate Sep 9, 2024
0cd0484
[FIX] delivery_postlogistics: Change sender limit to 25 chars
grindtildeath Sep 10, 2024
8d8316c
[BOT] post-merge updates
OCA-git-bot Sep 11, 2024
5eca629
[FIX] delivery_postlogistics: raise exception when no token received
ajaniszewska-dev Oct 29, 2024
177a001
[UPD] Update delivery_postlogistics.pot
Nov 11, 2024
905312b
[BOT] post-merge updates
OCA-git-bot Nov 11, 2024
11b38f2
Update translation files
weblate Nov 11, 2024
1cb22c7
Fix access to not-existing record self after rollback
guewen Jun 8, 2023
f4ede36
delivery_postlogistics: improve rendering of error messages
sebalix Aug 25, 2023
45ea0f0
delivery_postlogistics: fix 'sanitize_strings' to always return strings
sebalix Aug 28, 2023
18ae35f
[FIX] delivery_postlogistics: hide key secret on view
sebalix Nov 17, 2023
26e2be2
delivery_postlogistics: fix test sanitize values
henrybackman Nov 21, 2024
5fdacb5
[UPD] Update delivery_postlogistics.pot
Nov 28, 2024
c42fcac
[BOT] post-merge updates
OCA-git-bot Nov 28, 2024
aa463d1
Update translation files
weblate Nov 28, 2024
5293e95
[IMP] delivery_postlogistics: pre-commit auto fixes
bizzappdev Jan 20, 2025
df17089
[MIG] delivery_postlogistics: Migration to 18.0
bizzappdev Jan 28, 2025
aae5629
[ADD]test-requirements.txt
bizzappdev Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions delivery_postlogistics/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
==============================================
PostLogistics Shipping - “Barcode” web service
==============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9d078ad6b2092c6e36929b761e1500a8605156e02fadc930202cbe8da8831445
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_postlogistics
:alt: OCA/delivery-carrier
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_postlogistics
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module uses `PostLogistics BarCodes
WebService <https://www.post.ch/en/business/a-z-of-subjects/dropping-off-mail-items/business-sending-letters/sending-consignments-web-service-barcode>`__
to generate labels for your Delivery Orders.

It adds a Create label button on Delivery Orders. A generated label will
be an attachement of your Delivery Order.

To see it, please install documents module.

You can create multiple delivery method to match your diffent package
types.

**Table of contents**

.. contents::
:local:

Configuration
=============

Important

A "Swiss Post Business customer" account is required to use this module.

See `Log in <https://account.post.ch/selfadmin/?login&lang=en>`__

To configure:

- Go to Inventory -> Configuration -> Delivery -> Shipping Methods
- Create new shipping methods for PostLogistics and set your login
informations in the "PostLogistics" tab
- Go to Inventory -> Configuration -> Delivery -> Delivery Packages to
create the PostLogistics delivery packaging with the relevant Package
Code (see section 8.10 of
https://developer.post.ch/en/digital-commerce-api for available codes)

Technical references
--------------------

`"Barcode" web service
documentation <https://www.post.ch/en/business/a-z-of-subjects/dropping-off-mail-items/business-sending-letters/barcode-support>`__

Known issues / Roadmap
======================

- Integration of price webservice :
https://www.post.ch/en/customer-center/all-online-services/preise-berechnen/info
- Not sure if the recursive patch of suds is still needed as there's no
need to use the integration WS anymore. However we still want to patch
open to get meaningful error messages.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_postlogistics%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- Yannick Vaucher <[email protected]>

- Guewen Baconnier <[email protected]>

- Akim Juillerat <[email protected]>

- Julien Coux <[email protected]>

- Dung Tran <[email protected]>

- Phuc Tran <[email protected]>

- Jacques-Etienne Baudoux <[email protected]>

- `Trobz <https://trobz.com>`__:

- Jack Le <[email protected]>

Other credits
-------------

The development of this module in version 14.0 and its migration from
14.0 to 16.0 has been financially supported by:

- Camptocamp

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_postlogistics>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions delivery_postlogistics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import postlogistics
from . import wizard
29 changes: 29 additions & 0 deletions delivery_postlogistics/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# © 2013-2016 Yannick Vaucher (Camptocamp SA)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "PostLogistics Shipping - “Barcode” web service",
"summary": "Print PostLogistics shipping labels using the Barcode web service",
"version": "18.0.1.0.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"maintainer": "Camptocamp",
"license": "AGPL-3",
"category": "Delivery",
"complexity": "normal",
"depends": ["stock_delivery"],
Copy link

@StephaneMangin StephaneMangin Feb 10, 2025

Choose a reason for hiding this comment

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

Suggested change
"depends": ["stock_delivery"],
"depends": [
"stock_delivery",
"base_delivery_carrier_label",
"delivery_carrier_shipping_label"
],

Please, we need to be closer to the future label management. (Several other delivery carriers implementation will benefits from it)

"website": "https://github.com/OCA/delivery-carrier",
"data": [
"security/ir.model.access.csv",
"data/partner.xml",
"data/product.xml",
"data/delivery.xml",
"views/delivery.xml",
"views/stock_package_type_view.xml",
"views/stock_quant_package_view.xml",
"views/postlogistics_license.xml",
"views/res_partner_view.xml",
"views/stock.xml",
],
"installable": True,
"auto_install": False,
"application": True,
}
Binary file added delivery_postlogistics/data/barcode handbuch.PDF
Binary file not shown.
132 changes: 132 additions & 0 deletions delivery_postlogistics/data/delivery.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Label layouts -->
<record
id="postlogistics_layout_option_a7"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">Format A7</field>
<field name="code">A7</field>
<field name="postlogistics_type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_a6"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">Format A6</field>
<field name="code">A6</field>
<field name="postlogistics_type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_a5"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">Format A5</field>
<field name="code">A5</field>
<field name="postlogistics_type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_fe"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">Format FE</field>
<field name="code">FE</field>
<field name="postlogistics_type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<!-- Output formats -->
<record
id="postlogistics_output_format_option_eps"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">EPS</field>
<field name="code">EPS</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_gif"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">GIF</field>
<field name="code">GIF</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_jpg"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">JPG</field>
<field name="code">JPG</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_png"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">PNG</field>
<field name="code">PNG</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_pdf"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">PDF</field>
<field name="code">PDF</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_spdf"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">sPDF</field>
<field name="code">sPDF</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_zpl2"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">ZPL2</field>
<field name="code">ZPL2</field>
<field name="postlogistics_type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<!-- resolutions -->
<record
id="postlogistics_output_resolution_option_200ppp"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">200 ppp</field>
<field name="code">200</field>
<field name="postlogistics_type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_resolution_option_300ppp"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">300 ppp</field>
<field name="code">300</field>
<field name="postlogistics_type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_resolution_option_600ppp"
model="postlogistics.delivery.carrier.template.option"
>
<field name="name">600 ppp</field>
<field name="code">600</field>
<field name="postlogistics_type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
</odoo>
14 changes: 14 additions & 0 deletions delivery_postlogistics/data/partner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="partner_postlogistics" model="res.partner">
<field name="name">PostLogistics</field>
<field
name="image_1920"
type="base64"
file="delivery_postlogistics/static/img/postlogistics-logo.jpg"
/>
<field name="email">[email protected]</field>
</record>
</odoo>
17 changes: 17 additions & 0 deletions delivery_postlogistics/data/product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="product_postlogistics_service" model="product.product">
<field
name="image_1920"
type="base64"
file="delivery_postlogistics/static/img/postlogistics-logo.jpg"
/>
<field name="name">PostLogistics Delivery</field>
<field name="type">service</field>
<field name="sale_ok" eval="False" />
<field name="invoice_policy">order</field>
<field name="expense_policy">no</field>
</record>
</odoo>
Loading