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

Open
wants to merge 38 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
037d173
[MOV] change module name, prepare to change file structure
hailangvn Jun 8, 2021
e81f5cb
[REF] delivery_carrier_label_postlogistics becomes delivery_postlogis…
phuctranfxvn Apr 14, 2021
2d38c86
delivery_postlogistics: avoid duplication of labels
sebalix Apr 15, 2021
96681e9
delivery_postlogistics: add pack_weight parameter on _prepare_attributes
santostelmo Mar 29, 2021
80a130c
delivery_postlogistics: several fixes
sebalix May 3, 2021
e1df74e
delivery_postlogistics: Refactor tests
mmequignon Apr 16, 2021
ba9f5c9
Do not send disallowed chars on postlogistics api
mmequignon Apr 15, 2021
0d028b1
delivery_postlogistics: Handle case where no label is returned by the…
mmequignon Jun 9, 2021
b945fba
[13.0] delivery_postlogistics: Add disallowed chars
mmequignon Jul 21, 2021
1d7d007
[IMP] *: pre-commit execution
joao-p-marques Aug 5, 2021
c284b90
[FIX] delivery_postlogistics: remove obsoleted code, get sale pickings
hailangvn Oct 11, 2021
650232e
[MIG] delivery_postlogistics: Migration to 14.0
hailangvn Jun 21, 2021
07b484e
[FIX] delivery_postlogistics: avoid overriding attach_shipping_label…
hailangvn Jan 19, 2022
ec605ac
delivery_postlogistics: Reproduce issue
mmequignon Jan 31, 2022
479cf47
delivery_postlogistics: Fix bool has no attr split()
mmequignon Jan 31, 2022
37c67bc
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
84dbaf6
delivery_postlogistics 14.0.1.0.1
OCA-git-bot Apr 4, 2022
59db64a
delivery_postlogistics 14.0.1.0.2
OCA-git-bot Apr 7, 2022
ee1d4a8
Add delivery_postlogistics_dangerous_goods
mmequignon Mar 11, 2021
1f06ed4
[16.0][MIG] delivery_postlogistics: Migration to 16.0
lehoangan Mar 9, 2023
b26e7d6
[UPD] Update delivery_postlogistics.pot
Apr 12, 2023
38bdcc3
[UPD] README.rst
OCA-git-bot Apr 12, 2023
cdf8a12
[FIX] correct customer and recipient depending on picking code
ajaniszewska-dev Jun 27, 2023
a524f70
[FIX] Add validation for recipient's name and street
ajaniszewska-dev Jun 28, 2023
2370b0c
[FIX] Add validation for recipient's city and zip
ajaniszewska-dev Jul 10, 2023
6b88771
delivery_postlogistics 16.0.1.0.1
OCA-git-bot Jul 12, 2023
a89fc4d
[fix] delivery_postlogistics: address street order
Jul 4, 2023
a66a04c
delivery_postlogistics 16.0.1.0.2
OCA-git-bot Jul 18, 2023
efd2b08
[FIX] delivery_postlogistics: pylint error W8120(translation-position…
RodrigoBM Oct 3, 2023
960cbdd
postlogistics: Set customer name mandatory
mmequignon Aug 23, 2023
a661349
Translated using Weblate (Spanish)
Ivorra78 Oct 9, 2023
c5801f8
[16.0][FIX] delivery_postlogistics: splitting package label by package
Apr 16, 2024
4fbc258
Added translation using Weblate (Italian)
mymage May 6, 2024
2a6b0b1
delivery_postlogistics: Trim return address according to API limitation
grindtildeath Jun 20, 2024
b2b3591
postlogistics: use parent name on customer if not set
mmequignon Nov 6, 2023
aafff63
[IMP] delivery_postlogistics: pre-commit stuff
BT-dmoreno Jul 5, 2024
e4b4f62
[MIG] delivery_postlogistics: Migration to 17.0
BT-dmoreno Jul 5, 2024
dd17057
Merge remote-tracking branch 'refs/remotes/OCA/17.0' into 17.0-mig-de…
BT-dmoreno Aug 26, 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 <[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]>

- David Moreno <[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/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">[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
Loading