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 #974

Open
wants to merge 74 commits into
base: 18.0
Choose a base branch
from
Open
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
4987ffb
[MOV] change module name, prepare to change file structure
hailangvn Jun 8, 2021
52d0845
[REF] delivery_carrier_label_postlogistics becomes delivery_postlogis…
phuctranfxvn Apr 14, 2021
c733242
delivery_postlogistics: avoid duplication of labels
sebalix Apr 15, 2021
d96acb9
delivery_postlogistics: add pack_weight parameter on _prepare_attributes
santostelmo Mar 29, 2021
82b1311
delivery_postlogistics: several fixes
sebalix May 3, 2021
730d0b5
delivery_postlogistics: Refactor tests
mmequignon Apr 16, 2021
e0787e6
Do not send disallowed chars on postlogistics api
mmequignon Apr 15, 2021
022c25c
delivery_postlogistics: Handle case where no label is returned by the…
mmequignon Jun 9, 2021
7b3e9a3
[13.0] delivery_postlogistics: Add disallowed chars
mmequignon Jul 21, 2021
5ee7d66
[IMP] *: pre-commit execution
joao-p-marques Aug 5, 2021
f4b6f18
[FIX] delivery_postlogistics: remove obsoleted code, get sale pickings
hailangvn Oct 11, 2021
4683ed1
[MIG] delivery_postlogistics: Migration to 14.0
hailangvn Jun 21, 2021
bfa1af8
[FIX] delivery_postlogistics: avoid overriding attach_shipping_label…
hailangvn Jan 19, 2022
1272197
delivery_postlogistics: Reproduce issue
mmequignon Jan 31, 2022
cddcec2
delivery_postlogistics: Fix bool has no attr split()
mmequignon Jan 31, 2022
b6de254
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
70bb925
delivery_postlogistics 14.0.1.0.1
OCA-git-bot Apr 4, 2022
3ab66ef
delivery_postlogistics 14.0.1.0.2
OCA-git-bot Apr 7, 2022
14de4ae
Add delivery_postlogistics_dangerous_goods
mmequignon Mar 11, 2021
1caae0b
[16.0][MIG] delivery_postlogistics: Migration to 16.0
lehoangan Mar 9, 2023
5798670
[UPD] Update delivery_postlogistics.pot
Apr 12, 2023
d3b45f9
[UPD] README.rst
OCA-git-bot Apr 12, 2023
388b064
[FIX] correct customer and recipient depending on picking code
ajaniszewska-dev Jun 27, 2023
c595375
[FIX] Add validation for recipient's name and street
ajaniszewska-dev Jun 28, 2023
0f9cb54
[FIX] Add validation for recipient's city and zip
ajaniszewska-dev Jul 10, 2023
83942a1
[IMP] add button Create Shipping Label
khoivo1601 Jun 20, 2023
d9475da
[IMP] use native button Print return label for Returns
Jul 11, 2023
838a358
[IMP] returns: use same carrier as the original picking by default
Jul 11, 2023
cd817e4
[UPD] Update delivery_postlogistics.pot
Jul 12, 2023
bca89ee
delivery_postlogistics 16.0.1.0.1
OCA-git-bot Jul 12, 2023
e3d2897
[fix] delivery_postlogistics: address street order
Jul 4, 2023
c52580a
delivery_postlogistics 16.0.1.0.2
OCA-git-bot Jul 18, 2023
e44c3f1
Added translation using Weblate (Spanish)
Ivorra78 Aug 2, 2023
7c5972c
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
3a21ed7
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
2ab8899
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9c8d5a0
[FIX] delivery_postlogistics: pylint error W8120(translation-position…
RodrigoBM Oct 3, 2023
c7a96ed
[UPD] Update delivery_postlogistics.pot
Oct 3, 2023
292d23b
[BOT] post-merge updates
OCA-git-bot Oct 3, 2023
d6d2be4
Update translation files
weblate Oct 9, 2023
1185219
postlogistics: Set customer name mandatory
mmequignon Aug 23, 2023
b3191e7
[UPD] Update delivery_postlogistics.pot
Oct 9, 2023
f72be6b
[BOT] post-merge updates
OCA-git-bot Oct 9, 2023
71ea49b
Update translation files
weblate Oct 9, 2023
9aa610f
Translated using Weblate (Spanish)
Ivorra78 Oct 9, 2023
e3fee5c
[16.0][FIX] delivery_postlogistics: splitting package label by package
Apr 16, 2024
b3972bd
Added translation using Weblate (Italian)
mymage May 6, 2024
f32d8c2
[BOT] post-merge updates
OCA-git-bot May 18, 2024
9820eff
delivery_postlogistics: Trim return address according to API limitation
grindtildeath Jun 20, 2024
085bb27
[BOT] post-merge updates
OCA-git-bot Jun 20, 2024
399d3b4
postlogistics: use parent name on customer if not set
mmequignon Nov 6, 2023
43bc213
[BOT] post-merge updates
OCA-git-bot Jun 21, 2024
d45f55a
[UPD] Update delivery_postlogistics.pot
Jul 1, 2024
221b70e
Update translation files
weblate Jul 1, 2024
c2455ae
[UPD] Update delivery_postlogistics.pot
Sep 9, 2024
4cc4e87
[BOT] post-merge updates
OCA-git-bot Sep 9, 2024
bac5b92
Update translation files
weblate Sep 9, 2024
3dd4a53
[FIX] delivery_postlogistics: Change sender limit to 25 chars
grindtildeath Sep 10, 2024
ec4a360
[BOT] post-merge updates
OCA-git-bot Sep 11, 2024
869be8a
[FIX] delivery_postlogistics: raise exception when no token received
ajaniszewska-dev Oct 29, 2024
29203ab
[UPD] Update delivery_postlogistics.pot
Nov 11, 2024
936f605
[BOT] post-merge updates
OCA-git-bot Nov 11, 2024
ac1a10f
Update translation files
weblate Nov 11, 2024
2aae8b5
Fix access to not-existing record self after rollback
guewen Jun 8, 2023
edc7146
delivery_postlogistics: improve rendering of error messages
sebalix Aug 25, 2023
c0e5b2a
delivery_postlogistics: fix 'sanitize_strings' to always return strings
sebalix Aug 28, 2023
f2f4d47
[FIX] delivery_postlogistics: hide key secret on view
sebalix Nov 17, 2023
9b5a1a5
delivery_postlogistics: fix test sanitize values
henrybackman Nov 21, 2024
1991b9a
[UPD] Update delivery_postlogistics.pot
Nov 28, 2024
567d8b2
[BOT] post-merge updates
OCA-git-bot Nov 28, 2024
c800dab
Update translation files
weblate Nov 28, 2024
d451805
[IMP] delivery_postlogistics: pre-commit auto fixes
bizzappdev Jan 20, 2025
1e18465
[MIG] delivery_postlogistics: Migration to 18.0
bizzappdev Jan 28, 2025
683d7fa
[IMP] stock_picking_delivery_link: missing test dependency
StephaneMangin Mar 18, 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
146 changes: 146 additions & 0 deletions delivery_postlogistics/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
==============================================
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 <yannick.vaucher@camptocamp.com>

- Guewen Baconnier <guewen.baconnier@camptocamp.com>

- Akim Juillerat <akim.juillerat@camptocamp.com>

- Julien Coux <julien.coux@camptocamp.com>

- Dung Tran <dungtd@trobz.com>

- Phuc Tran <phuc@trobz.com>

- Jacques-Etienne Baudoux <je@bcim.be>

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

- Jack Le <anlh@trobz.com>

- Stéphane Mangin stephane.mangin@camptocamp.com

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

The development of this module in version 14.0 and its migration from
14.0 to 16.0, 16.0 to 18.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
40 changes: 40 additions & 0 deletions delivery_postlogistics/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# © 2013 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",
"delivery_carrier_info",
"delivery_carrier_option",
"delivery_carrier_shipping_label",
],
"website": "https://github.com/OCA/delivery-carrier",
"data": [
"security/ir.model.access.csv",
"data/partner.xml",
"data/product.xml",
"data/delivery.xml",
"data/package_type.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,
"external_dependencies": {
"python": [
"openupgradelib",
],
},
}
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="delivery.carrier.template.option"
>
<field name="name">Format A7</field>
<field name="code">A7</field>
<field name="type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_a6"
model="delivery.carrier.template.option"
>
<field name="name">Format A6</field>
<field name="code">A6</field>
<field name="type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_a5"
model="delivery.carrier.template.option"
>
<field name="name">Format A5</field>
<field name="code">A5</field>
<field name="type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_layout_option_fe"
model="delivery.carrier.template.option"
>
<field name="name">Format FE</field>
<field name="code">FE</field>
<field name="type">label_layout</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<!-- Output formats -->
<record
id="postlogistics_output_format_option_eps"
model="delivery.carrier.template.option"
>
<field name="name">EPS</field>
<field name="code">EPS</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_gif"
model="delivery.carrier.template.option"
>
<field name="name">GIF</field>
<field name="code">GIF</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_jpg"
model="delivery.carrier.template.option"
>
<field name="name">JPG</field>
<field name="code">JPG</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_png"
model="delivery.carrier.template.option"
>
<field name="name">PNG</field>
<field name="code">PNG</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_pdf"
model="delivery.carrier.template.option"
>
<field name="name">PDF</field>
<field name="code">PDF</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_spdf"
model="delivery.carrier.template.option"
>
<field name="name">sPDF</field>
<field name="code">sPDF</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_format_option_zpl2"
model="delivery.carrier.template.option"
>
<field name="name">ZPL2</field>
<field name="code">ZPL2</field>
<field name="type">output_format</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<!-- resolutions -->
<record
id="postlogistics_output_resolution_option_200ppp"
model="delivery.carrier.template.option"
>
<field name="name">200 ppp</field>
<field name="code">200</field>
<field name="type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_resolution_option_300ppp"
model="delivery.carrier.template.option"
>
<field name="name">300 ppp</field>
<field name="code">300</field>
<field name="type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
<record
id="postlogistics_output_resolution_option_600ppp"
model="delivery.carrier.template.option"
>
<field name="name">600 ppp</field>
<field name="code">600</field>
<field name="type">resolution</field>
<field name="partner_id" ref="partner_postlogistics" />
</record>
</odoo>
11 changes: 11 additions & 0 deletions delivery_postlogistics/data/package_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2025 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="postlogistics_default_package_type" model="stock.package.type">
<field name="name">PostLogistics Default Package Type</field>
<field name="shipper_package_code">ECO</field>
<field name="package_carrier_type">postlogistics</field>
<field name="company_id" ref="base.main_company" />
</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">webservice@post.ch</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