Maintainers
+Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
diff --git a/base_tier_validation/static/src/js/review_widget.js b/base_tier_validation/static/src/js/tier_review_widget.js
similarity index 76%
rename from base_tier_validation/static/src/js/review_widget.js
rename to base_tier_validation/static/src/js/tier_review_widget.js
index 46fa2c7..1d19458 100644
--- a/base_tier_validation/static/src/js/review_widget.js
+++ b/base_tier_validation/static/src/js/tier_review_widget.js
@@ -11,9 +11,11 @@ odoo.define('base_tier_validation.ReviewField', function (require) {
var QWeb = core.qweb;
var ReviewField = AbstractField.extend({
- template: 'tier.review.ReviewPopUp',
+ template: 'tier.review.Collapse',
events: {
'click .o_info_btn': '_onButtonClicked',
+ 'show.bs.collapse': '_showCollapse',
+ 'hide.bs.collapse': '_hideCollapse'
},
start: function () {
var self = this;
@@ -26,7 +28,7 @@ odoo.define('base_tier_validation.ReviewField', function (require) {
_getReviewData: function(res_ids){
var self = this;
- return self._rpc({
+ return this._rpc({
model: 'res.users',
method: 'get_reviews',
args: [res_ids],
@@ -37,7 +39,7 @@ odoo.define('base_tier_validation.ReviewField', function (require) {
_renderDropdown: function () {
var self = this;
return this._getReviewData(self.value).then(function (){
- self.$('.o_review').html(QWeb.render("tier.review.ReviewDropDown", {
+ self.$('.o_review').html(QWeb.render("tier.review.ReviewsTable", {
reviews : self.reviews
}));
});
@@ -48,9 +50,15 @@ odoo.define('base_tier_validation.ReviewField', function (require) {
this._renderDropdown();
}
},
+ _showCollapse: function () {
+ this.$el.find('.panel-heading').addClass('active');
+ },
+ _hideCollapse: function () {
+ this.$el.find('.panel-heading').removeClass('active');
+ }
});
- field_registry.add('review_popup', ReviewField);
+ field_registry.add('tier_validation', ReviewField);
return ReviewField;
diff --git a/base_tier_validation/static/src/scss/review.scss b/base_tier_validation/static/src/scss/review.scss
index 660061f..dcf0e45 100644
--- a/base_tier_validation/static/src/scss/review.scss
+++ b/base_tier_validation/static/src/scss/review.scss
@@ -2,3 +2,39 @@ ul.o_review {
min-width: 600px;
max-width: 800px
}
+
+.panel-group {
+ min-height: auto !important;
+ margin-top: -6px !important;
+ padding: 16px 16px 8px 16px !important;
+}
+
+.panel-heading {
+ background-color: initial !important;
+}
+
+.panel {
+ border: 0px !important;
+}
+
+.panel-body {
+ overflow-y: hidden;
+ overflow-x: auto;
+}
+
+.panel-title>a, .panel-title>a:active{
+ display:block;
+}
+
+.panel-heading a:before {
+ font-family: FontAwesome;
+ content: "\f0d7";
+ float: right;
+ transition: all 0.5s;
+}
+
+.panel-heading.active a:before {
+ -webkit-transform: rotate(180deg);
+ -moz-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
diff --git a/base_tier_validation/static/src/xml/tier_review_template.xml b/base_tier_validation/static/src/xml/tier_review_template.xml
index a38f06f..d08cf59 100644
--- a/base_tier_validation/static/src/xml/tier_review_template.xml
+++ b/base_tier_validation/static/src/xml/tier_review_template.xml
@@ -1,22 +1,22 @@