diff --git a/base_tier_validation/__manifest__.py b/base_tier_validation/__manifest__.py index 0e818f5f70..63b3307480 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": "14.0.2.7.0", + "version": "15.0.1.0.0", "development_status": "Mature", "maintainers": ["LoisRForgeFlow"], "category": "Tools", @@ -20,9 +20,19 @@ "views/res_config_settings_views.xml", "views/tier_definition_view.xml", "views/tier_review_view.xml", - "views/assets_backend.xml", "wizard/comment_wizard_view.xml", "templates/tier_validation_templates.xml", ], - "qweb": ["static/src/xml/systray.xml", "static/src/xml/tier_review_template.xml"], + "assets": { + "web.assets_backend": [ + "/base_tier_validation/static/src/js/systray.js", + "/base_tier_validation/static/src/js/tier_review_widget.js", + "/base_tier_validation/static/src/scss/systray.scss", + "/base_tier_validation/static/src/scss/review.scss", + ], + "web.assets_qweb": [ + "base_tier_validation/static/src/xml/systray.xml", + "base_tier_validation/static/src/xml/tier_review_template.xml", + ], + }, } diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index 002f4cc91d..497de18917 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -277,7 +277,7 @@ def _notify_accepted_reviews_body(self): ) if has_comment: comment = has_comment.mapped("comment")[0] - return _("A review was accepted. (%s)" % comment) + return _("A review was accepted. (%s)") % comment return _("A review was accepted") def _add_comment(self, validate_reject, reviews): @@ -322,9 +322,10 @@ def _notify_rejected_review_body(self): ) if has_comment: comment = has_comment.mapped("comment")[0] - return _( - "A review was rejected by {}. ({})".format(self.env.user.name, comment) - ) + return _("A review was rejected by %(user)s. (%(comment)s)") % { + "user": self.env.user.name, + "comment": comment, + } return _("A review was rejected by %s.") % (self.env.user.name) def _notify_rejected_review(self): @@ -422,8 +423,8 @@ def _update_counter(self): self.review_ids._compute_can_review() notifications = [] channel = "base.tier.validation" - notifications.append([channel, {}]) - self.env["bus.bus"].sendmany(notifications) + notifications.append([self.env.user.partner_id, channel, {}]) + self.env["bus.bus"]._sendmany(notifications) def unlink(self): self.mapped("review_ids").unlink() diff --git a/base_tier_validation/static/src/xml/systray.xml b/base_tier_validation/static/src/xml/systray.xml index ab7fd2cc89..5faa47c2be 100644 --- a/base_tier_validation/static/src/xml/systray.xml +++ b/base_tier_validation/static/src/xml/systray.xml @@ -59,9 +59,9 @@ -
  • +