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

[17.0][MIG] delivery_postlogistics: Migration to 17.0 #850

Draft
wants to merge 37 commits into
base: 17.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3ff3c2f
[MOV] change module name, prepare to change file structure
hailangvn Jun 8, 2021
b59b555
[REF] delivery_carrier_label_postlogistics becomes delivery_postlogis…
phuctranfxvn Apr 14, 2021
b059276
delivery_postlogistics: avoid duplication of labels
sebalix Apr 15, 2021
298fc7f
delivery_postlogistics: add pack_weight parameter on _prepare_attributes
santostelmo Mar 29, 2021
783ab75
delivery_postlogistics: several fixes
sebalix May 3, 2021
208ce86
delivery_postlogistics: Refactor tests
mmequignon Apr 16, 2021
2946b7c
Do not send disallowed chars on postlogistics api
mmequignon Apr 15, 2021
fee9a00
delivery_postlogistics: Handle case where no label is returned by the…
mmequignon Jun 9, 2021
a7852b8
[13.0] delivery_postlogistics: Add disallowed chars
mmequignon Jul 21, 2021
108a3dd
[IMP] *: pre-commit execution
joao-p-marques Aug 5, 2021
2c7ae54
[FIX] delivery_postlogistics: remove obsoleted code, get sale pickings
hailangvn Oct 11, 2021
b763870
[MIG] delivery_postlogistics: Migration to 14.0
hailangvn Jun 21, 2021
1152d57
[FIX] delivery_postlogistics: avoid overriding attach_shipping_label…
hailangvn Jan 19, 2022
8d740c7
delivery_postlogistics: Reproduce issue
mmequignon Jan 31, 2022
58d083f
delivery_postlogistics: Fix bool has no attr split()
mmequignon Jan 31, 2022
ea25558
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
2c75663
delivery_postlogistics 14.0.1.0.1
OCA-git-bot Apr 4, 2022
2aca578
delivery_postlogistics 14.0.1.0.2
OCA-git-bot Apr 7, 2022
9714b4f
Add delivery_postlogistics_dangerous_goods
mmequignon Mar 11, 2021
56fbab4
[16.0][MIG] delivery_postlogistics: Migration to 16.0
lehoangan Mar 9, 2023
0e1eacb
[UPD] Update delivery_postlogistics.pot
Apr 12, 2023
f604064
[UPD] README.rst
OCA-git-bot Apr 12, 2023
8b80323
[FIX] correct customer and recipient depending on picking code
ajaniszewska-dev Jun 27, 2023
5a1b86b
[FIX] Add validation for recipient's name and street
ajaniszewska-dev Jun 28, 2023
0132ae0
[FIX] Add validation for recipient's city and zip
ajaniszewska-dev Jul 10, 2023
f5eae20
delivery_postlogistics 16.0.1.0.1
OCA-git-bot Jul 12, 2023
218ae0c
[fix] delivery_postlogistics: address street order
Jul 4, 2023
8eed8f3
delivery_postlogistics 16.0.1.0.2
OCA-git-bot Jul 18, 2023
748ae68
[FIX] delivery_postlogistics: pylint error W8120(translation-position…
RodrigoBM Oct 3, 2023
904189a
postlogistics: Set customer name mandatory
mmequignon Aug 23, 2023
c380b94
Translated using Weblate (Spanish)
Ivorra78 Oct 9, 2023
f2e3fd5
[16.0][FIX] delivery_postlogistics: splitting package label by package
Apr 16, 2024
86e5786
Added translation using Weblate (Italian)
mymage May 6, 2024
75f503b
delivery_postlogistics: Trim return address according to API limitation
grindtildeath Jun 20, 2024
7fdb0c7
postlogistics: use parent name on customer if not set
mmequignon Nov 6, 2023
41bb304
[IMP] delivery_postlogistics: pre-commit stuff
BT-dmoreno Jul 5, 2024
7e5d3e6
[MIG] delivery_postlogistics: Migration to 17.0
BT-dmoreno Jul 5, 2024
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
148 changes: 148 additions & 0 deletions delivery_postlogistics/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
==============================================
PostLogistics Shipping - “Barcode” web service
==============================================

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

.. |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/17.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-17-0/delivery-carrier-17-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=17.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:%2017.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>

- David Moreno <david.moreno@braintec.com>

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/17.0/delivery_postlogistics>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions delivery_postlogistics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import postlogistics
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": "17.0.1.0.7",
"author": "Camptocamp,Odoo Community Association (OCA)",
"maintainer": "Camptocamp",
"license": "AGPL-3",
"category": "Delivery",
"complexity": "normal",
"depends": ["mail", "base", "stock_delivery"],
"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">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
Loading