Skip to content

Commit 7d34fa5

Browse files
committed
[IMP] update dotfiles [ci skip]
1 parent be30c4e commit 7d34fa5

20 files changed

+53
-35
lines changed

.copier-answers.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.3.6
2+
_commit: v1.5.2
33
_src_path: gh:oca/oca-addons-repo-template
44
ci: Travis
55
dependency_installation_mode: PIP
66
generate_requirements_txt: true
77
include_wkhtmltopdf: false
88
odoo_version: 14.0
9+
org_name: Odoo Community Association (OCA)
10+
org_slug: OCA
911
rebel_module_groups: []
1012
repo_description: 'TODO: add repo description.'
1113
repo_name: delivery-carrier
1214
repo_slug: delivery-carrier
15+
repo_website: https://github.com/OCA/delivery-carrier
1316
travis_apt_packages: []
1417
travis_apt_sources: []

.eslintrc.yml

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

55
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
66
parserOptions:
7-
ecmaVersion: 2017
7+
ecmaVersion: 2019
88

99
overrides:
1010
- files:

.github/workflows/pre-commit.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,34 @@ name: pre-commit
22

33
on:
44
pull_request:
5+
branches:
6+
- "14.0*"
57
push:
8+
branches:
9+
- "14.0"
10+
- "14.0-ocabot-*"
611

712
jobs:
813
pre-commit:
914
runs-on: ubuntu-latest
1015
steps:
1116
- uses: actions/checkout@v2
1217
- uses: actions/setup-python@v2
18+
- name: Get python version
19+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
20+
- uses: actions/cache@v1
1321
with:
14-
# The pylint-odoo version we use here does not support python 3.10
15-
# https://github.com/OCA/oca-addons-repo-template/issues/80
16-
# We also need to pin to an older version of python for older odoo versions
17-
# where we are not using black > 21. Older black versions won't work with
18-
# Python 3.9.8+, and we can't bump black without reformatting.
19-
python-version: "3.9.7"
20-
- uses: pre-commit/action@v2.0.0
22+
path: ~/.cache/pre-commit
23+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
24+
- name: Install pre-commit
25+
run: pip install pre-commit
26+
- name: Run pre-commit
27+
run: pre-commit run --all-files --show-diff-on-failure --color=always
28+
- name: Check that all files generated by pre-commit are in git
29+
run: |
30+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
31+
if [ "$newfiles" != "" ] ; then
32+
echo "Please check-in the following files:"
33+
echo "$newfiles"
34+
exit 1
35+
fi

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ repos:
4646
- --remove-duplicate-keys
4747
- --remove-unused-variables
4848
- repo: https://github.com/psf/black
49-
rev: 20.8b1
49+
rev: 22.3.0
5050
hooks:
5151
- id: black
5252
- repo: https://github.com/pre-commit/mirrors-prettier
@@ -120,7 +120,7 @@ repos:
120120
name: flake8
121121
additional_dependencies: ["flake8-bugbear==20.1.4"]
122122
- repo: https://github.com/PyCQA/pylint
123-
rev: pylint-2.5.3
123+
rev: v2.11.1
124124
hooks:
125125
- id: pylint
126126
name: pylint with optional checks
@@ -129,7 +129,7 @@ repos:
129129
- --exit-zero
130130
verbose: true
131131
additional_dependencies: &pylint_deps
132-
- pylint-odoo==3.5.0
132+
- pylint-odoo==5.0.5
133133
- id: pylint
134134
name: pylint with mandatory checks
135135
args:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/99/14.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-delivery-carrier-99)
1+
2+
[![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=14.0)
23
[![Build Status](https://travis-ci.com/OCA/delivery-carrier.svg?branch=14.0)](https://travis-ci.com/OCA/delivery-carrier)
34
[![codecov](https://codecov.io/gh/OCA/delivery-carrier/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/delivery-carrier)
45
[![Translation Status](https://translation.odoo-community.org/widgets/delivery-carrier-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/delivery-carrier-14-0/?utm_source=widget)
@@ -58,12 +59,11 @@ addon | version | maintainers | summary
5859

5960
This repository is licensed under [AGPL-3.0](LICENSE).
6061

61-
However, each module can have a totally different license, as long as they adhere to OCA
62+
However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
6263
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
6364
that explains its license.
6465

6566
----
66-
6767
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
6868
organization whose mission is to support the collaborative development of Odoo features
6969
and promote its widespread use.

base_delivery_carrier_files/tests/test_base_delivery_carrier_files.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def setUp(self):
7373
self.picking_type = self.env.ref("stock.warehouse0").out_type_id
7474

7575
def test_carrier_file_generation(self):
76-
""" Test carrier file generation """
76+
"""Test carrier file generation"""
7777
# I confirm outgoing shipment of 130 kgm Ice-cream.
7878
picking = self.env["stock.picking"].create(
7979
{
@@ -118,7 +118,7 @@ def test_carrier_file_generation(self):
118118
self.assertFalse(new_picking.carrier_file_generated)
119119

120120
def test_manual_carrier_file_generation(self):
121-
""" Test manual carrier file generation """
121+
"""Test manual carrier file generation"""
122122
# I confirm outgoing shipment of 130 kgm Ice-cream.
123123
picking = self.env["stock.picking"].create(
124124
{

base_delivery_carrier_label/models/carrier_account.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CarrierAccount(models.Model):
1212

1313
@api.model
1414
def _selection_file_format(self):
15-
""" To inherit to add label file types"""
15+
"""To inherit to add label file types"""
1616
return [("PDF", "PDF"), ("ZPL", "ZPL"), ("XML", "XML")]
1717

1818
name = fields.Char(required=True)

base_delivery_carrier_label/models/delivery_carrier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def alternative_send_shipping(self, pickings):
1919
return {}
2020

2121
def default_options(self):
22-
""" Returns default and available options for a carrier """
22+
"""Returns default and available options for a carrier"""
2323
options = self.env["delivery.carrier.option"].browse()
2424
for available_option in self.available_option_ids:
2525
if available_option.mandatory or available_option.by_default:

base_delivery_carrier_label/models/delivery_carrier_template_option.py

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

77

88
class DeliveryCarrierTemplateOption(models.Model):
9-
""" Available options for a carrier (partner) """
9+
"""Available options for a carrier (partner)"""
1010

1111
_name = "delivery.carrier.template.option"
1212
_description = "Delivery carrier template option"

base_delivery_carrier_label/models/shipping_label.py

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

77

88
class ShippingLabel(models.Model):
9-
""" Child class of ir attachment to identify which are labels """
9+
"""Child class of ir attachment to identify which are labels"""
1010

1111
_name = "shipping.label"
1212
_inherits = {"ir.attachment": "attachment_id"}

base_delivery_carrier_label/models/stock_picking.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def send_to_shipper(self):
7474

7575
@api.onchange("carrier_id")
7676
def onchange_carrier_id(self):
77-
""" Inherit this method in your module """
77+
"""Inherit this method in your module"""
7878
if not self.carrier_id:
7979
return
8080
# This can look useless as the field carrier_code and
@@ -159,7 +159,7 @@ def _get_carrier_account_domain(self):
159159
]
160160

161161
def _get_carrier_account(self):
162-
""" Return a carrier suitable for the current picking """
162+
"""Return a carrier suitable for the current picking"""
163163
domain = self._get_carrier_account_domain()
164164
return self.env["carrier.account"].search(
165165
domain,
@@ -191,7 +191,7 @@ def _get_label_sender_address(self):
191191
return self.env["res.partner"].browse(address_id)
192192

193193
def _check_existing_shipping_label(self):
194-
""" Check that labels don't already exist for this picking """
194+
"""Check that labels don't already exist for this picking"""
195195
self.ensure_one()
196196
labels = self.env["shipping.label"].search(
197197
[("res_id", "=", self.id), ("res_model", "=", "stock.picking")]

base_delivery_carrier_label/models/stock_quant_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ def _complete_name(self, name, args):
4747
return res
4848

4949
def open_website_url(self):
50-
""" Implement you own action in your module """
50+
"""Implement you own action in your module"""
5151
return None

delivery_carrier_label_batch/models/stock_batch_picking.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _get_options_to_add(self, carrier=None):
3838

3939
@api.onchange("carrier_id")
4040
def carrier_id_change(self):
41-
""" Inherit this method in your module """
41+
"""Inherit this method in your module"""
4242
if self.carrier_id:
4343
# This can look useless as the field carrier_code and
4444
# carrier_type are related field. But it's needed to fill

delivery_carrier_label_batch/tests/test_generate_labels.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class TestGenerateLabels(common.SavepointCase):
1111

12-
""" Test the wizard for delivery carrier label generation """
12+
"""Test the wizard for delivery carrier label generation"""
1313

1414
@classmethod
1515
def setUpClass(cls):

delivery_postlogistics/models/delivery_carrier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class DeliveryCarrier(models.Model):
11-
""" Add service group """
11+
"""Add service group"""
1212

1313
_inherit = "delivery.carrier"
1414

delivery_postlogistics/models/postlogistics_carrier_template_options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
class DeliveryCarrierTemplateOption(models.Model):
18-
""" Available options for a carrier (partner) """
18+
"""Available options for a carrier (partner)"""
1919

2020
_name = "postlogistics.delivery.carrier.template.option"
2121
_description = "Delivery carrier template option"

delivery_postlogistics/models/postlogistics_shipping_label.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class PostlogisticsShippingLabel(models.Model):
8-
""" Child class of ir attachment to identify which are labels """
8+
"""Child class of ir attachment to identify which are labels"""
99

1010
_name = "postlogistics.shipping.label"
1111
_inherits = {"ir.attachment": "attachment_id"}

delivery_postlogistics/models/stock_picking.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class StockPicking(models.Model):
2727
)
2828

2929
def _get_packages_from_picking(self):
30-
""" Get all the packages from the picking """
30+
"""Get all the packages from the picking"""
3131
self.ensure_one()
3232
operation_obj = self.env["stock.move.line"]
3333
operations = operation_obj.search(
@@ -184,7 +184,7 @@ def write_tracking_number_label(self, label_result, packages):
184184
def _generate_postlogistics_label(
185185
self, webservice_class=None, package_ids=None, skip_attach_file=False
186186
):
187-
""" Generate labels and write tracking numbers received """
187+
"""Generate labels and write tracking numbers received"""
188188
self.ensure_one()
189189
user = self.env.user
190190
company = user.company_id
@@ -231,6 +231,6 @@ def _generate_postlogistics_label(
231231
return labels
232232

233233
def generate_postlogistics_shipping_labels(self, package_ids=None):
234-
""" Add label generation for PostLogistics """
234+
"""Add label generation for PostLogistics"""
235235
self.ensure_one()
236236
return self._generate_postlogistics_label(package_ids=package_ids)

delivery_postlogistics/postlogistics/web_service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def _get_item_number(self, picking, pack_num):
297297
return "%02d%s" % (pack_num, picking_num[-6:].zfill(6))
298298

299299
def _prepare_item_list(self, picking, recipient, packages):
300-
""" Return a list of item made from the pickings """
300+
"""Return a list of item made from the pickings"""
301301
carrier = picking.carrier_id
302302
item_list = []
303303
pack_counter = 1

delivery_roulier/models/stock_picking.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _roulier_convert_address(self, partner):
196196

197197
for tel in ["mobile", "phone"]:
198198
if address.get(tel):
199-
address[tel] = address[tel].replace(u"\u00A0", "").replace(" ", "")
199+
address[tel] = address[tel].replace("\u00A0", "").replace(" ", "")
200200

201201
address["phone"] = address.get("mobile", address.get("phone"))
202202

0 commit comments

Comments
 (0)