Skip to content

Commit ce2599a

Browse files
committed
[IMP] delivery_carrier_label_batch: pre-commit auto fixes
1 parent a9f638c commit ce2599a

18 files changed

+150
-145
lines changed

delivery_carrier_label_batch/README.rst

+27-23
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,25 @@ Carrier labels - Stock Batch Picking (link)
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/14.0/delivery_carrier_label_batch
20+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_label_batch
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-14-0/delivery-carrier-14-0-delivery_carrier_label_batch
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_carrier_label_batch
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=14.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 adds a wizard on picking batch to generate the labels
32-
of the packs. The labels are merged in one PDF file.
31+
This module adds a wizard on picking batch to generate the labels of the
32+
packs. The labels are merged in one PDF file.
3333

34-
If you want multiple labels for one picking, all the moves should have been
35-
put in a pack before the labels can be printed.
34+
If you want multiple labels for one picking, all the moves should have
35+
been put in a pack before the labels can be printed.
3636

37-
If you don't define your pack it will be considered a picking is a single pack.
37+
If you don't define your pack it will be considered a picking is a
38+
single pack.
3839

3940
**Table of contents**
4041

@@ -44,50 +45,53 @@ If you don't define your pack it will be considered a picking is a single pack.
4445
Configuration
4546
=============
4647

47-
If using ZPL2 file format, multiple `*.zpl` can be merged either "as is" or with
48-
"single image definition" to spare file size.
49-
Single image definition can be used by defining `ir.config_parameter` with name
50-
`zpl2.assembler.single.images` to `True`.
48+
If using ZPL2 file format, multiple \*.zpl can be merged either "as is"
49+
or with "single image definition" to spare file size. Single image
50+
definition can be used by defining ir.config_parameter with name
51+
zpl2.assembler.single.images to True.
5152

5253
Usage
5354
=====
5455

5556
To use this module, you need to:
5657

57-
1. Go to...
58+
1. Go to...
5859

5960
Bug Tracker
6061
===========
6162

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

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

6970
Credits
7071
=======
7172

7273
Authors
73-
~~~~~~~
74+
-------
7475

7576
* Camptocamp
7677

7778
Contributors
78-
~~~~~~~~~~~~
79+
------------
7980

80-
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
81-
* `Trobz <https://trobz.com>`_:
82-
* Khoi Vo <khoivha@trobz.com>
81+
- Yannick Vaucher <yannick.vaucher@camptocamp.com>
82+
83+
- `Trobz <https://trobz.com>`__:
84+
85+
- Khoi Vo <khoivha@trobz.com>
8386

8487
Other credits
85-
~~~~~~~~~~~~~
88+
-------------
8689

87-
The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp
90+
The migration of this module from 12.0 to 14.0 was financially supported
91+
by Camptocamp
8892

8993
Maintainers
90-
~~~~~~~~~~~
94+
-----------
9195

9296
This module is maintained by the OCA.
9397

@@ -99,6 +103,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
99103
mission is to support the collaborative development of Odoo features and
100104
promote its widespread use.
101105

102-
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/14.0/delivery_carrier_label_batch>`_ project on GitHub.
106+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_label_batch>`_ project on GitHub.
103107

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

delivery_carrier_label_batch/models/stock_batch_picking.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class StockBatchPicking(models.Model):
7-
87
"""Add carrier and carrier options on batch
98
109
to be able to massively set those options on related picking.

delivery_carrier_label_batch/pdf_utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def assemble_pdf(pdf_list):
2828

2929
output = PdfFileWriter()
3030
for pdf in pdf_list:
31-
3231
if not pdf:
3332
continue
3433
reader = PdfFileReader(BytesIO(pdf))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
If using ZPL2 file format, multiple \*.zpl can be merged either "as is"
2+
or with "single image definition" to spare file size. Single image
3+
definition can be used by defining ir.config_parameter with name
4+
zpl2.assembler.single.images to True.

delivery_carrier_label_batch/readme/CONFIGURE.rst

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Yannick Vaucher \<<yannick.vaucher@camptocamp.com>\>
2+
3+
- [Trobz](https://trobz.com):
4+
- Khoi Vo \<<khoivha@trobz.com>\>

delivery_carrier_label_batch/readme/CONTRIBUTORS.rst

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp
1+
The migration of this module from 12.0 to 14.0 was financially supported
2+
by Camptocamp
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
This module adds a wizard on picking batch to generate the labels
2-
of the packs. The labels are merged in one PDF file.
1+
This module adds a wizard on picking batch to generate the labels of the
2+
packs. The labels are merged in one PDF file.
33

4-
If you want multiple labels for one picking, all the moves should have been
5-
put in a pack before the labels can be printed.
4+
If you want multiple labels for one picking, all the moves should have
5+
been put in a pack before the labels can be printed.
66

7-
If you don't define your pack it will be considered a picking is a single pack.
7+
If you don't define your pack it will be considered a picking is a
8+
single pack.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
To use this module, you need to:
22

3-
1. Go to...
3+
> 1. Go to...

delivery_carrier_label_batch/static/description/index.html

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -9,10 +8,11 @@
98

109
/*
1110
:Author: David Goodger (goodger@python.org)
12-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -369,12 +369,13 @@ <h1 class="title">Carrier labels - Stock Batch Picking (link)</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:432ee88bf9f8309825d23c180f9076b7333338285c168442b978018d466fde9e
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_carrier_label_batch"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_carrier_label_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373-
<p>This module adds a wizard on picking batch to generate the labels
374-
of the packs. The labels are merged in one PDF file.</p>
375-
<p>If you want multiple labels for one picking, all the moves should have been
376-
put in a pack before the labels can be printed.</p>
377-
<p>If you don’t define your pack it will be considered a picking is a single pack.</p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_label_batch"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_carrier_label_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373+
<p>This module adds a wizard on picking batch to generate the labels of the
374+
packs. The labels are merged in one PDF file.</p>
375+
<p>If you want multiple labels for one picking, all the moves should have
376+
been put in a pack before the labels can be printed.</p>
377+
<p>If you don’t define your pack it will be considered a picking is a
378+
single pack.</p>
378379
<p><strong>Table of contents</strong></p>
379380
<div class="contents local topic" id="contents">
380381
<ul class="simple">
@@ -392,10 +393,10 @@ <h1 class="title">Carrier labels - Stock Batch Picking (link)</h1>
392393
</div>
393394
<div class="section" id="configuration">
394395
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
395-
<p>If using ZPL2 file format, multiple <cite>*.zpl</cite> can be merged either “as is” or with
396-
“single image definition” to spare file size.
397-
Single image definition can be used by defining <cite>ir.config_parameter</cite> with name
398-
<cite>zpl2.assembler.single.images</cite> to <cite>True</cite>.</p>
396+
<p>If using ZPL2 file format, multiple *.zpl can be merged either “as is”
397+
or with “single image definition” to spare file size. Single image
398+
definition can be used by defining ir.config_parameter with name
399+
zpl2.assembler.single.images to True.</p>
399400
</div>
400401
<div class="section" id="usage">
401402
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
@@ -411,7 +412,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
411412
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/delivery-carrier/issues">GitHub Issues</a>.
412413
In case of trouble, please check there if your issue has already been reported.
413414
If you spotted it first, help us to smash it by providing a detailed and welcomed
414-
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_carrier_label_batch%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415+
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_carrier_label_batch%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415416
<p>Do not contact contributors directly about support or help with technical issues.</p>
416417
</div>
417418
<div class="section" id="credits">
@@ -426,28 +427,27 @@ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
426427
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
427428
<ul class="simple">
428429
<li>Yannick Vaucher &lt;<a class="reference external" href="mailto:yannick.vaucher&#64;camptocamp.com">yannick.vaucher&#64;camptocamp.com</a>&gt;</li>
429-
<li><dl class="first docutils">
430-
<dt><a class="reference external" href="https://trobz.com">Trobz</a>:</dt>
431-
<dd><ul class="first last">
430+
<li><a class="reference external" href="https://trobz.com">Trobz</a>:<ul>
432431
<li>Khoi Vo &lt;<a class="reference external" href="mailto:khoivha&#64;trobz.com">khoivha&#64;trobz.com</a>&gt;</li>
433432
</ul>
434-
</dd>
435-
</dl>
436433
</li>
437434
</ul>
438435
</div>
439436
<div class="section" id="other-credits">
440437
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
441-
<p>The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp</p>
438+
<p>The migration of this module from 12.0 to 14.0 was financially supported
439+
by Camptocamp</p>
442440
</div>
443441
<div class="section" id="maintainers">
444442
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
445443
<p>This module is maintained by the OCA.</p>
446-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
444+
<a class="reference external image-reference" href="https://odoo-community.org">
445+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
446+
</a>
447447
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
448448
mission is to support the collaborative development of Odoo features and
449449
promote its widespread use.</p>
450-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/14.0/delivery_carrier_label_batch">OCA/delivery-carrier</a> project on GitHub.</p>
450+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_label_batch">OCA/delivery-carrier</a> project on GitHub.</p>
451451
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
452452
</div>
453453
</div>

delivery_carrier_label_batch/tests/test_generate_labels.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99

1010

1111
class TestGenerateLabels(common.SavepointCase):
12-
1312
"""Test the wizard for delivery carrier label generation"""
1413

1514
@classmethod
1615
def setUpClass(cls):
17-
super(TestGenerateLabels, cls).setUpClass()
16+
super().setUpClass()
1817

1918
Move = cls.env["stock.move"]
2019
Picking = cls.env["stock.picking"]
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
4-
<record model="ir.ui.view" id="stock_batch_picking_form">
5-
<field name="name">stock.picking.batch.form</field>
6-
<field name="model">stock.picking.batch</field>
7-
<field
3+
<record model="ir.ui.view" id="stock_batch_picking_form">
4+
<field name="name">stock.picking.batch.form</field>
5+
<field name="model">stock.picking.batch</field>
6+
<field
87
name="inherit_id"
98
ref="stock_picking_batch_extended.stock_batch_picking_form"
109
/>
11-
<field name="arch" type="xml">
12-
<notebook position="inside">
13-
<page name="carrier" string="Carrier Info">
14-
<separator string="Delivery" />
15-
<group>
16-
<field name="carrier_id" />
17-
</group>
18-
<separator string="Options" />
19-
<field name="option_ids" nolabel="1" />
20-
<label
10+
<field name="arch" type="xml">
11+
<notebook position="inside">
12+
<page name="carrier" string="Carrier Info">
13+
<separator string="Delivery" />
14+
<group>
15+
<field name="carrier_id" />
16+
</group>
17+
<separator string="Options" />
18+
<field name="option_ids" nolabel="1" />
19+
<label
2120
for="action_set_options"
2221
string="Warning, setting options will erase the existing ones in delivery orders"
2322
/>
24-
<button
23+
<button
2524
name="action_set_options"
2625
string="Set Options"
2726
class="oe_highlight"
2827
type="object"
2928
/>
30-
</page>
31-
</notebook>
32-
</field>
33-
</record>
34-
29+
</page>
30+
</notebook>
31+
</field>
32+
</record>
3533
</odoo>

0 commit comments

Comments
 (0)