Skip to content

Commit cc01964

Browse files
committed
Initial commit
0 parents  commit cc01964

14 files changed

+1595
-0
lines changed

.copier-answers.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: v1.26
3+
_src_path: git+https://github.com/OCA/oca-addons-repo-template
4+
additional_ruff_rules: []
5+
ci: GitHub
6+
convert_readme_fragments_to_markdown: true
7+
enable_checklog_odoo: true
8+
generate_requirements_txt: true
9+
github_check_license: true
10+
github_ci_extra_env: {}
11+
github_enable_codecov: true
12+
github_enable_makepot: true
13+
github_enable_stale_action: true
14+
github_enforce_dev_status_compatibility: true
15+
include_wkhtmltopdf: false
16+
odoo_test_flavor: Both
17+
odoo_version: 18.0
18+
org_name: Odoo Community Association (OCA)
19+
org_slug: OCA
20+
rebel_module_groups: []
21+
repo_description: product-kitting
22+
repo_name: product-kitting
23+
repo_slug: product-kitting
24+
repo_website: https://github.com/OCA/product-kitting
25+
use_pyproject_toml: true
26+
use_ruff: true
27+

.editorconfig

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Configuration for known file extensions
2+
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
3+
charset = utf-8
4+
end_of_line = lf
5+
indent_size = 4
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{json,yml,yaml,rst,md}]
11+
indent_size = 2
12+
13+
# Do not configure editor for libs and autogenerated content
14+
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
15+
charset = unset
16+
end_of_line = unset
17+
indent_size = unset
18+
indent_style = unset
19+
insert_final_newline = false
20+
trim_trailing_whitespace = false

.eslintrc.yml

+188
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
env:
2+
browser: true
3+
es6: true
4+
5+
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
6+
parserOptions:
7+
ecmaVersion: 2022
8+
9+
overrides:
10+
- files:
11+
- "**/*.esm.js"
12+
parserOptions:
13+
sourceType: module
14+
15+
# Globals available in Odoo that shouldn't produce errorings
16+
globals:
17+
_: readonly
18+
$: readonly
19+
fuzzy: readonly
20+
jQuery: readonly
21+
moment: readonly
22+
odoo: readonly
23+
openerp: readonly
24+
owl: readonly
25+
luxon: readonly
26+
27+
# Styling is handled by Prettier, so we only need to enable AST rules;
28+
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
29+
rules:
30+
accessor-pairs: warn
31+
array-callback-return: warn
32+
callback-return: warn
33+
capitalized-comments:
34+
- warn
35+
- always
36+
- ignoreConsecutiveComments: true
37+
ignoreInlineComments: true
38+
complexity:
39+
- warn
40+
- 15
41+
constructor-super: warn
42+
dot-notation: warn
43+
eqeqeq: warn
44+
global-require: warn
45+
handle-callback-err: warn
46+
id-blacklist: warn
47+
id-match: warn
48+
init-declarations: error
49+
max-depth: warn
50+
max-nested-callbacks: warn
51+
max-statements-per-line: warn
52+
no-alert: warn
53+
no-array-constructor: warn
54+
no-caller: warn
55+
no-case-declarations: warn
56+
no-class-assign: warn
57+
no-cond-assign: error
58+
no-const-assign: error
59+
no-constant-condition: warn
60+
no-control-regex: warn
61+
no-debugger: error
62+
no-delete-var: warn
63+
no-div-regex: warn
64+
no-dupe-args: error
65+
no-dupe-class-members: error
66+
no-dupe-keys: error
67+
no-duplicate-case: error
68+
no-duplicate-imports: error
69+
no-else-return: warn
70+
no-empty-character-class: warn
71+
no-empty-function: error
72+
no-empty-pattern: error
73+
no-empty: warn
74+
no-eq-null: error
75+
no-eval: error
76+
no-ex-assign: error
77+
no-extend-native: warn
78+
no-extra-bind: warn
79+
no-extra-boolean-cast: warn
80+
no-extra-label: warn
81+
no-fallthrough: warn
82+
no-func-assign: error
83+
no-global-assign: error
84+
no-implicit-coercion:
85+
- warn
86+
- allow: ["~"]
87+
no-implicit-globals: warn
88+
no-implied-eval: warn
89+
no-inline-comments: warn
90+
no-inner-declarations: warn
91+
no-invalid-regexp: warn
92+
no-irregular-whitespace: warn
93+
no-iterator: warn
94+
no-label-var: warn
95+
no-labels: warn
96+
no-lone-blocks: warn
97+
no-lonely-if: error
98+
no-mixed-requires: error
99+
no-multi-str: warn
100+
no-native-reassign: error
101+
no-negated-condition: warn
102+
no-negated-in-lhs: error
103+
no-new-func: warn
104+
no-new-object: warn
105+
no-new-require: warn
106+
no-new-symbol: warn
107+
no-new-wrappers: warn
108+
no-new: warn
109+
no-obj-calls: warn
110+
no-octal-escape: warn
111+
no-octal: warn
112+
no-param-reassign: warn
113+
no-path-concat: warn
114+
no-process-env: warn
115+
no-process-exit: warn
116+
no-proto: warn
117+
no-prototype-builtins: warn
118+
no-redeclare: warn
119+
no-regex-spaces: warn
120+
no-restricted-globals: warn
121+
no-restricted-imports: warn
122+
no-restricted-modules: warn
123+
no-restricted-syntax: warn
124+
no-return-assign: error
125+
no-script-url: warn
126+
no-self-assign: warn
127+
no-self-compare: warn
128+
no-sequences: warn
129+
no-shadow-restricted-names: warn
130+
no-shadow: warn
131+
no-sparse-arrays: warn
132+
no-sync: warn
133+
no-this-before-super: warn
134+
no-throw-literal: warn
135+
no-undef-init: warn
136+
no-undef: error
137+
no-unmodified-loop-condition: warn
138+
no-unneeded-ternary: error
139+
no-unreachable: error
140+
no-unsafe-finally: error
141+
no-unused-expressions: error
142+
no-unused-labels: error
143+
no-unused-vars: error
144+
no-use-before-define: error
145+
no-useless-call: warn
146+
no-useless-computed-key: warn
147+
no-useless-concat: warn
148+
no-useless-constructor: warn
149+
no-useless-escape: warn
150+
no-useless-rename: warn
151+
no-void: warn
152+
no-with: warn
153+
operator-assignment: [error, always]
154+
prefer-const: warn
155+
radix: warn
156+
require-yield: warn
157+
sort-imports: warn
158+
spaced-comment: [error, always]
159+
strict: [error, function]
160+
use-isnan: error
161+
valid-jsdoc:
162+
- warn
163+
- prefer:
164+
arg: param
165+
argument: param
166+
augments: extends
167+
constructor: class
168+
exception: throws
169+
func: function
170+
method: function
171+
prop: property
172+
return: returns
173+
virtual: abstract
174+
yield: yields
175+
preferType:
176+
array: Array
177+
bool: Boolean
178+
boolean: Boolean
179+
number: Number
180+
object: Object
181+
str: String
182+
string: String
183+
requireParamDescription: false
184+
requireReturn: false
185+
requireReturnDescription: false
186+
requireReturnType: false
187+
valid-typeof: warn
188+
yoda: warn

.github/workflows/pre-commit.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "18.0*"
7+
push:
8+
branches:
9+
- "18.0"
10+
- "18.0-ocabot-*"
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: "3.11"
20+
- name: Get python version
21+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22+
- uses: actions/cache@v1
23+
with:
24+
path: ~/.cache/pre-commit
25+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
26+
- name: Install pre-commit
27+
run: pip install pre-commit
28+
- name: Run pre-commit
29+
run: pre-commit run --all-files --show-diff-on-failure --color=always
30+
env:
31+
# Consider valid a PR that changes README fragments but doesn't
32+
# change the README.rst file itself. It's not really a problem
33+
# because the bot will update it anyway after merge. This way, we
34+
# lower the barrier for functional contributors that want to fix the
35+
# readme fragments, while still letting developers get README
36+
# auto-generated (which also helps functionals when using runboat).
37+
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
38+
SKIP: oca-gen-addon-readme
39+
- name: Check that all files generated by pre-commit are in git
40+
run: |
41+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
42+
if [ "$newfiles" != "" ] ; then
43+
echo "Please check-in the following files:"
44+
echo "$newfiles"
45+
exit 1
46+
fi

.github/workflows/stale.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 12 * * 0"
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Stale PRs and issues policy
12+
uses: actions/stale@v9
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
# General settings.
16+
ascending: true
17+
remove-stale-when-updated: true
18+
# Pull Requests settings.
19+
# 120+30 day stale policy for PRs
20+
# * Except PRs marked as "no stale"
21+
days-before-pr-stale: 120
22+
days-before-pr-close: 30
23+
exempt-pr-labels: "no stale"
24+
stale-pr-label: "stale"
25+
stale-pr-message: >
26+
There hasn't been any activity on this pull request in the past 4 months, so
27+
it has been marked as stale and it will be closed automatically if no
28+
further activity occurs in the next 30 days.
29+
30+
If you want this PR to never become stale, please ask a PSC member to apply
31+
the "no stale" label.
32+
# Issues settings.
33+
# 180+30 day stale policy for open issues
34+
# * Except Issues marked as "no stale"
35+
days-before-issue-stale: 180
36+
days-before-issue-close: 30
37+
exempt-issue-labels: "no stale,needs more information"
38+
stale-issue-label: "stale"
39+
stale-issue-message: >
40+
There hasn't been any activity on this issue in the past 6 months, so it has
41+
been marked as stale and it will be closed automatically if no further
42+
activity occurs in the next 30 days.
43+
44+
If you want this issue to never become stale, please ask a PSC member to
45+
apply the "no stale" label.
46+
47+
# 15+30 day stale policy for issues pending more information
48+
# * Issues that are pending more information
49+
# * Except Issues marked as "no stale"
50+
- name: Needs more information stale issues policy
51+
uses: actions/stale@v9
52+
with:
53+
repo-token: ${{ secrets.GITHUB_TOKEN }}
54+
ascending: true
55+
only-labels: "needs more information"
56+
exempt-issue-labels: "no stale"
57+
days-before-stale: 15
58+
days-before-close: 30
59+
days-before-pr-stale: -1
60+
days-before-pr-close: -1
61+
remove-stale-when-updated: true
62+
stale-issue-label: "stale"
63+
stale-issue-message: >
64+
This issue needs more information and there hasn't been any activity
65+
recently, so it has been marked as stale and it will be closed automatically
66+
if no further activity occurs in the next 30 days.
67+
68+
If you think this is a mistake, please ask a PSC member to remove the "needs
69+
more information" label.

0 commit comments

Comments
 (0)