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

18.0 mig base tier validation #964

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
dbca471
[9.0][ADD] base_tier_validation
LoisRForgeFlow Dec 1, 2017
6470c9c
fix: blocking unneded records
LoisRForgeFlow Feb 28, 2018
67546fa
[9.0][IMP] base_tier_validation: tries automatically request validati…
LoisRForgeFlow Mar 2, 2018
9676419
[9.0][IMP] base_tier_validation: filter out reviews not pending
LoisRForgeFlow Mar 2, 2018
ddb820e
make possible to filter by validated records
LoisRForgeFlow Mar 2, 2018
6367618
allow to add exceptions for fields that can be written on under valid…
LoisRForgeFlow Mar 15, 2018
9ba9a2e
[9.0][IMP] base_tier_validation:
LoisRForgeFlow Mar 23, 2018
eb76137
[10.0][MIG] base_tier_validation
LoisRForgeFlow Mar 26, 2018
bcc420b
[11.0][MIG] base_tier_validation
LoisRForgeFlow May 9, 2018
f86eaa2
[11.0][IMP] base_tier_validation: add tests
LoisRForgeFlow May 10, 2018
6b52b14
add 'can_review' to tier.validation so that the buttons approve
JordiBForgeFlow Jul 3, 2018
02b8238
[11.0][IMP] base_tier_validation: enhance views and register who does…
LoisRForgeFlow Jan 15, 2019
1e509ea
[11.0][FIX] base_tier_validation
AdriaGForgeFlow Feb 15, 2019
6bd9ae2
Add name attribute to filter
AdriaGForgeFlow Feb 15, 2019
abd06ad
[MIG] base_tier_validation: Migration to 12.0
Feb 18, 2019
2123665
[ADD] icon.png
OCA-git-bot May 27, 2019
4c32246
[11.0][IMP] base_tier_validation
AdriaGForgeFlow Feb 25, 2019
9b3ceb8
[IMP] base_tier_validation: Pass parameters as functions
etobella Apr 10, 2019
9be6757
[IMP] base_tier_validation: Add a chatter message if the model has it
etobella May 8, 2019
573b526
[11.0][FIX] base_tier_validation: make name translatable and display …
LoisRForgeFlow May 15, 2019
e908e36
[11.0][UPD] base_tier_validation: roadmap.
LoisRForgeFlow May 15, 2019
3dd910a
[12.0][MIG] base_tier_validation: adapt systray to v12.
LoisRForgeFlow May 28, 2019
bf124a8
Added translation using Weblate (Spanish)
LoisRForgeFlow May 29, 2019
dcfcd92
[12.0][FIX] dropdown style width and position
AdriaGForgeFlow May 29, 2019
4357b41
[12.0][IMP] base_tier_validation module
AdriaGForgeFlow Jun 14, 2019
afa0050
[FIX] base_tier_validation : singleton error
fmdl Jul 4, 2019
f553406
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 2, 2019
27d2cc0
Translated using Weblate (Chinese (Simplified))
digitalsatori Oct 21, 2019
ee0900b
[11.0][IMP] base_tier_validation: add an optional email
LoisRForgeFlow Nov 12, 2019
a2a65ed
[11.0][FIX] base_tier_validation: singleton issue
LoisRForgeFlow Nov 22, 2019
2afcf3c
[12.0][FIX] base_tier_validation: message_subscribe_users removed in v12
LoisRForgeFlow Nov 26, 2019
8558d15
[12.0][IMP] base_tier_validation
ps-tubtim Nov 26, 2019
b63ddb4
[IMP] base_tier_validation: black, isort
pegonzalezspesol Dec 1, 2019
87b25fe
[MIG] 13.0 base_tier_validation
pegonzalezspesol Dec 1, 2019
45ddd46
[12.0][fix] base_tier_validation
ps-tubtim Dec 2, 2019
bd76dcd
[13.0][UPD] base_tier_validation:
LoisRForgeFlow Dec 18, 2019
1de14a8
[13.0][UPD] base_tier_validation: update copyrights information after…
LoisRForgeFlow Dec 18, 2019
0cac1b5
Added translation using Weblate (Dutch)
Jan 15, 2020
d567c00
[IMP] solve pre commit warnings
jimhoefnagels Jan 22, 2020
a36979a
[FIX] When accepting or rejecting a review followers should not be no…
Feb 13, 2020
4cf6356
[12.0][FIX] base_tier_validation: Unlink reviews when unlink a valida…
etobella Mar 18, 2020
5f56348
Translated using Weblate (Chinese (Simplified))
dong-z Mar 23, 2020
6556468
[FIX] tier_validation: Fix usage of can_review on tier.review
etobella Mar 31, 2020
72e5b55
[FIX] tier_validation: Security issues with record permissions
etobella Mar 31, 2020
7a6f414
pre-commit update
sbidoul Apr 22, 2020
531c298
Translated using Weblate (Spanish)
eantones May 6, 2020
33ec308
[FIX] base_tier_validation: All models are visible when create a new …
sergio-teruel May 26, 2020
6104c13
[IMP] base_tier_validation: notification hook
Jun 30, 2020
db4bc30
[IMP] base_tier_validation: Make test more resilient with sales and p…
sergio-teruel Jul 13, 2020
14a3ac4
Update base_tier_validation/tests/test_tier_validation.py
sergio-teruel Jul 14, 2020
99e180e
[FIX] base_tier_validation: Remove test to avoid crash tests with oth…
sergio-teruel Jul 21, 2020
033921c
[13.0][FIX] base_tier_validation, fix approve by sequence problem
kittiu Aug 29, 2020
3c24dee
[12.0][FIX] base_tier_validation : convert datetime timezone
Saran440 Mar 25, 2020
bcc5515
Translated using Weblate (Chinese (Simplified))
dong-z Sep 24, 2020
c80cc37
[IMP] : black, isort, prettier
kittiu Oct 26, 2020
02a3ec2
[14.0][MIG] base_tier_validation
kittiu Oct 26, 2020
0562a76
[IMP] base_tier_validation: state check
yostashiro Nov 2, 2020
4ec0440
[13.0][IMP] base_tier_validation: make module multi-company compatible.
LoisRForgeFlow Nov 10, 2020
2445eb2
Enhance definition's view, add Tabs
kittiu Nov 19, 2020
802dd5e
[14.0][UPD] base_tier_validation: update readme
LoisRForgeFlow Nov 19, 2020
c556801
[IMP] base_tier_validation: Remove unnecessary modification of views
etobella Dec 13, 2020
5512af3
[FIX] fix test error, by separate test view into another class
kittiu Dec 17, 2020
af38aee
[FIX] tier_validation: Fix views from template as state was not used
etobella Jan 28, 2021
2008cf9
[14.0][FIX] base_tier_validation, improve accuracy of systray
kittiu Feb 5, 2021
db8a2fb
[14.0][IMP] base_tier_validation, add 'Todo by' column in review table
kittiu Feb 9, 2021
bdaa5df
[14.0][FIX] base_tier_validation, access_token as exception field
kittiu Feb 18, 2021
e6cd943
[FIX] base_tier_validation: correct fusion of domains
MiquelRForgeFlow Mar 10, 2021
3069d1b
Translated using Weblate (Spanish)
anasuarez1 Mar 16, 2021
43358a8
[IMP] base_tier_validation: support to search for records where valid…
JordiBForgeFlow Apr 19, 2021
b310eda
[FIX] base_tier_validation: External users receive the internal notif…
sergio-teruel Apr 16, 2021
74763cf
Added translation using Weblate (French)
Yvesldff May 14, 2021
87c569b
[14.0][IMP] base_tier_validation, use sudo to post message
kittiu Jul 3, 2021
5791809
[14.0][ENH] Nootification message on restart tier
newtratip Jul 15, 2021
68f2f6d
[FIX] base_tier_validation: avoid singleton error
JordiBForgeFlow Jul 5, 2021
154fd0a
[14.0][IMP] base_tier_validation: add new review type
MateuGForgeFlow Jul 28, 2021
1735b55
Added translation using Weblate (Italian)
alessandro-fiorino Aug 11, 2021
a9954ce
Added translation using Weblate (Spanish (Mexico))
alan196 Aug 16, 2021
9a4162e
[13.0][IMP] base_tier_validation: review_user_count perfromance
AdriaGForgeFlow Sep 27, 2021
52a1db6
[14.0][IMP] base_tier_validation, add tier description on stripe
kittiu Aug 6, 2021
6febc13
[14.0][ENH] base_tier_validation, add configuration
kittiu Nov 12, 2021
0dd5c94
Added translation using Weblate (Swedish)
simonstromb Nov 24, 2021
6c7d1fd
[IMP] base_tier_validation: black, isort, prettier
JasminSForgeFlow Dec 20, 2021
fca6a27
[MIG] base_tier_validation: Migration to 15.0
JasminSForgeFlow Dec 20, 2021
5a44f74
[UPD] Update base_tier_validation.pot
Dec 22, 2021
3c77c86
[UPD] README.rst
OCA-git-bot Dec 22, 2021
59945e5
[FIX+IMP] base_tier_validation: Don't mess searches with NewId + non …
pedrobaeza Mar 8, 2022
ae5eff5
base_tier_validation 15.0.1.0.1
OCA-git-bot Mar 9, 2022
e88c947
[IMP] base_tier_validation: introduce new fields for validation messa…
JordiBForgeFlow Apr 10, 2022
08212af
[UPD] Update base_tier_validation.pot
Apr 12, 2022
de3ef3b
base_tier_validation 15.0.1.1.0
OCA-git-bot Apr 12, 2022
b520ee2
Update translation files
oca-transbot Apr 12, 2022
f1883c5
[FIX] base_tier_validation: Icon error when validated
CarlosRoca13 Jul 5, 2022
a1f1b23
base_tier_validation 15.0.1.2.0
OCA-git-bot Aug 9, 2022
a834855
[UPD] Update base_tier_validation.pot
Sep 21, 2022
93e22ce
Update translation files
oca-transbot Sep 21, 2022
320ba57
[MIG]: base_tier_validation: Migration to 16
bizzappdev Oct 19, 2022
908eaa8
[UPD] Update base_tier_validation.pot
Dec 30, 2022
3561902
[UPD] README.rst
OCA-git-bot Dec 30, 2022
e1a3694
[UPD] Update base_tier_validation.pot
Dec 30, 2022
21daac7
Update translation files
weblate Dec 30, 2022
96380de
Translated using Weblate (Italian)
francesco-ooops Jan 2, 2023
7b6a017
Added translation using Weblate (Turkish)
tate11 Feb 7, 2023
45d4787
[FIX] pre-commit warnings
CRogos Feb 16, 2023
6bb5e61
base_tier_validation 16.0.1.0.1
OCA-git-bot Feb 17, 2023
474cf96
Translated using Weblate (Italian)
mymage Apr 5, 2023
26e5c18
base_tier_validation: skip_validation_check
ilyasProgrammer Mar 9, 2023
7d689fa
base_tier_validation: Use domain for filtering values
etobella Apr 12, 2023
581ecee
base_tier_validation 16.0.1.0.2
OCA-git-bot Apr 20, 2023
6324d2d
base_tier_validation 16.0.1.0.3
OCA-git-bot Apr 20, 2023
dd8442f
[FIX] base_tier_validation: Detect if model has active field
etobella Apr 20, 2023
e94bf46
base_tier_validation 16.0.1.0.4
OCA-git-bot Apr 24, 2023
bba7b74
Translated using Weblate (Italian)
mymage May 22, 2023
a4561c6
Translated using Weblate (Italian)
francesco-ooops May 24, 2023
273033c
Translated using Weblate (Italian)
mymage May 29, 2023
9151035
[UPD] Update base_tier_validation.pot
May 29, 2023
0896852
[IMP] base_tier_validation: Misc changes
victoralmau May 16, 2023
9c34689
base_tier_validation 16.0.1.0.5
OCA-git-bot Jun 30, 2023
d0ca41a
Translated using Weblate (Italian)
mymage Jun 7, 2023
f75baf4
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
306cba3
[UPD] README.rst
OCA-git-bot Sep 3, 2023
83e4a50
[IMP] base_tier_validation: show in res.config.settings already migra…
alan196 Sep 6, 2023
e744b4c
[IMP] base_tier_validation: Add method to allow remove reviews.
victoralmau Aug 31, 2023
2e9a753
base_tier_validation 16.0.1.0.6
OCA-git-bot Sep 11, 2023
fefab96
[UPD] README.rst
OCA-git-bot Sep 11, 2023
930ce3e
oca-github-bot post-merge updates
OCA-git-bot Sep 18, 2023
beb4dfe
[UPD] Update base_tier_validation.pot
Sep 18, 2023
06bcb60
Translated using Weblate (Spanish)
Ivorra78 Oct 3, 2023
6c2eb09
[FIX] base_tier_validation: Exclude cancel records from pending count
OpenCode Oct 10, 2023
cf4c66d
Translated using Weblate (French)
houzefa-abba Oct 19, 2023
c689cbd
[IMP] base_tier_validation: Add validation_status field to tier.valid…
victoralmau Oct 17, 2023
dc4bb45
[IMP] base_tier_validation: Add tier.validation.tester models to _get…
victoralmau Oct 24, 2023
3b0f646
[UPD] Update base_tier_validation.pot
Oct 24, 2023
06e8f0d
Update translation files
weblate Oct 28, 2023
1511952
[PERF] base_tier_validation: filter records with reviews before compu…
celm1990 Oct 27, 2023
0d927e0
Translated using Weblate (Italian)
mymage Nov 2, 2023
7702640
[IMP] base_tier_validation: update tests to support messages
bosd Oct 22, 2023
c837a0c
[IMP] base_tier_validation: use sudo to post message
bosd Oct 22, 2023
00d361d
base_tier_validation, approve by sequence with option to bypass for s…
kittiu Nov 5, 2021
f8a8838
Translated using Weblate (Italian)
mymage Nov 12, 2023
f26d703
[IMP] base_tier_validation: filter tier definition for the current co…
celm1990 Nov 11, 2023
0b602be
[UPD] Update base_tier_validation.pot
Nov 17, 2023
e77493d
Update translation files
weblate Nov 17, 2023
91797f3
Translated using Weblate (Spanish)
Ivorra78 Nov 18, 2023
99d52bb
[IMP] base_tier_validation: test performance improvement
bosd Nov 29, 2023
cd0a0f9
[IMP] base_tier_validation: Add _prepare_tier_review_vals() methot to…
victoralmau Nov 15, 2023
e3c70d1
[IMP] base_tier_validation: pre-commit stuff
rven Dec 5, 2023
9057c06
[MIG] base_tier_validation: Migration to 17.0
rven Dec 5, 2023
5c76d94
base_tier_validation: only post notifications to reciepients
bosd Oct 22, 2023
15a2f97
[FIX] base_tier_validation: field is edtitable
fmdl Sep 15, 2023
51f3932
[UPD] Update base_tier_validation.pot
Jan 10, 2024
a2dfdf4
[MIG] base_tier_validation_formula: Migrate to version 17.0
Jan 8, 2024
52be4a7
[IMP] base_tier_validation: pre-commit stuff
bosd Jan 10, 2024
e6d76b7
[IMP] base_tier_validation: Merge with base_tier_validation_waiting
bosd Jan 10, 2024
960f6ce
[IMP] base_tier_validation: review comments
bosd Jan 11, 2024
46795b0
[UPD] Update base_tier_validation.pot
Jan 25, 2024
5cd4386
[FIX] base_tier_validation: Change web_ribbon text to title to make i…
victoralmau Jan 31, 2024
5d71f91
[UPD] Update base_tier_validation.pot
Jan 31, 2024
88c6f64
Update translation files
weblate Feb 3, 2024
a3945e8
[UPD] Update base_tier_validation.pot
Feb 8, 2024
b407d28
Update translation files
weblate Feb 8, 2024
583276f
[IMP]base_tier_validation: UI Improvements
bosd Jan 14, 2024
9989759
[UPD] Update base_tier_validation.pot
Feb 12, 2024
87bca60
Update translation files
weblate Feb 12, 2024
ae1d868
Translated using Weblate (Spanish)
Ivorra78 Feb 12, 2024
6585efb
Translated using Weblate (Italian)
mymage Feb 13, 2024
47e646a
Translated using Weblate (Italian)
mymage Feb 14, 2024
b85a428
Translated using Weblate (Italian)
mymage Feb 14, 2024
025507f
Translated using Weblate (Italian)
mymage Feb 14, 2024
319a796
[FIX] base_tier_validation: Do not write review fields in pending state
bosd Feb 14, 2024
115460b
[IMP] base_tier_validation: Test created notification body
bosd Feb 14, 2024
d1d313b
Incorrect displayed timezone for tier review validation date
evanomnisoft Jan 24, 2024
e7ad162
Update CONTRIBUTORS.rst
evanomnisoft Jan 24, 2024
b5471b6
Renamed variables for logical consistentcy
evanomnisoft Feb 9, 2024
422f00b
Translated using Weblate (Dutch (nl_NL))
bosd Feb 18, 2024
2c8bf57
[FIX][17.0]base_tier_validation: Fixed selection not translated.
bizzappdev Mar 9, 2024
12172b1
[UPD] Update base_tier_validation.pot
Mar 11, 2024
495413c
Update translation files
weblate Mar 11, 2024
cc3f292
Translated using Weblate (Italian)
mymage Mar 12, 2024
1bbbcaa
[17.0] [IMP] base_tier_validation: Block notifications
manuelregidor Feb 28, 2024
81f6dc7
[UPD] Update base_tier_validation.pot
Mar 22, 2024
6ccbf63
Update translation files
weblate Mar 22, 2024
e82b38e
Translated using Weblate (Italian)
mymage Mar 25, 2024
a151d47
[FIX] base_tier_validation: prevent useless loop
fmdl Feb 23, 2024
5fc834b
Translated using Weblate (Spanish)
Ivorra78 Apr 23, 2024
b7f5c61
Translated using Weblate (Italian)
mymage May 2, 2024
67892bf
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
3879751
Translated using Weblate (Italian)
mymage Jun 26, 2024
41c67e5
base_tier_validation: multiple comment with approve_sequence_bypass
mathben Aug 2, 2023
8cfbaf6
[ADD] set all form fields readonly when under validation
hbrunn Aug 29, 2023
73648c2
[IMP] configurable domain for readonly fields in validation
Kev-Roche May 24, 2024
7a206c0
[FIX] base_tier_validation: Tier Validation Exceptions
Shide Jun 27, 2024
682b051
[FIX] base_tier_validation: Invalidate review model on tests
Shide Jul 2, 2024
42c0c02
[FIX] base_tier_validation: Fix how readonly modifiers are built
Shide Jul 15, 2024
93a8cd1
[16.0][FIX] base_tier_validation, add sudo call to models without exp…
ChrisOForgeFlow Jul 10, 2024
c0c2c88
[UPD] Update base_tier_validation.pot
Jul 16, 2024
661ea84
Update translation files
weblate Jul 16, 2024
21fac6c
Translated using Weblate (Italian)
mymage Jul 16, 2024
c3bb950
[16.0][FIX] base_tier_validation, search only active definitions
ChrisOForgeFlow Jun 20, 2024
4d78870
[FIX] base_tier_validation: Tier Validation Exception Groups
Shide Jul 5, 2024
5be1352
[IMP] base_tier_validation: label
bosd Jul 24, 2024
95e0eda
[UPD] Update base_tier_validation.pot
Jul 24, 2024
0c1efff
Update translation files
weblate Jul 24, 2024
cbcd2a2
[UPD] Update base_tier_validation.pot
Jul 24, 2024
9e36304
Update translation files
weblate Jul 24, 2024
3092af2
Translated using Weblate (Italian)
mymage Jul 29, 2024
2ee8e89
[FIX] base_tier_validation: Field merge in view
houzefa-abba Mar 15, 2024
3cb5bf3
[RFC]base_tier_validation: remove unused code
bosd Feb 11, 2024
8712468
[IMP] base_tier_validation: support computed state field
StefanRijnhart Oct 3, 2024
88af5db
[FIX] base_tier_validation: amend authors
LoisRForgeFlow Oct 25, 2024
a0bb29c
[MIG][base_tier_validation] Some fixes for migration
valentinagiuliani-rapsodoo Oct 30, 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
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ exclude: |
/tests/samples/.*|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
# Modules
^base_tier_validation/static/src/components/.*$|
default_language_version:
python: python3
node: "22.9.0"
Expand Down
142 changes: 70 additions & 72 deletions base_tier_validation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Base Tier Validation
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/17.0/base_tier_validation
:target: https://github.com/OCA/server-ux/tree/18.0/base_tier_validation
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-base_tier_validation
:target: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-base_tier_validation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -66,16 +66,16 @@ To configure this module, you need to:

**Note:**

- If check *Notify Reviewers on Creation*, all possible reviewers will
be notified by email when this definition is triggered.
- If check *Notify reviewers on reaching pending* if you want to send a
notification when pending status is reached. This is usefull in a
approve by sequence scenario to only notify reviewers when it is
their turn in the sequence.
- If check *Comment*, reviewers can comment after click Validate or
Reject.
- If check *Approve by sequence*, reviewers is forced to review by
specified sequence.
- If check *Notify Reviewers on Creation*, all possible reviewers will
be notified by email when this definition is triggered.
- If check *Notify reviewers on reaching pending* if you want to send a
notification when pending status is reached. This is usefull in a
approve by sequence scenario to only notify reviewers when it is their
turn in the sequence.
- If check *Comment*, reviewers can comment after click Validate or
Reject.
- If check *Approve by sequence*, reviewers is forced to review by
specified sequence.

To configure Tier Validation Exceptions, you need to:

Expand All @@ -90,42 +90,40 @@ To configure Tier Validation Exceptions, you need to:

**Note:**

- If you don't create any exception, the Validated record will be
readonly and cannot be modified.
- If check *Write under Validation*, records will be able to be
modified only in the defined fields when the Validation process is
ongoing.
- If check *Write after Validation*, records will be able to be
modified only in the defined fields when the Validation process is
finished.
- If check *Write after Validation* and *Write under Validation*,
records will be able to be modified defined fields always.
- If you don't create any exception, the Validated record will be
readonly and cannot be modified.
- If check *Write under Validation*, records will be able to be modified
only in the defined fields when the Validation process is ongoing.
- If check *Write after Validation*, records will be able to be modified
only in the defined fields when the Validation process is finished.
- If check *Write after Validation* and *Write under Validation*,
records will be able to be modified defined fields always.

Known issues / Roadmap
======================

This is the list of known issues for this module. Any proposal for
improvement will be very valuable.

- **Issue:**
- **Issue:**

When using approve_sequence option in any tier.definition there can
be inconsistencies in the systray notifications.
When using approve_sequence option in any tier.definition there can be
inconsistencies in the systray notifications.

**Description:**
**Description:**

Field can_review in tier.review is used to filter out, in the systray
notifications, the reviews a user can approve. This can_review field
is updated **in the database** in method review_user_count, this can
make it very inconsistent for databases with a lot of users and
recurring updates that can change the expected behavior.
Field can_review in tier.review is used to filter out, in the systray
notifications, the reviews a user can approve. This can_review field
is updated **in the database** in method review_user_count, this can
make it very inconsistent for databases with a lot of users and
recurring updates that can change the expected behavior.

- **Migration to 15.0:**
- **Migration to 15.0:**

The parameter \_tier_validation_manual_config will become False, on
14.0, the default value is True, as the change is applied after the
migration. In order to use the new behavior we need to modify the
value on our expected model.
The parameter \_tier_validation_manual_config will become False, on
14.0, the default value is True, as the change is applied after the
migration. In order to use the new behavior we need to modify the
value on our expected model.

Changelog
=========
Expand All @@ -147,69 +145,69 @@ Migrated to Odoo 14.

Fixes:

- When using approve_sequence option in any tier.definition there can
be inconsistencies in the systray notifications
- When using approve_sequence, still not approve only the needed
sequence, but also other sequence for the same approver
- When using approve_sequence option in any tier.definition there can be
inconsistencies in the systray notifications
- When using approve_sequence, still not approve only the needed
sequence, but also other sequence for the same approver

12.0.3.3.1 (2019-12-02)
-----------------------

Fixes:

- Show comment on Reviews Table.
- Edit notification with approve_sequence.
- Show comment on Reviews Table.
- Edit notification with approve_sequence.

12.0.3.3.0 (2019-11-27)
-----------------------

New features:

- Add comment on Reviews Table.
- Approve by sequence.
- Add comment on Reviews Table.
- Approve by sequence.

12.0.3.2.1 (2019-11-26)
-----------------------

Fixes:

- Remove message_subscribe_users
- Remove message_subscribe_users

12.0.3.2.0 (2019-11-25)
-----------------------

New features:

- Notify reviewers
- Notify reviewers

12.0.3.1.0 (2019-07-08)
-----------------------

Fixes:

- Singleton error
- Singleton error

12.0.3.0.0 (2019-12-02)
-----------------------

Fixes:

- Edit Reviews Table
- Edit Reviews Table

12.0.2.1.0 (2019-05-29)
-----------------------

Fixes:

- Edit drop-down style width and position
- Edit drop-down style width and position

12.0.2.0.0 (2019-05-28)
-----------------------

New features:

- Pass parameters as functions.
- Add Systray.
- Pass parameters as functions.
- Add Systray.

12.0.1.0.0 (2019-02-18)
-----------------------
Expand Down Expand Up @@ -237,7 +235,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-ux/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-ux/issues/new?body=module:%20base_tier_validation%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-ux/issues/new?body=module:%20base_tier_validation%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -252,24 +250,24 @@ Authors
Contributors
------------

- Lois Rilo <[email protected]>
- Naglis Jonaitis <[email protected]>
- Adrià Gil Sorribes <[email protected]>
- Pimolnat Suntian <[email protected]>
- Pedro Gonzalez <[email protected]>
- Kitti U. <[email protected]>
- Saran Lim. <[email protected]>
- Carlos Lopez <[email protected]>
- Javier Colmeiro <[email protected]>
- bosd
- Evan Soh <[email protected]>
- Manuel Regidor <[email protected]>
- Eduardo de Miguel <[email protected]>
- `XCG Consulting <https://xcg-consulting.fr>`__:

- Houzéfa Abbasbhay

- Stefan Rijnhart <[email protected]>
- Lois Rilo <[email protected]>
- Naglis Jonaitis <[email protected]>
- Adrià Gil Sorribes <[email protected]>
- Pimolnat Suntian <[email protected]>
- Pedro Gonzalez <[email protected]>
- Kitti U. <[email protected]>
- Saran Lim. <[email protected]>
- Carlos Lopez <[email protected]>
- Javier Colmeiro <[email protected]>
- bosd
- Evan Soh <[email protected]>
- Manuel Regidor <[email protected]>
- Eduardo de Miguel <[email protected]>
- `XCG Consulting <https://xcg-consulting.fr>`__:

- Houzéfa Abbasbhay

- Stefan Rijnhart <[email protected]>

Maintainers
-----------
Expand All @@ -292,6 +290,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-LoisRForgeFlow|

This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/17.0/base_tier_validation>`_ project on GitHub.
This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/18.0/base_tier_validation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions base_tier_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Base Tier Validation",
"summary": "Implement a validation process based on tiers.",
"version": "17.0.2.2.1",
"version": "18.0.1.0.0",
"development_status": "Mature",
"maintainers": ["LoisRForgeFlow"],
"category": "Tools",
Expand All @@ -26,7 +26,7 @@
],
"assets": {
"web.assets_backend": [
"/base_tier_validation/static/src/components/tier_review_menu/tier_review_menu.esm.js",
"/base_tier_validation/static/src/components/tier_review_menu/tier_review_menu.esm.js", # pylint: disable=no-undef
"/base_tier_validation/static/src/components/tier_review_menu/tier_review_menu.xml",
"/base_tier_validation/static/src/components/tier_review_widget/tier_review_widget.esm.js",
"/base_tier_validation/static/src/components/tier_review_widget/tier_review_widget.scss",
Expand Down
25 changes: 14 additions & 11 deletions base_tier_validation/models/tier_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@

@api.model
def _search_can_review(self, operator, value):
domain = [

Check warning on line 109 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L109

Added line #L109 was not covered by tests
("review_ids.reviewer_ids", "=", self.env.user.id),
("review_ids.status", "in", ["pending", "waiting"]),
("review_ids.can_review", "=", True),
("rejected", "=", False),
]
if "active" in self._fields:
domain.append(("active", "in", [True, False]))
res_ids = self.search(domain).filtered("can_review").ids
return [("id", "in", res_ids)]

Check warning on line 118 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L116-L118

Added lines #L116 - L118 were not covered by tests

@api.depends("review_ids")
def _compute_reviewer_ids(self):
Expand Down Expand Up @@ -163,21 +163,21 @@
return self._description

def _get_to_validate_message(self):
return (
"""<i class="fa fa-info-circle" /> %s"""
% _("This %s needs to be validated")
% self._get_to_validate_message_name()
return _(
f"""<i class="fa fa-info-circle/> This
{self._get_to_validate_message_name()} needs to be validated
"""
)

def _get_validated_message(self):
msg = """<i class="fa fa-thumbs-up" /> %s""" % _(
"""Operation has been <b>validated</b>!"""
msg = _(
""""<i class="fa fa-thumbs-up"/> Operation has been <b>validated</b>!"""
)
return self.validated and msg or ""

def _get_rejected_message(self):
msg = """<i class="fa fa-thumbs-down" /> %s""" % _(
"""Operation has been <b>rejected</b>."""
msg = _(
"""<i class="fa fa-thumbs-down"/> Operation has been <b>rejected</b>."""
)
return self.rejected and msg or ""

Expand All @@ -194,21 +194,21 @@
if item.validated and not item.rejected:
item.validation_status = "validated"
elif not item.validated and item.rejected:
item.validation_status = "rejected"

Check warning on line 197 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L197

Added line #L197 was not covered by tests
elif (
not item.validated
and not item.rejected
and any(item.review_ids.filtered(lambda x: x.status == "pending"))
):
item.validation_status = "pending"

Check warning on line 203 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L203

Added line #L203 was not covered by tests
elif (
not item.validated
and not item.rejected
and any(item.review_ids.filtered(lambda x: x.status == "waiting"))
):
item.validation_status = "waiting"

Check warning on line 209 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L209

Added line #L209 was not covered by tests
else:
item.validation_status = "no"

Check warning on line 211 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L211

Added line #L211 was not covered by tests

def _compute_next_review(self):
for rec in self:
Expand Down Expand Up @@ -236,8 +236,8 @@
def _compute_need_validation(self):
for rec in self:
if isinstance(rec.id, models.NewId):
rec.need_validation = False
continue

Check warning on line 240 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L239-L240

Added lines #L239 - L240 were not covered by tests
tiers = (
self.env["tier.definition"]
.with_context(active_test=True)
Expand All @@ -258,7 +258,7 @@
domain = literal_eval(tier.definition_domain)
return self.filtered_domain(domain)
else:
return self

Check warning on line 261 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L261

Added line #L261 was not covered by tests

@api.model
def _get_validation_exceptions(self, extra_domain=None, add_base_exceptions=True):
Expand Down Expand Up @@ -329,7 +329,7 @@
if val not in exceptions:
not_allowed_fields.append(val)
if not not_allowed_fields:
return []

Check warning on line 332 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L332

Added line #L332 was not covered by tests

not_allowed_field_names, allowed_field_names = [], []
for fld_name, fld_data in self.fields_get(
Expand All @@ -349,9 +349,9 @@

def _write(self, vals):
if self._tier_validation_state_field_is_computed:
self._tier_validation_check_state_on_write(vals)
self._tier_validation_check_write_remove_reviews(vals)
return super()._write(vals)

Check warning on line 354 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L352-L354

Added lines #L352 - L354 were not covered by tests

def _tier_validation_get_current_state_value(self):
"""Get the current value from the cache or the database.
Expand Down Expand Up @@ -455,7 +455,7 @@
def _tier_validation_check_write_remove_reviews(self, vals):
for rec in self:
if rec._allow_to_remove_reviews(vals):
rec.mapped("review_ids").unlink()

Check warning on line 458 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L458

Added line #L458 was not covered by tests

def _allow_to_remove_reviews(self, values):
"""Method for deciding whether the elimination of revisions is necessary."""
Expand All @@ -466,10 +466,10 @@
state_from = self._tier_validation_get_current_state_value()
# If you change to _cancel_state
if state_to in (self._cancel_state):
return True

Check warning on line 469 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L469

Added line #L469 was not covered by tests
# If it is changed to _state_from and it was not in _state_from
if state_to in self._state_from and state_from not in self._state_from:
return True

Check warning on line 472 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L472

Added line #L472 was not covered by tests
return False

def _check_state_from_condition(self):
Expand Down Expand Up @@ -753,14 +753,17 @@
@api.model
def _update_counter(self, review_counter):
self.review_ids._compute_can_review()
notifications = []
channel = "base.tier.validation/updated"
notifications.append([self.env.user.partner_id, channel, review_counter])
self.env["bus.bus"]._sendmany(notifications)
self.env["bus.bus"]._sendone(
channel,
"inbox",
f"Base tier validation for partner "
f"{self.env.user.partner_id}, counter {review_counter}",
)

def unlink(self):
self.mapped("review_ids").unlink()
return super().unlink()

Check warning on line 766 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L765-L766

Added lines #L765 - L766 were not covered by tests

def _add_tier_validation_buttons(self, node, params):
str_element = self.env["ir.qweb"]._render(
Expand Down Expand Up @@ -820,7 +823,7 @@
excepted_fields = self._get_all_validation_exceptions()
for node in doc.xpath("//field[@name][not(ancestor::field)]"):
if node.attrib.get("name") in excepted_fields:
continue

Check warning on line 826 in base_tier_validation/models/tier_validation.py

View check run for this annotation

Codecov / codecov/patch

base_tier_validation/models/tier_validation.py#L826

Added line #L826 was not covered by tests
new_r_modifier = self._get_tier_validation_readonly_domain()
old_r_modifier = node.attrib.get("readonly")
if old_r_modifier:
Expand Down
2 changes: 1 addition & 1 deletion base_tier_validation/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ access_tier_review,access.tier.review,model_tier_review,base.group_user,1,1,1,1
access_tier_definition_all,tier.definition.all,model_tier_definition,base.group_user,1,0,0,0
access_tier_definition_settings,tier.definition.settings,model_tier_definition,base.group_system,1,1,1,1
access_comment_wizard,access.comment.wizard,model_comment_wizard,base.group_user,1,1,1,1
access_tier_validation_exceptions_all,tier.validation.exceptions,model_tier_validation_exception,,1,0,0,0
access_tier_validation_exceptions_all,tier.validation.exceptions,model_tier_validation_exception,base.group_user,1,0,0,0
access_tier_validation_exceptions_settings,tier.validation.exceptions,model_tier_validation_exception,base.group_system,1,1,1,1
Loading
Loading