server-ux icon indicating copy to clipboard operation
server-ux copied to clipboard

[17.0][FIX] base_tier_validation - fix 'false positive' raise

Open luc-demeyer opened this issue 9 months ago • 3 comments

base_tier_validation/models/tier_validation.py may raise an exception in the _tier_validation_check_write_allowed() method when there is no change (when vals[fld] == rec[fld]). I encountered this case while using the account_move_tier_validation module and posting a number of validated supplier invoices via the list view (Action -> Post entries). In this case the account.move sequence mixin generates a write on the sequence_prefix field but vals["sequence_prefix"] is equal to rec.sequence_prefix hence this is not 'real' write and we should not prevent the posting in such a case (when Confirming these same invoices via the form view no raise is generated). The solution is to limit raise to writes that do modify the field value.

luc-demeyer avatar Feb 10 '25 13:02 luc-demeyer

Hi @LoisRForgeFlow, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar Feb 10 '25 13:02 OCA-git-bot

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Jun 15 '25 12:06 github-actions[bot]

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Nov 02 '25 12:11 github-actions[bot]