Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][BKP] edi_oca: Backport from 14.0 #877

Merged
merged 365 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
365 commits
Select commit Hold shift + click to select a range
268ac37
[FIX] edi_oca: Missing changes of name
etobella May 10, 2021
38e25ea
edi_oca 14.0.1.0.1
OCA-git-bot May 10, 2021
275b08d
[IMP] update dotfiles
sbidoul May 14, 2021
9bce393
Added translation using Weblate (French)
Yvesldff Jun 17, 2021
9aeb235
Translated using Weblate (French)
Yvesldff Jun 17, 2021
693a19c
[FIX] edi_oca: show the exchange file name while there is no file yet.
LoisRForgeFlow Jun 22, 2021
4076157
[FIX] edi_oca: show the exchange file name while there is no file yet.
LoisRForgeFlow Jun 22, 2021
12af0a3
edi: add _find_existing_exchange_records to backend
simahawk Jun 23, 2021
f356493
[UPD] Update edi_oca.pot
oca-travis Jul 6, 2021
4e2d70d
edi_oca 14.0.1.1.0
OCA-git-bot Jul 6, 2021
562b758
Update translation files
oca-transbot Jul 6, 2021
9943560
[FIX] edi: allow the use of listeners.
LoisRForgeFlow Jul 5, 2021
c597233
edi_oca 14.0.1.2.0
OCA-git-bot Jul 14, 2021
a83f41e
edi_backend: update docstring
simahawk Sep 14, 2021
53542d9
edi_backend: fix var name
simahawk Sep 15, 2021
0614487
edi: exc record get file content as b64 optionally
simahawk Sep 16, 2021
1d9b9aa
edi: improve exchange record UI
simahawk Sep 17, 2021
f4479d8
edi: improve backend view extension
simahawk Sep 17, 2021
36ea535
edi: allow job channel conf by type
simahawk Sep 19, 2021
7418fc4
edi: specific method to get type settings
simahawk Sep 19, 2021
653849c
edi_backend: exclude class name from error txt
simahawk Sep 24, 2021
4ce1549
edi: exclude exception class from error msg
simahawk Sep 24, 2021
ef037cc
edi: improve exchange type and record UI
simahawk Sep 24, 2021
a0a487d
edi: add 'retry' action to exchange record
simahawk Sep 24, 2021
ddc5666
[UPD] Update edi_oca.pot
oca-travis Oct 13, 2021
34401aa
edi_oca 14.0.1.3.0
OCA-git-bot Oct 13, 2021
df67903
Update translation files
oca-transbot Oct 13, 2021
bc13688
[IMP] edi: Allow to ignore some jobs
etobella Oct 20, 2021
81a8b96
[UPD] Update edi_oca.pot
oca-travis Oct 22, 2021
850da38
edi_oca 14.0.1.4.0
OCA-git-bot Oct 22, 2021
db05bed
Update translation files
oca-transbot Oct 22, 2021
13309f9
edi: fix wrong status bar display new exc record
simahawk Oct 29, 2021
c33dc1a
edi: load main vars at init
simahawk Sep 22, 2021
f742026
edi: fix consumer mixin
simahawk Oct 30, 2021
ddc2e33
edi_oca 14.0.1.5.0
OCA-git-bot Nov 2, 2021
a173ab9
edi_oca 14.0.1.5.1
OCA-git-bot Nov 2, 2021
337c20e
[IMP] edi: ext identifier unique by type and backend
etobella Nov 2, 2021
83572e2
[UPD] Update edi_oca.pot
oca-travis Nov 9, 2021
3bfb427
edi_oca 14.0.1.6.0
OCA-git-bot Nov 9, 2021
ced66bc
Update translation files
oca-transbot Nov 9, 2021
58597ce
edi: backend._get_component inject custom ctx
simahawk Nov 4, 2021
07d4115
edi_oca 14.0.1.6.1
OCA-git-bot Nov 11, 2021
9bf3c05
[IMP] edi_oca: Pass development status to Beta
etobella Nov 30, 2021
77c1773
[UPD] README.rst
OCA-git-bot Dec 4, 2021
a57cf6b
edi_oca: remove filename from status msg
simahawk Nov 12, 2021
28f9528
edi: chatter mgs tmpl fix link
simahawk Nov 12, 2021
26425c9
edi: exchange record state use badge widget in tree view
simahawk Nov 12, 2021
6410c12
[UPD] Update edi_oca.pot
Jan 12, 2022
d18d395
edi_oca 14.0.1.7.0
OCA-git-bot Jan 12, 2022
9c209fa
Update translation files
oca-transbot Jan 12, 2022
687224b
[FIX] Fix access right issues when using actions
sebalix Jan 31, 2022
ac37449
edi_oca 14.0.1.7.1
OCA-git-bot Jan 31, 2022
542dfbf
edi: fix exc record name compute
simahawk Mar 9, 2022
68ea8df
edi: improve exchanges views and menu
simahawk Mar 9, 2022
e662045
edi: fix exc record missing _rec_name
simahawk Mar 10, 2022
7d36e8b
edi: exc record form name not needed
simahawk Mar 10, 2022
ac13094
edi: fix exc record sorting
simahawk Mar 10, 2022
ee70b1c
edi: get rid of name, use identifier
simahawk Mar 10, 2022
479fbc3
edi: backend action to view exchanges
simahawk Mar 10, 2022
8b59427
edi: backend action to view exchange types
simahawk Mar 10, 2022
23060c4
edi: update exc type adv settings help
simahawk Mar 11, 2022
830a82b
edi: move job func to exc record
simahawk Mar 11, 2022
fc67ce3
edi: show exchanges first
simahawk Mar 19, 2022
5e0cd68
edi_oca: avoid warning on exception args
simahawk Mar 19, 2022
0cb8dc3
[UPD] Update edi_oca.pot
Mar 19, 2022
330ec43
edi_oca 14.0.1.8.0
OCA-git-bot Mar 19, 2022
46eb899
Update translation files
oca-transbot Mar 19, 2022
5731579
[FIX] edi_oca: Restore removed functions
etobella Mar 23, 2022
8c20181
edi_oca 14.0.1.8.1
OCA-git-bot Mar 23, 2022
e975dd4
[IMP] edi: add exchange_filename search
JordiMForgeFlow May 5, 2022
0558a96
edi_oca 14.0.1.8.2
OCA-git-bot May 13, 2022
2b339af
edi_oca: fix exchange chatter link
simahawk Mar 19, 2022
8dca57d
edi_oca 14.0.1.8.3
simahawk May 20, 2022
55d8e97
[FIX] edi: remove span inside anchor
JordiMForgeFlow Feb 8, 2022
5b70301
edi_oca 14.0.1.8.4
OCA-git-bot May 24, 2022
33c97bd
edi_oca: allow to override dt for exchange filename
jcoux May 10, 2022
3b57eb4
[UPD] Update edi_oca.pot
Jun 1, 2022
ef28c25
edi_oca 14.0.1.9.0
OCA-git-bot Jun 1, 2022
2e9ea6e
Update translation files
oca-transbot Jun 1, 2022
ceb2b83
[FIX] edi_oca: Adapt tests
etobella Jun 13, 2022
8b984a0
edi_oca 14.0.1.9.1
OCA-git-bot Jun 13, 2022
8fff84b
edi_oca: add more generic mixin
simahawk Jul 28, 2022
753d452
edi_oca: bump 14.0.1.9.2
simahawk Jul 28, 2022
824efc9
edi_oca: add some TODOs
simahawk Aug 2, 2022
ab0b15c
edi_oca: improve auto btns
simahawk Aug 2, 2022
a3750ec
edi_oca: update ownership
simahawk Aug 2, 2022
0137346
edi_oca: fix docstring on consumer mixin
simahawk Aug 10, 2022
004de44
[UPD] Update edi_oca.pot
Aug 14, 2022
fdd83e4
[UPD] README.rst
OCA-git-bot Aug 14, 2022
f08cf1e
edi_oca 14.0.1.11.0
OCA-git-bot Aug 14, 2022
6ce5b46
Update translation files
oca-transbot Aug 14, 2022
befdf7e
[IMP] edi: archive edi_backend
JaumeBforgeFlow Jul 8, 2022
91eeed8
[UPD] Update edi_oca.pot
Aug 17, 2022
88da40d
edi_oca 14.0.1.12.0
OCA-git-bot Aug 17, 2022
439a0a4
Update translation files
oca-transbot Aug 17, 2022
332fa1f
edi: add meth _is_valid_edi_action
simahawk Aug 11, 2022
1dcebf7
edi: improve consumer mixin helpers
simahawk Aug 11, 2022
51c366e
edi: fix exc_rec.action_exchange_generate
simahawk Aug 11, 2022
673260c
edi: improve exc_rec._trigger_edi_event
simahawk Aug 11, 2022
0b56809
edi: fix process break on error ctx key
simahawk Aug 14, 2022
9dfdf52
edi: improve create record validation
simahawk Aug 14, 2022
291febc
edi: ease creation of child records
simahawk Aug 17, 2022
6b25257
edi: add edi_id_mixin
simahawk Aug 17, 2022
3194ae6
edi: silent loggers in tests
simahawk Jul 15, 2022
92ae39a
[UPD] Update edi_oca.pot
Aug 19, 2022
1e876bd
edi_oca 14.0.1.13.0
OCA-git-bot Aug 19, 2022
da32001
Update translation files
oca-transbot Aug 19, 2022
2062c70
edi: fix consumer mixin test
simahawk Aug 19, 2022
e3e89d0
edi: improve consumer mixin w/ origin
simahawk Aug 19, 2022
408e807
edi: add test for create child/ack
simahawk Aug 19, 2022
8561d14
edi: add 'ack for' on type
simahawk Aug 19, 2022
1434ce5
edi: improve exc type search
simahawk Aug 19, 2022
bfb2621
edi: fix ack record compute
simahawk Aug 22, 2022
db69cf1
edi: fix exchange ordering
simahawk Aug 22, 2022
13283a6
edi: fix record and type copy on fields
simahawk Aug 25, 2022
af1511e
edi: fix error msg typo
simahawk Aug 27, 2022
466a3df
edi: add exc.type.set_settings method
simahawk Aug 27, 2022
3c37519
edi: improve chatter msg w/ type detail
simahawk Aug 27, 2022
0e48ba4
edi: fix _cron_check_output_exchange_sync
simahawk Aug 28, 2022
32fe7db
[UPD] Update edi_oca.pot
Aug 29, 2022
f0e141f
edi_oca 14.0.1.14.0
OCA-git-bot Aug 29, 2022
ad26eee
Update translation files
oca-transbot Aug 29, 2022
ac1879d
edi: fix backward compat usage of _has_exchange_record_domain
simahawk Sep 5, 2022
54449c0
edi_oca 14.0.1.14.1
OCA-git-bot Sep 5, 2022
da2faf4
edi: allow search consumers by exc type
simahawk Sep 2, 2022
b99e890
edi: fix action_view_edi_records
simahawk Sep 2, 2022
54fb5f0
edi: improve consumer record count perf
simahawk Sep 2, 2022
8ab0a98
edi: fix record missing indexes
simahawk Sep 2, 2022
7441b9d
edi: imp backend check input/output
simahawk Sep 2, 2022
e8ce7d3
edi: improve cron names
simahawk Sep 2, 2022
18f23c5
edi: exchange type add TODO
simahawk Sep 5, 2022
5c029f5
[UPD] Update edi_oca.pot
Sep 6, 2022
99e7c10
edi_oca 14.0.1.15.0
OCA-git-bot Sep 6, 2022
7894670
Update translation files
oca-transbot Sep 6, 2022
a22dc17
edi: add test for exc.record.action_retry
simahawk Sep 2, 2022
966473a
edi: fix exc.record._compute_retryable
simahawk Sep 2, 2022
77bc4db
edi: add quick exec option by type
simahawk Sep 2, 2022
47fc4ad
[UPD] Update edi_oca.pot
Sep 6, 2022
538336b
edi_oca 14.0.1.16.0
OCA-git-bot Sep 6, 2022
60d3305
Update translation files
oca-transbot Sep 6, 2022
260b221
edi: drop ack record auto create
simahawk Sep 16, 2022
903bef7
edi_oca 14.0.1.16.1
OCA-git-bot Oct 1, 2022
e4a63c3
edi: fix _get_component ctx propagation
simahawk Oct 5, 2022
19d5167
edi_oca 14.0.1.16.2
OCA-git-bot Oct 5, 2022
89c8b20
[FIX] edi: output might be not UTF-8 encodable, like PDFs
etobella Jun 23, 2021
9304963
edi_oca 14.0.1.16.3
OCA-git-bot Nov 30, 2022
892ae53
edi: add 'as_bytes' option to _get_file_content
simahawk Oct 3, 2022
bda9b47
edi_oca 14.0.1.17.0
OCA-git-bot May 16, 2023
45b6c5e
edi_oca: avoid backend mismatch
florentx May 16, 2023
63d6435
edi_oca: avoid ghost exchange records
florentx May 16, 2023
5a82833
edi_oca: log warning for deleted records
florentx May 17, 2023
309ba27
edi_oca: assertion was not executed
florentx May 17, 2023
6674dff
edi: unify action complete notification
simahawk May 17, 2023
3da1209
edi: trigger generic event on action complete
simahawk May 17, 2023
b7cdee1
edi_oca 14.0.1.17.1
OCA-git-bot May 17, 2023
ae4bb5a
edi_oca 14.0.1.17.2
OCA-git-bot May 17, 2023
3a308c7
edi_oca 14.0.1.17.3
OCA-git-bot May 18, 2023
44b743d
edi: trigger generic event on related record
simahawk May 18, 2023
c8f8d2c
edi: mark every session w/ 'edi_framework' ctx key
simahawk May 18, 2023
8e04967
edi: exc.record._set_related_record use sudo
simahawk May 19, 2023
cfbe595
edi: speed up exchange record views
simahawk May 22, 2023
1d63bf1
edi: add 'active' field to exchange type
simahawk May 24, 2023
a43b9f6
edi: improve backend view filter inactive
simahawk May 24, 2023
04fdb9d
[UPD] Update edi_oca.pot
May 25, 2023
75dc358
edi_oca 14.0.1.18.0
OCA-git-bot May 25, 2023
cfc6ba9
Update translation files
weblate May 25, 2023
ac3e450
edi: fix related record missing broken views
simahawk May 29, 2023
97b4c52
[UPD] Update edi_oca.pot
May 30, 2023
e9ffdbe
edi_oca 14.0.1.18.1
OCA-git-bot May 30, 2023
a5b71f3
Update translation files
weblate May 30, 2023
450a923
edi: add disable flag to consumer
simahawk May 26, 2023
fcbe597
edi: allow enable/disable exc type by partner
simahawk May 29, 2023
4727a6d
[UPD] Update edi_oca.pot
Aug 11, 2023
880e687
edi_oca 14.0.1.19.0
OCA-git-bot Aug 11, 2023
eccfb22
Update translation files
weblate Aug 11, 2023
32b72e6
edi: refactor model rules w/ specific model
simahawk Jul 4, 2023
20f5507
edi: unify menu item labels
simahawk Jul 4, 2023
dd31f4a
edi: allow form btn actions customization
simahawk Jul 4, 2023
80ade8b
edi: refactor model rules backward compat
simahawk Aug 9, 2023
638d4f2
edi_oca: bump 14.0.1.20.0
simahawk Aug 12, 2023
fd351d9
[UPD] Update edi_oca.pot
Aug 21, 2023
9fc12e3
[UPD] README.rst
OCA-git-bot Aug 21, 2023
31a1145
edi_oca: fix consumer mixin exchange record count
petrus-v Jun 23, 2023
35fb1fe
edi_oca 14.0.1.20.1
OCA-git-bot Aug 30, 2023
6fba592
edi_oca: avoid duplicate field name
petrus-v Aug 31, 2023
9a38c73
[UPD] Update edi_oca.pot
Sep 2, 2023
c7c51fb
edi_oca 14.0.1.20.2
OCA-git-bot Sep 2, 2023
94a6f81
[UPD] README.rst
OCA-git-bot Sep 3, 2023
542aafd
Update translation files
weblate Sep 2, 2023
c2eea8c
Update translation files
weblate Sep 3, 2023
3ac49a7
[FIX] edi_oca: Adapt tests to changes on error messages
etobella Sep 15, 2023
9429009
[UPD] Update edi_oca.pot
Sep 27, 2023
bf4e3dd
[BOT] post-merge updates
OCA-git-bot Sep 27, 2023
32fdba4
Revert "[FIX] edi_oca: Adapt tests to changes on error messages"
simahawk Oct 2, 2023
c8adb5d
edi: drop useless view form/tree strings
simahawk Oct 2, 2023
4d8b0b9
edi: fix access errors tests
simahawk Oct 2, 2023
ec8d0f7
edi_oca: fix _logger.debug usage
nilshamerlinck Oct 2, 2023
0460870
edi_oca: fix test class names
simahawk Aug 11, 2023
d38f099
edi_oca: fix edi.exchange.type.create
simahawk Aug 11, 2023
e5366fa
[BOT] post-merge updates
OCA-git-bot Oct 2, 2023
58589cd
edi: exc type fix view archived rules
simahawk Sep 7, 2023
8152b01
edi: exc type view allow archive rules
simahawk Sep 7, 2023
4f2b7d7
edi: fix archive rules when type archived
simahawk Sep 7, 2023
4b5237f
[BOT] post-merge updates
OCA-git-bot Oct 4, 2023
2229e6b
Update translation files
weblate Oct 10, 2023
ff68603
edi_oca: fix edi_id label
simahawk May 15, 2023
45c10c1
edi_oca: tests.common ease ctx setup
simahawk Aug 7, 2023
5c5733c
[UPD] Update edi_oca.pot
Oct 10, 2023
7a06339
[BOT] post-merge updates
OCA-git-bot Oct 10, 2023
859aa56
Update translation files
weblate Oct 10, 2023
0b2f21a
[FIX] edi_oca: avoid flooding error in the record chatter
MiquelRForgeFlow Oct 25, 2023
f7c2ce6
[UPD] Update edi_oca.pot
Oct 27, 2023
c574219
*: Fix pylint
etobella Oct 29, 2023
63b9e51
[UPD] Update edi_oca.pot
Oct 29, 2023
71c8544
[BOT] post-merge updates
OCA-git-bot Oct 29, 2023
c3f2314
Update translation files
weblate Oct 29, 2023
6d579ab
[BOT] post-merge updates
OCA-git-bot Oct 30, 2023
725804f
[IMP] edi_oca: Show traceback on exception errors
HviorForgeFlow Nov 6, 2023
2167b9a
[BOT] post-merge updates
OCA-git-bot Nov 21, 2023
6324960
edi: fix job return msg
simahawk Oct 19, 2023
c4fdde5
edi: make send failed job retryable
simahawk Oct 19, 2023
967f6ca
edi: test_same_code_same_backend mute sql logger
simahawk Nov 21, 2023
774e6ec
edi: add generate_ok message
simahawk Jul 5, 2023
363ce69
Added translation using Weblate (Spanish)
Ivorra78 Nov 22, 2023
57274cb
Translated using Weblate (Spanish)
Ivorra78 Nov 22, 2023
dde0d16
Translated using Weblate (Spanish)
Ivorra78 Nov 22, 2023
bbe40c9
[UPD] Update edi_oca.pot
Nov 23, 2023
c456950
[BOT] post-merge updates
OCA-git-bot Nov 23, 2023
309e36d
Update translation files
weblate Nov 23, 2023
ad134c8
Translated using Weblate (Spanish)
Ivorra78 Nov 26, 2023
7cc22cd
edi: fix backend jobs test old api
simahawk Jul 6, 2023
892601d
edi: chain generate/send jobs
simahawk Jul 5, 2023
317bcfa
edi: improve send job retry
simahawk Nov 24, 2023
60c9270
edi: add file checksum
simahawk Nov 24, 2023
03080e4
edi: use job identity_key
simahawk Nov 24, 2023
91d4bae
edi: raise send job prio to max
simahawk Nov 29, 2023
3d04943
edi: fix consumer mixin copy origin exc record
simahawk Nov 29, 2023
e98d54d
[UPD] Update edi_oca.pot
Nov 30, 2023
6dd9285
[BOT] post-merge updates
OCA-git-bot Nov 30, 2023
3458135
Update translation files
weblate Nov 30, 2023
8398ff0
[BOT] post-merge updates
OCA-git-bot Nov 30, 2023
2479b11
[BPRT] edi: Backport from 14.0
etobella Mar 11, 2021
2ff1039
[BPRT] edi: Backport from 14.0 (second part)
Mar 11, 2021
34b40ca
[UPD] copier dotfiles
HviorForgeFlow Jul 26, 2023
8e6300b
[IMP] pre-commit stuff
MiquelRForgeFlow Nov 28, 2023
6bcb846
[BPRT] edi: Backport from 14.0 (third part)
MiquelRForgeFlow Nov 29, 2023
4102f36
[FIX] account_invoice_ubl,base_ubl: backport fix from v13
MiquelRForgeFlow Nov 29, 2023
414d625
[FIX] account_invoice_import2data: add poppler-utils in manifest
MiquelRForgeFlow Jan 17, 2024
a51be65
[FIX] account_invoice_facturx: commented the test
Jan 24, 2024
0c1ab81
[IMP] edi_oca: add encoding management for exchange type
JordiMForgeFlow Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.19.2
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: false
github_check_license: false
github_ci_extra_env: {}
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: false
include_wkhtmltopdf: false
odoo_test_flavor: Both
odoo_version: 12.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
rebel_module_groups: []
repo_description: Electronic Data Interchange modules
repo_name: Electronic Data Interchange modules
repo_slug: edi
repo_website: https://github.com/OCA/edi
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[.eslintrc,*.{json,yml,yaml,rst,md}]
[*.{json,yml,yaml,rst,md}]
indent_size = 2

# Do not configure editor for libs and autogenerated content
[*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst]
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
charset = unset
end_of_line = unset
indent_size = unset
Expand Down
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
# E123,E133,E226,E241,E242 are ignored by default by pep8 and flake8
# F811 is legal in odoo 8 when we implement 2 interfaces for a method
# F601 pylint support this case with expected tests
# W503 changed by W504 and OCA prefers allow both
# E203: whitespace before ':' (black behaviour and not pep8 compliant)
ignore = E123,E133,E226,E241,E242,F811,F601,W503,W504,E203
max-line-length = 88
per-file-ignores=
__init__.py:F401

46 changes: 46 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: pre-commit

on:
pull_request:
branches:
- "12.0*"
push:
branches:
- "12.0"
- "12.0-ocabot-*"

jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.6"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi
69 changes: 69 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 12 * * 0"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
ascending: true
remove-stale-when-updated: true
# Pull Requests settings.
# 120+30 day stale policy for PRs
# * Except PRs marked as "no stale"
days-before-pr-stale: 120
days-before-pr-close: 30
exempt-pr-labels: "no stale"
stale-pr-label: "stale"
stale-pr-message: >
There hasn't been any activity on this pull request in the past 4 months, so
it has been marked as stale and it will be closed automatically if no
further activity occurs in the next 30 days.

If you want this PR to never become stale, please ask a PSC member to apply
the "no stale" label.
# Issues settings.
# 180+30 day stale policy for open issues
# * Except Issues marked as "no stale"
days-before-issue-stale: 180
days-before-issue-close: 30
exempt-issue-labels: "no stale,needs more information"
stale-issue-label: "stale"
stale-issue-message: >
There hasn't been any activity on this issue in the past 6 months, so it has
been marked as stale and it will be closed automatically if no further
activity occurs in the next 30 days.

If you want this issue to never become stale, please ask a PSC member to
apply the "no stale" label.

# 15+30 day stale policy for issues pending more information
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
only-labels: "needs more information"
exempt-issue-labels: "no stale"
days-before-stale: 15
days-before-close: 30
days-before-pr-stale: -1
days-before-pr-close: -1
remove-stale-when-updated: true
stale-issue-label: "stale"
stale-issue-message: >
This issue needs more information and there hasn't been any activity
recently, so it has been marked as stale and it will be closed automatically
if no further activity occurs in the next 30 days.

If you think this is a mistake, please ask a PSC member to remove the "needs
more information" label.
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: tests

on:
pull_request:
branches:
- "12.0*"
push:
branches:
- "12.0"
- "12.0-ocabot-*"

jobs:
unreleased-deps:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v3
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
fi
fi
done
test:
runs-on: ubuntu-20.04
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
name: test with OCB
makepot: "true"
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
run: oca_install_addons
- name: Check licenses
run: manifestoo -d . check-licenses
continue-on-error: true
- name: Check development status
run: manifestoo -d . check-dev-status --default-dev-status=Beta
continue-on-error: true
- name: Initialize test db
run: oca_init_test_database
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v1
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand All @@ -13,14 +16,14 @@ build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
*.eggs

# Installer logs
pip-log.txt
Expand All @@ -40,6 +43,19 @@ coverage.xml
# Pycharm
.idea

# Eclipse
.settings

# Visual Studio cache/options directory
.vs/
.vscode

# OSX Files
.DS_Store

# Django stuff:
*.log

# Mr Developer
.mr.developer.cfg
.project
Expand All @@ -55,5 +71,5 @@ docs/_build/
*~
*.swp

# OSX Files
*.DS_Store
# OCA rules
!static/lib/
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
# Maybe reactivate this when all README files include prettier ignore tags?
^README\.md$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3.6
repos:
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/OCA/edi"]
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.1.8
hooks:
- id: setuptools-odoo-make-default
- repo: https://github.com/OCA/mirrors-flake8
rev: v3.4.1
hooks:
- id: flake8
name: flake8 excluding __init__.py
exclude: __init__\.py
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.5.3
hooks:
- id: pylint
name: pylint with optional checks
args:
- --rcfile=.pylintrc
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==3.5.0
- id: pylint
name: pylint with mandatory checks
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps
Loading
Loading