Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 001f649

Browse files
authoredFeb 5, 2025··
temp rebasing PR 540 (8c24a9f)
2 parents 95659b5 + 8c24a9f commit 001f649

File tree

6 files changed

+278
-5
lines changed

6 files changed

+278
-5
lines changed
 

‎.copier-answers.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: 3839cf0
3+
_src_path: https://github.com/ingadhoc/addons-repo-template.git
4+
description: ADHOC Odoo odoo-argentina Modules
5+
is_private: false
6+
name: ADHOC odoo-argentina enterprise addons
7+
odoo_version: 18.0
8+
pre_commit_ignore: []
9+
slug: ''
10+

‎.github/workflows/pre-commit.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ⚠️ DO NOT EDIT THIS FILE, IT IS GENERATED BY COPIER ⚠️
2+
# Changes here will be lost on a future update.
3+
# See: https://github.com/ingadhoc/addons-repo-template
4+
5+
name: pre-commit
6+
7+
on:
8+
push:
9+
branches: "*.0"
10+
pull_request:
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v4
19+
-
20+
id: setup-python
21+
name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.10"
25+
cache: "pip"
26+
-
27+
name: Pre-commit cache
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.cache/pre-commit
31+
key: pre-commit|${{ steps.setup-python.outputs.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
32+
-
33+
name: Pre-commit
34+
uses: pre-commit/action@v3.0.1

‎.gitignore

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# ⚠️ DO NOT EDIT THIS FILE, IT IS GENERATED BY COPIER ⚠️
2+
# Changes here will be lost on a future update.
3+
# See: https://github.com/ingadhoc/addons-repo-template
4+
15
# Byte-compiled / optimized / DLL files
26
__pycache__/
37
*.py[cod]
@@ -37,6 +41,12 @@ coverage.xml
3741
# Translations
3842
*.mo
3943

44+
# Ensure we never commit pgdumps
45+
*.dump
46+
*.sql
47+
*.pg
48+
*.pg.gpg
49+
4050
# Mr Developer
4151
.mr.developer.cfg
4252
.project
@@ -50,4 +60,3 @@ coverage.xml
5060

5161
# Sphinx documentation
5262
docs/_build/
53-

‎.pre-commit-config.yaml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# ⚠️ DO NOT EDIT THIS FILE, IT IS GENERATED BY COPIER ⚠️
2+
# Changes here will be lost on a future update.
3+
# See: https://github.com/ingadhoc/addons-repo-template
4+
5+
exclude: |
6+
(?x)
7+
8+
# We don't want to mess with tool-generated files
9+
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
10+
# Library files can have extraneous formatting (even minimized)
11+
/static/(src/)?lib/|
12+
# Ignore build and dist directories in addons
13+
/build/|/dist/|
14+
# Ignore test files in addons
15+
/tests/samples/.*|
16+
# You don't usually want a bot to modify your legal texts
17+
(LICENSE.*|COPYING.*)
18+
19+
# Keep in sync with .github/workflows/pre-commit.yml
20+
default_language_version:
21+
python: python3
22+
23+
repos:
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v5.0.0
27+
hooks:
28+
- id: check-added-large-files
29+
- id: check-case-conflict
30+
- id: check-docstring-first
31+
- id: check-executables-have-shebangs
32+
- id: check-merge-conflict
33+
- id: check-symlinks
34+
- id: check-xml
35+
- id: check-yaml
36+
- id: debug-statements
37+
- id: end-of-file-fixer
38+
- id: mixed-line-ending
39+
args: ["--fix=lf"]
40+
- id: trailing-whitespace
41+
# exclude autogenerated files
42+
exclude: \.pot?$
43+
44+
- repo: https://github.com/OCA/odoo-pre-commit-hooks
45+
rev: v0.0.35
46+
hooks:
47+
- id: oca-checks-odoo-module
48+
args:
49+
- --disable=xml-dangerous-qweb-replace-low-priority,xml-view-dangerous-replace-low-priority,xml-oe-structure-missing-id
50+
- id: oca-checks-po
51+
args:
52+
- --disable=po-pretty-format
53+
54+
- repo: https://github.com/astral-sh/ruff-pre-commit
55+
rev: v0.6.8
56+
hooks:
57+
- id: ruff
58+
args: [--fix, --exit-non-zero-on-fix]
59+
- id: ruff-format
60+
61+
- repo: https://github.com/OCA/pylint-odoo
62+
rev: v9.1.3
63+
hooks:
64+
- id: pylint_odoo
65+
66+
- repo: https://github.com/rstcheck/rstcheck
67+
rev: v6.2.1
68+
hooks:
69+
- id: rstcheck

‎README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
[![Code Climate](https://codeclimate.com/github/ingadhoc/odoo-argentina-ee/badges/gpa.svg)](https://codeclimate.com/github/ingadhoc/odoo-argentina-ee)
1+
[![Coverage Status](https://coveralls.io/repos/ingadhoc//badge.png?branch=18.0)](https://coveralls.io/r/ingadhoc/?branch=18.0)
2+
[![Code Climate](https://codeclimate.com/github/ingadhoc//badges/gpa.svg)](https://codeclimate.com/github/ingadhoc/)
23

34
# ADHOC odoo-argentina enterprise addons
45

56
ADHOC Odoo odoo-argentina Modules
67

7-
[//]: # (addons)
8-
[//]: # (end addons)
9-
108
----
119

1210
<img alt="ADHOC" src="http://fotos.subefotos.com/83fed853c1e15a8023b86b2b22d6145bo.png" />
1311
**Adhoc SA** - www.adhoc.com.ar
12+
.

‎pyproject.toml

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
[tool.ruff]
2+
line-length = 120
3+
4+
[tool.ruff.lint]
5+
select = [
6+
"E", # pycodestyle errors
7+
"W", # pycodestyle warnings
8+
"C90", # mccabe
9+
"F", # pyflakes
10+
"UP", # pyupgrade
11+
"I", # isort
12+
]
13+
ignore = [
14+
"UP008", # pyupgrade: Use `super()` instead of `super(__class__, self)` (no autofix)
15+
"UP031", # pyupgrade: use format specifiers instead of percent format (no autofix)
16+
"E712", # avoid equality comparisons to False (no autofix)
17+
"E721", # do not compare types, use 'isinstance()' (no autofix)
18+
"E722", # do not use bare `except` (no autofix)
19+
"E731", # do not assign `lambda` expression, use a `def` (no autofix)
20+
"E741", # ambiguos variable name (no autofix)
21+
]
22+
23+
[tool.ruff.lint.per-file-ignores]
24+
"__init__.py" = ["F401", "I001"]
25+
"__manifest__.py" = ["B018"]
26+
27+
[tool.ruff.lint.pycodestyle]
28+
# line-length is set in [tool.ruff], and it's used by the formatter
29+
# in case the formatted can't autofix the line length, it will be reported as an error
30+
# only if it exceeds the max-line-length set here. We use 999 to effectively disable
31+
# this check.
32+
max-line-length = 999
33+
34+
[tool.ruff.lint.isort]
35+
combine-as-imports = true
36+
force-wrap-aliases = true
37+
known-third-party = [
38+
"dateutil",
39+
"git",
40+
"gnupg",
41+
"openupgradelib",
42+
"pkg_resources",
43+
"psycopg2",
44+
"requests",
45+
"setuptools",
46+
"urllib2",
47+
"yaml",
48+
]
49+
50+
[tool.ruff.lint.mccabe]
51+
max-complexity = 20
52+
53+
[tool.pylint.master]
54+
load-plugins = ["pylint_odoo"]
55+
score = false
56+
57+
[tool.pylint.odoolint]
58+
manifest-required-authors = "ADHOC SA"
59+
manifest-required-keys = ["license"]
60+
manifest-deprecated-keys = ["description", "active"]
61+
license-allowed = [
62+
"AGPL-3",
63+
"GPL-2",
64+
"GPL-2 or any later version",
65+
"GPL-3",
66+
"GPL-3 or any later version",
67+
"LGPL-3",
68+
]
69+
70+
[tool.pylint."messages control"]
71+
disable = "all"
72+
enable = [
73+
"anomalous-backslash-in-string",
74+
"api-one-deprecated",
75+
"api-one-multi-together",
76+
"assignment-from-none",
77+
"attribute-deprecated",
78+
"attribute-string-redundant",
79+
"character-not-valid-in-resource-link",
80+
"class-camelcase",
81+
"consider-merging-classes-inherited",
82+
"context-overridden",
83+
"create-user-wo-reset-password",
84+
"dangerous-default-value",
85+
"dangerous-filter-wo-user",
86+
"dangerous-qweb-replace-wo-priority",
87+
"dangerous-view-replace-wo-priority",
88+
"deprecated-data-xml-node",
89+
"deprecated-openerp-xml-node",
90+
"development-status-allowed",
91+
"duplicate-id-csv",
92+
"duplicate-key",
93+
"duplicate-po-message-definition",
94+
"duplicate-xml-fields",
95+
"duplicate-xml-record-id",
96+
"eval-referenced",
97+
"eval-used",
98+
# "except-pass", # Annoying
99+
"external-request-timeout",
100+
"file-not-used",
101+
"incoherent-interpreter-exec-perm",
102+
"invalid-commit",
103+
"license-allowed",
104+
"manifest-author-string",
105+
"manifest-deprecated-key",
106+
"manifest-maintainers-list",
107+
"manifest-required-author",
108+
"manifest-required-key",
109+
# "manifest-version-format", # Errors on non-migrated modules, and redundant with runbot
110+
"method-compute",
111+
"method-inverse",
112+
"method-required-super",
113+
"method-search",
114+
"missing-newline-extrafiles",
115+
# "missing-return", # Annoying. Not applicable for computed field methods
116+
"odoo-addons-relative-import",
117+
"old-api7-method-defined",
118+
"openerp-exception-warning",
119+
"po-msgstr-variables",
120+
"po-syntax-error",
121+
"pointless-statement",
122+
"pointless-string-statement",
123+
"print-used",
124+
"redundant-keyword-arg",
125+
"redundant-modulename-xml",
126+
"reimported",
127+
"relative-import",
128+
"renamed-field-parameter",
129+
"resource-not-exist",
130+
"return-in-init",
131+
"rst-syntax-error",
132+
"sql-injection",
133+
"str-format-used",
134+
"test-folder-imported",
135+
"too-few-format-args",
136+
"translation-contains-variable",
137+
"translation-field",
138+
# "translation-positional-used", # Annoying in our use case
139+
# "translation-required", # We don't always translate everything, and that's fine
140+
"unnecessary-utf8-coding-comment",
141+
"unreachable",
142+
"use-vim-comment",
143+
"wrong-tabs-instead-of-spaces",
144+
"xml-attribute-translatable",
145+
"xml-deprecated-qweb-directive",
146+
"xml-deprecated-tree-attribute",
147+
"xml-syntax-error"
148+
]
149+
150+
[tool.pylint.reports]
151+
output-format = "colorized"
152+
msg-template = "{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"

0 commit comments

Comments
 (0)
Please sign in to comment.