Skip to content

Commit 2cdf842

Browse files
author
ilo
committed
[IMP] delivery_carrier_label_batch: pre-commit auto fixes
1 parent aa5268b commit 2cdf842

18 files changed

+143
-141
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

+16-19
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>
@@ -369,12 +368,13 @@ <h1 class="title">Carrier labels - Stock Batch Picking (link)</h1>
369368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370369
!! source digest: sha256:432ee88bf9f8309825d23c180f9076b7333338285c168442b978018d466fde9e
371370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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>
371+
<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>
372+
<p>This module adds a wizard on picking batch to generate the labels of the
373+
packs. The labels are merged in one PDF file.</p>
374+
<p>If you want multiple labels for one picking, all the moves should have
375+
been put in a pack before the labels can be printed.</p>
376+
<p>If you don’t define your pack it will be considered a picking is a
377+
single pack.</p>
378378
<p><strong>Table of contents</strong></p>
379379
<div class="contents local topic" id="contents">
380380
<ul class="simple">
@@ -392,10 +392,10 @@ <h1 class="title">Carrier labels - Stock Batch Picking (link)</h1>
392392
</div>
393393
<div class="section" id="configuration">
394394
<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>
395+
<p>If using ZPL2 file format, multiple *.zpl can be merged either “as is”
396+
or with “single image definition” to spare file size. Single image
397+
definition can be used by defining ir.config_parameter with name
398+
zpl2.assembler.single.images to True.</p>
399399
</div>
400400
<div class="section" id="usage">
401401
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
@@ -411,7 +411,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
411411
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/delivery-carrier/issues">GitHub Issues</a>.
412412
In case of trouble, please check there if your issue has already been reported.
413413
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>
414+
<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>
415415
<p>Do not contact contributors directly about support or help with technical issues.</p>
416416
</div>
417417
<div class="section" id="credits">
@@ -426,19 +426,16 @@ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
426426
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
427427
<ul class="simple">
428428
<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">
429+
<li><a class="reference external" href="https://trobz.com">Trobz</a>:<ul>
432430
<li>Khoi Vo &lt;<a class="reference external" href="mailto:khoivha&#64;trobz.com">khoivha&#64;trobz.com</a>&gt;</li>
433431
</ul>
434-
</dd>
435-
</dl>
436432
</li>
437433
</ul>
438434
</div>
439435
<div class="section" id="other-credits">
440436
<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>
437+
<p>The migration of this module from 12.0 to 14.0 was financially supported
438+
by Camptocamp</p>
442439
</div>
443440
<div class="section" id="maintainers">
444441
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
@@ -447,7 +444,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
447444
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
448445
mission is to support the collaborative development of Odoo features and
449446
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>
447+
<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>
451448
<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>
452449
</div>
453450
</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>
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
4-
<record id="view_picking_batch_apply_carrier" model="ir.ui.view">
5-
<field name="name">picking.batch.apply.carrier.form</field>
6-
<field name="model">picking.batch.apply.carrier</field>
7-
<field name="arch" type="xml">
8-
<form string="Apply a carrier and its options">
9-
<label
3+
<record id="view_picking_batch_apply_carrier" model="ir.ui.view">
4+
<field name="name">picking.batch.apply.carrier.form</field>
5+
<field name="model">picking.batch.apply.carrier</field>
6+
<field name="arch" type="xml">
7+
<form string="Apply a carrier and its options">
8+
<label
109
for="apply"
1110
string="Warning, setting options will erase the existing ones in delivery orders"
1211
/>
13-
<group>
14-
<field name="carrier_id" />
15-
</group>
16-
<footer>
17-
<button name="apply" string="Apply" type="object" class="oe_highlight" />
18-
<button string="Cancel" class="oe_link" special="cancel" />
19-
</footer>
20-
</form>
21-
</field>
22-
</record>
12+
<group>
13+
<field name="carrier_id" />
14+
</group>
15+
<footer>
16+
<button
17+
name="apply"
18+
string="Apply"
19+
type="object"
20+
class="oe_highlight"
21+
/>
22+
<button string="Cancel" class="oe_link" special="cancel" />
23+
</footer>
24+
</form>
25+
</field>
26+
</record>
2327

24-
<record id="action_picking_batch_apply_carrier" model="ir.actions.act_window">
25-
<field name="name">Apply a carrier and its options</field>
26-
<field name="res_model">picking.batch.apply.carrier</field>
27-
<field name="view_mode">form</field>
28-
<field name="view_id" ref="view_picking_batch_apply_carrier" />
29-
<field
28+
<record id="action_picking_batch_apply_carrier" model="ir.actions.act_window">
29+
<field name="name">Apply a carrier and its options</field>
30+
<field name="res_model">picking.batch.apply.carrier</field>
31+
<field name="view_mode">form</field>
32+
<field name="view_id" ref="view_picking_batch_apply_carrier" />
33+
<field
3034
name="binding_model_id"
3135
ref="stock_picking_batch_extended.model_stock_picking_batch"
3236
/>
33-
<field name="target">new</field>
34-
</record>
35-
37+
<field name="target">new</field>
38+
</record>
3639
</odoo>

0 commit comments

Comments
 (0)