@@ -10,80 +10,86 @@
data-toggle="collapse"
href="#"
data-target="#collapse1"
+ t-on-click="onToggleCollapse"
>
Reviews
-
-
+
+
+
+
+
+ Sequence |
+ Requested by |
+ Description |
+ Status |
+ Todo by |
+ Done by |
+ Validation Date |
+ Comment |
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
-
-
-
-
- Sequence |
- Requested by |
- Description |
- Status |
- Todo by |
- Done by |
- Validation Date |
- Comment |
-
-
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
diff --git a/base_tier_validation/templates/tier_validation_templates.xml b/base_tier_validation/templates/tier_validation_templates.xml
index c19d233076..c4b1e70a12 100644
--- a/base_tier_validation/templates/tier_validation_templates.xml
+++ b/base_tier_validation/templates/tier_validation_templates.xml
@@ -86,6 +86,20 @@
name="review_ids"
widget="tier_validation"
attrs="{'invisible':[('review_ids', '=', [])]}"
- />
+ style="width:100%%; margin-top: 10px;"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base_tier_validation/tests/test_tier_validation.py b/base_tier_validation/tests/test_tier_validation.py
index 67760900a5..7c0e30456d 100644
--- a/base_tier_validation/tests/test_tier_validation.py
+++ b/base_tier_validation/tests/test_tier_validation.py
@@ -29,7 +29,7 @@ def test_03_request_validation_approved(self):
reviews = self.test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(reviews)
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
record.validate_tier()
self.assertTrue(record.validated)
@@ -39,7 +39,7 @@ def test_04_request_validation_rejected(self):
reviews = self.test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(reviews)
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
record.reject_tier()
self.assertTrue(record.review_ids)
self.assertTrue(record.rejected)
@@ -52,7 +52,7 @@ def test_05_under_validation(self):
reviews = self.test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(reviews)
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
with self.assertRaises(ValidationError):
record.write({"test_field": 0.5})
@@ -62,7 +62,7 @@ def test_06_validation_process_open(self):
reviews = self.test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(reviews)
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
with self.assertRaises(ValidationError):
record.action_confirm()
@@ -71,7 +71,7 @@ def test_07_search_reviewers(self):
reviews = self.test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(reviews)
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
self.assertIn(self.test_user_1, record.reviewer_ids)
res = self.test_model.search([("reviewer_ids", "in", self.test_user_1.id)])
self.assertTrue(res)
@@ -79,7 +79,7 @@ def test_07_search_reviewers(self):
def test_08_search_validated(self):
"""Test for the validated search method."""
self.test_record.with_user(self.test_user_2.id).request_validation()
- self.test_record.invalidate_cache()
+ self.test_record.invalidate_model()
res = self.test_model.with_user(self.test_user_1.id).search(
[("validated", "=", False)]
)
@@ -88,7 +88,7 @@ def test_08_search_validated(self):
def test_09_search_rejected(self):
"""Test for the rejected search method."""
self.test_record.with_user(self.test_user_2.id).request_validation()
- self.test_record.invalidate_cache()
+ self.test_record.invalidate_model()
res = self.test_model.with_user(self.test_user_1.id).search(
[("rejected", "=", False)]
)
@@ -124,11 +124,11 @@ def test_10_systray_counter(self):
)
# Request validation
self.test_record.with_user(self.test_user_2.id).request_validation()
- self.test_record.invalidate_cache()
+ self.test_record.invalidate_model()
test_record.with_user(self.test_user_2.id).request_validation()
- test_record.invalidate_cache()
+ test_record.invalidate_model()
self.test_record_2.with_user(self.test_user_2.id).request_validation()
- self.test_record_2.invalidate_cache()
+ self.test_record_2.invalidate_model()
# Get review user count as systray icon would do and check count value
docs = self.test_user_1.with_user(self.test_user_1).review_user_count()
for doc in docs:
@@ -154,7 +154,7 @@ def test_11_add_comment(self):
review = test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(review)
record = test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
res = record.validate_tier()
ctx = res.get("context")
wizard = Form(self.env["comment.wizard"].with_context(**ctx))
@@ -189,7 +189,7 @@ def test_11_add_comment_rejection(self):
review = test_record.with_user(self.test_user_2.id).request_validation()
self.assertTrue(review)
record = test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
res = record.reject_tier() # Rejection
ctx = res.get("context")
wizard = Form(self.env["comment.wizard"].with_context(**ctx))
@@ -244,10 +244,10 @@ def test_12_approve_sequence(self):
self.assertEqual(doc.get("pending_count"), 0)
record1 = test_record.with_user(self.test_user_1.id)
- record1.invalidate_cache()
+ record1.invalidate_model()
self.assertTrue(record1.can_review)
record2 = test_record.with_user(self.test_user_2.id)
- record2.invalidate_cache()
+ record2.invalidate_model()
self.assertFalse(record2.can_review)
# User 1 validates the record, 2 review should be approved.
self.assertFalse(any(r.status == "approved" for r in record1.review_ids))
@@ -286,7 +286,7 @@ def test_12_approve_sequence_same_user(self):
self.assertTrue(reviews)
record1 = test_record.with_user(self.test_user_1.id)
- record1.invalidate_cache()
+ record1.invalidate_model()
self.assertTrue(record1.can_review)
# Validation will be all by sequence
self.assertEqual(
@@ -353,7 +353,7 @@ def test_15_review_user_count(self):
self.assertTrue(review)
self.assertTrue(self.test_user_1.get_reviews({"res_ids": review.ids}))
self.assertTrue(self.test_user_1.review_ids)
- test_record.invalidate_cache()
+ test_record.invalidate_model()
self.assertTrue(test_record.review_ids)
# Used by front-end
count = self.test_user_1.with_user(self.test_user_1).review_user_count()
@@ -379,7 +379,7 @@ def test_16_review_user_count_on_rejected(self):
)
test_record.with_user(self.test_user_2).request_validation()
record1 = test_record.with_user(self.test_user_1)
- record1.invalidate_cache()
+ record1.invalidate_model()
self.assertTrue(record1.can_review)
self.assertTrue(
self.test_user_1.with_user(self.test_user_1).review_user_count()
@@ -389,7 +389,7 @@ def test_16_review_user_count_on_rejected(self):
)
# user 1 reject first tier
record1.reject_tier()
- record1.invalidate_cache()
+ record1.invalidate_model()
self.assertFalse(record1.can_review)
# both user 1 and 2 has nothing left in tray
self.assertFalse(
@@ -407,7 +407,7 @@ def test_17_search_records_no_validation(self):
self.assertEqual(len(records), 1)
self.test_record.with_user(self.test_user_2.id).request_validation()
record = self.test_record.with_user(self.test_user_1.id)
- record.invalidate_cache()
+ record.invalidate_model()
records = self.env["tier.validation.tester"].search(
[("reviewer_ids", "=", False)]
)
diff --git a/base_tier_validation/views/res_config_settings_views.xml b/base_tier_validation/views/res_config_settings_views.xml
index 382c1ccb4e..acbd570cb5 100644
--- a/base_tier_validation/views/res_config_settings_views.xml
+++ b/base_tier_validation/views/res_config_settings_views.xml
@@ -1,6 +1,8 @@
-
+
+
+
diff --git a/base_tier_validation/wizard/comment_wizard.py b/base_tier_validation/wizard/comment_wizard.py
index f25e79be63..5c5a6c933d 100644
--- a/base_tier_validation/wizard/comment_wizard.py
+++ b/base_tier_validation/wizard/comment_wizard.py
@@ -22,4 +22,4 @@ def add_comment(self):
rec._validate_tier(self.review_ids)
if self.validate_reject == "reject":
rec._rejected_tier(self.review_ids)
- rec._update_counter()
+ rec._update_counter({"review_deleted": True})
diff --git a/base_tier_validation/wizard/comment_wizard_view.xml b/base_tier_validation/wizard/comment_wizard_view.xml
index 6009059e4a..70c1a9285a 100644
--- a/base_tier_validation/wizard/comment_wizard_view.xml
+++ b/base_tier_validation/wizard/comment_wizard_view.xml
@@ -9,7 +9,7 @@