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

[17.0] [FIX] base_tier_validation: Fixed readonly behavior of fields.

Open NachoAlesLopez opened this issue 7 months ago • 1 comments
trafficstars

The module base_tier_validation behaves strangely when computed fields are present. For example, the following screenshots come from a base installation of Odoo with the sale_tier_validation and sale_purchase module added, which causes the purchase order count to be editable when inside a smartbutton:

image

Or, when paired with the sale_margin module, it allows the editing of the margin when the field should be read-only:

image

This is because the base module doesn't take into account the read-onliness of the fields, especially computed fields. This PR should fix that behavior and add a test case to ensure the cases shown before remain patched.

NachoAlesLopez avatar Mar 27 '25 15:03 NachoAlesLopez

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

OCA-git-bot avatar Mar 27 '25 15:03 OCA-git-bot

@LoisRForgeFlow It looks like the changes from https://github.com/OCA/server-ux/pull/1107 fixed the issue. I'll close the PR in that case. Thanks for letting me know of the fix!

NachoAlesLopez avatar Jul 16 '25 12:07 NachoAlesLopez

@NachoAlesLopez That's good news! thanks for checking and confirming :+1:

LoisRForgeFlow avatar Jul 16 '25 15:07 LoisRForgeFlow