Skip to content

Commit 5293e95

Browse files
committed
[IMP] delivery_postlogistics: pre-commit auto fixes
1 parent aa463d1 commit 5293e95

17 files changed

+152
-132
lines changed

delivery_postlogistics/README.rst

+56-47
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ PostLogistics Shipping - “Barcode” web service
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
20-
:target: https://github.com/OCA/delivery-carrier/tree/16.0/delivery_postlogistics
20+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_postlogistics
2121
:alt: OCA/delivery-carrier
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/delivery-carrier-16-0/delivery-carrier-16-0-delivery_postlogistics
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_postlogistics
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

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

34-
It adds a `Create label` button on Delivery Orders.
35-
A generated label will be an attachement of your Delivery Order.
35+
It adds a Create label button on Delivery Orders. A generated label will
36+
be an attachement of your Delivery Order.
3637

3738
To see it, please install documents module.
3839

39-
You can create multiple delivery method to match your diffent package types.
40-
41-
.. _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
40+
You can create multiple delivery method to match your diffent package
41+
types.
4242

4343
**Table of contents**
4444

@@ -48,78 +48,87 @@ You can create multiple delivery method to match your diffent package types.
4848
Configuration
4949
=============
5050

51-
.. important::
52-
A "Swiss Post Business customer" account is required to use this module.
51+
Important
5352

54-
See `Log in`_
53+
A "Swiss Post Business customer" account is required to use this module.
5554

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

5757
To configure:
5858

59-
* Go to `Inventory -> Configuration -> Delivery -> Shipping Methods`
60-
* Create new shipping methods for PostLogistics and set your login informations in the "PostLogistics" tab
61-
* Go to `Inventory -> Configuration -> Delivery -> Delivery Packages` to create
62-
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)
63-
64-
.. _Log in: https://account.post.ch/selfadmin/?login&lang=en
59+
- Go to Inventory -> Configuration -> Delivery -> Shipping Methods
60+
- Create new shipping methods for PostLogistics and set your login
61+
informations in the "PostLogistics" tab
62+
- Go to Inventory -> Configuration -> Delivery -> Delivery Packages to
63+
create the PostLogistics delivery packaging with the relevant Package
64+
Code (see section 8.10 of
65+
https://developer.post.ch/en/digital-commerce-api for available
66+
codes)
6567

6668
Technical references
67-
~~~~~~~~~~~~~~~~~~~~
69+
--------------------
6870

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

7374
Known issues / Roadmap
7475
======================
7576

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

8383
Bug Tracker
8484
===========
8585

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

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

9393
Credits
9494
=======
9595

9696
Authors
97-
~~~~~~~
97+
-------
9898

9999
* Camptocamp
100100

101101
Contributors
102-
~~~~~~~~~~~~
103-
104-
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
105-
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
106-
* Akim Juillerat <akim.juillerat@camptocamp.com>
107-
* Julien Coux <julien.coux@camptocamp.com>
108-
* Dung Tran <dungtd@trobz.com>
109-
* Phuc Tran <phuc@trobz.com>
110-
* Jacques-Etienne Baudoux <je@bcim.be>
111-
* `Trobz <https://trobz.com>`_:
112-
* Jack Le <anlh@trobz.com>
102+
------------
103+
104+
- Yannick Vaucher <yannick.vaucher@camptocamp.com>
105+
106+
- Guewen Baconnier <guewen.baconnier@camptocamp.com>
107+
108+
- Akim Juillerat <akim.juillerat@camptocamp.com>
109+
110+
- Julien Coux <julien.coux@camptocamp.com>
111+
112+
- Dung Tran <dungtd@trobz.com>
113+
114+
- Phuc Tran <phuc@trobz.com>
115+
116+
- Jacques-Etienne Baudoux <je@bcim.be>
117+
118+
- `Trobz <https://trobz.com>`__:
119+
120+
- Jack Le <anlh@trobz.com>
113121

114122
Other credits
115-
~~~~~~~~~~~~~
123+
-------------
116124

117-
The development of this module in version 14.0 and its migration from 14.0 to 16.0 has been financially supported by:
125+
The development of this module in version 14.0 and its migration from
126+
14.0 to 16.0 has been financially supported by:
118127

119-
* Camptocamp
128+
- Camptocamp
120129

121130
Maintainers
122-
~~~~~~~~~~~
131+
-----------
123132

124133
This module is maintained by the OCA.
125134

@@ -131,6 +140,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
131140
mission is to support the collaborative development of Odoo features and
132141
promote its widespread use.
133142

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

136145
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

delivery_postlogistics/postlogistics/web_service.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
}
3535

3636

37-
class PostlogisticsWebService(object):
38-
37+
class PostlogisticsWebService:
3938
"""Connector with PostLogistics for labels using post.ch API
4039
4140
Handbook available here:
@@ -294,7 +293,7 @@ def _get_itemid(self, picking, pack_no):
294293

295294
def _cash_on_delivery(self, picking, package=None):
296295
amount = (package or picking).postlogistics_cod_amount()
297-
amount = "{:.2f}".format(amount)
296+
amount = f"{amount:.2f}"
298297
return [{"Type": "NN_BETRAG", "Value": amount}]
299298

300299
def _get_item_additional_data(self, picking, package=None):

delivery_postlogistics/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Important
2+
3+
A "Swiss Post Business customer" account is required to use this module.
4+
5+
See [Log in](https://account.post.ch/selfadmin/?login&lang=en)
6+
7+
To configure:
8+
9+
- Go to Inventory -\> Configuration -\> Delivery -\> Shipping Methods
10+
- Create new shipping methods for PostLogistics and set your login
11+
informations in the "PostLogistics" tab
12+
- Go to Inventory -\> Configuration -\> Delivery -\> Delivery Packages
13+
to create the PostLogistics delivery packaging with the relevant
14+
Package Code (see section 8.10 of
15+
<https://developer.post.ch/en/digital-commerce-api> for available
16+
codes)
17+
18+
## Technical references
19+
20+
["Barcode" web service
21+
documentation](https://www.post.ch/en/business/a-z-of-subjects/dropping-off-mail-items/business-sending-letters/barcode-support)

delivery_postlogistics/readme/CONFIGURE.rst

-21
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
- Yannick Vaucher \<<yannick.vaucher@camptocamp.com>\>
2+
3+
- Guewen Baconnier \<<guewen.baconnier@camptocamp.com>\>
4+
5+
- Akim Juillerat \<<akim.juillerat@camptocamp.com>\>
6+
7+
- Julien Coux \<<julien.coux@camptocamp.com>\>
8+
9+
- Dung Tran \<<dungtd@trobz.com>\>
10+
11+
- Phuc Tran \<<phuc@trobz.com>\>
12+
13+
- Jacques-Etienne Baudoux \<<je@bcim.be>\>
14+
15+
- [Trobz](https://trobz.com):
16+
- Jack Le \<<anlh@trobz.com>\>

delivery_postlogistics/readme/CONTRIBUTORS.rst

-9
This file was deleted.
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The development of this module in version 14.0 and its migration from
2+
14.0 to 16.0 has been financially supported by:
3+
4+
- Camptocamp

delivery_postlogistics/readme/CREDITS.rst

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This module uses [PostLogistics BarCodes
2+
WebService](https://www.post.ch/en/business/a-z-of-subjects/dropping-off-mail-items/business-sending-letters/sending-consignments-web-service-barcode)
3+
to generate labels for your Delivery Orders.
4+
5+
It adds a Create label button on Delivery Orders. A generated label will
6+
be an attachement of your Delivery Order.
7+
8+
To see it, please install documents module.
9+
10+
You can create multiple delivery method to match your diffent package
11+
types.

delivery_postlogistics/readme/DESCRIPTION.rst

-11
This file was deleted.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Integration of price webservice :
2+
<https://www.post.ch/en/customer-center/all-online-services/preise-berechnen/info>
3+
- Not sure if the recursive patch of suds is still needed as there's no
4+
need to use the integration WS anymore. However we still want to patch
5+
open to get meaningful error messages.

delivery_postlogistics/readme/ROADMAP.rst

-6
This file was deleted.

0 commit comments

Comments
 (0)