diff --git a/base_tier_validation/README.rst b/base_tier_validation/README.rst index eca0b8a..6380619 100644 --- a/base_tier_validation/README.rst +++ b/base_tier_validation/README.rst @@ -49,14 +49,6 @@ To configure this module, you need to: #. Create as many tiers as you want for any model having tier validation functionality. -Known issues / Roadmap -====================== - -* It would be interesting to improve the current tooltip to display reviews - to make it responsible and more "Odoo-ish". For instance, to use a - widget capable to display a tree view as a drop-down without needing - to navigate to a new screen. - Bug Tracker =========== diff --git a/base_tier_validation/__manifest__.py b/base_tier_validation/__manifest__.py index 75e5e5e..723b485 100644 --- a/base_tier_validation/__manifest__.py +++ b/base_tier_validation/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Base Tier Validation", "summary": "Implement a validation process based on tiers.", - "version": "12.0.2.1.0", + "version": "12.0.3.0.0", "development_status": "Mature", "maintainers": ['lreficent'], "category": "Tools", diff --git a/base_tier_validation/readme/ROADMAP.rst b/base_tier_validation/readme/ROADMAP.rst index 53280de..e69de29 100644 --- a/base_tier_validation/readme/ROADMAP.rst +++ b/base_tier_validation/readme/ROADMAP.rst @@ -1,4 +0,0 @@ -* It would be interesting to improve the current tooltip to display reviews - to make it responsible and more "Odoo-ish". For instance, to use a - widget capable to display a tree view as a drop-down without needing - to navigate to a new screen. diff --git a/base_tier_validation/static/description/index.html b/base_tier_validation/static/description/index.html index cbef425..eaccd5c 100644 --- a/base_tier_validation/static/description/index.html +++ b/base_tier_validation/static/description/index.html @@ -378,12 +378,11 @@ development.

-
-

Known issues / Roadmap

- -
-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed @@ -415,15 +405,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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

-

Credits

+

Credits

-

Authors

+

Authors

-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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 @@ - -