Skip to content

[19.0][MIG] base_tier_validation - #1

Closed
em230418 wants to merge 269 commits into
OCA:19.0from
em230418:19.0-mig-base_tier_validation
Closed

em230418 wants to merge 269 commits into
OCA:19.0from
em230418:19.0-mig-base_tier_validation

Conversation

@em230418

@em230418 em230418 commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

No description provided.

LoisRForgeFlow and others added 30 commits December 9, 2025 11:38
…reviews' name and state correctly translated.
* using similar approach to activities has already benn addressed.
* add a new point explaining review tooltip improvement possibilities.
Currently translated at 100.0% (59 of 59 strings)

Translation: server-ux-12.0/server-ux-12.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_tier_validation/zh_CN/
* fix test after the last forward-ported feature.
* add a descrition of new know issue.
…tified. A customer or supplier can be a follower of the object and should not receive internal messages about the tier validation.
Currently translated at 100.0% (74 of 74 strings)

Translation: server-ux-13.0/server-ux-13.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-base_tier_validation/zh_CN/
Currently translated at 80.0% (60 of 75 strings)

Translation: server-ux-13.0/server-ux-13.0-base_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/server-ux-13-0/server-ux-13-0-base_tier_validation/es/

@jguenat jguenat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove 18.0.X migration scripts

Comment thread base_tier_validation/models/tier_review.py Outdated

@hieulucky111 hieulucky111 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check again?

Comment thread base_tier_validation/migrations/18.0.2.1.0/pre-migration.py Outdated
Comment thread base_tier_validation/models/res_config_settings.py Outdated
@bosd

bosd commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

orignally posted at #3 but i think it belongs here:

Functional test. The requested by and done by fields are no longer populated.

image

@em230418
em230418 force-pushed the 19.0-mig-base_tier_validation branch from bb9d12b to 94211ee Compare January 13, 2026 04:18
@em230418

Copy link
Copy Markdown
Contributor Author

Functional test. The requested by and done by fields are no longer populated.

Will check that later

@santostelmo

Copy link
Copy Markdown

@jguenat Your change request seems to be resolved. Can you please check again ?

@santostelmo santostelmo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@em230418 do you have a moment to check this point ?
#1 (comment)

@LoisRForgeFlow LoisRForgeFlow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include the recent patches done in 18.0?

@bosd

bosd commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Just noticed a new feature.

Steps to reproduce:
Ask for a tier validation..
First approver rejects.
The user asking for the approval, now sees in the top bar "-1" notification.

@bosd bosd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review:

Issue: Sequential approval notifications sent to all followers instead of only the pending reviewer

When using approve_sequence=True with notify_on_create=False and notify_on_pending=True, the sequential notification logic correctly
transitions only the first review to "pending" status. However, the actual notification reaches all followers of the record, not just the
intended reviewer.

The issue is in _notify_review_available() in tier_validation.py:

  def _notify_review_available(self, tier_reviews):                                                                                         
      ...                                                                                                                                   
      rec.message_subscribe(                                                                                                                
          partner_ids=users_to_notify.mapped("partner_id").ids                                                                              
      )                                                                                                                                     
      rec.message_post(                                                                                                                     
          subtype_xmlid=self._get_requested_notification_subtype(),                                                                         
          body=rec._notify_requested_review_body(),                                                                                         
      )                                                                                                                                     

message_subscribe() is called without subtype_ids (subscribing with all default subtypes), and then message_post() sends a notification to
all followers of the record — not just the reviewer whose tier just became pending.

This means if the second approver is already a follower (e.g. they created the record, or were auto-subscribed), they receive the
notification at the same time as the first approver, defeating the purpose of sequential approval.

Expected behavior: Only the reviewer whose tier transitions to "pending" should be notified. The second reviewer should only be notified
after the first reviewer approves.

Possible fix: Use a targeted notification (e.g. message_notify()) instead of message_post(), so that only the specific reviewer is
notified rather than all followers.

@tao-thewarat tao-thewarat left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🎉

@psugne

psugne commented Feb 25, 2026

Copy link
Copy Markdown

@bosd coulyou check if fix is working as expected?

@LoisRForgeFlow

Copy link
Copy Markdown
Contributor

More improvements in 18.0 OCA/server-ux#1246

@rousseldenis

Copy link
Copy Markdown
Contributor

@em230418

@em230418

Copy link
Copy Markdown
Contributor Author

As for now I am busy with other projects. Feel free to recreate PR based on this.
Customer, that initially asked to migrate, is not interested in 19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.