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

[16.0][FIX] base_tier_validation: error on loading view from m2o field

Open RLeeOSI opened this issue 1 year ago • 7 comments

Fixes an issue when loading the form view of any model that inherits tier.validation from a m2o field (Create and Edit...). Computed fields must be loaded in before the OWL component renders the form view.

Previous behavior:

  • Load the form view of a model that inherits tier.validation from a m2o field using "Create and Edit..." option
  • Get Missing field string information for the field '${fieldName}' from the '${resModel}' model error from processArch()
  • Caused by fields missing from "models" key returned by get_view()
  • Previous code ignored fields needed if the model was already present in the "models" key

Changes:

  • No longer ignores necessary fields if the model is already present in the "model" key

Possible future improvements:

  • Reduce repeated code
  • Add fields after adding the validation buttons node

RLeeOSI avatar Jan 03 '24 23:01 RLeeOSI

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

OCA-git-bot avatar Jan 03 '24 23:01 OCA-git-bot

I've noticed the regression. Also from v16 the translation of the slection field does not seem to be loaded correctly. Easiest way to check is even in the en_Us language. The pending state should show as Pending. (Capital P)

image

bosd avatar Jan 09 '24 21:01 bosd

I've noticed the regression. Also from v16 the translation of the slection field does not seem to be loaded correctly. Easiest way to check is even in the en_Us language. The pending state should show as Pending. (Capital P)

image

Is this a comment for this PR, or something to be improved in general? In other words, could you clarify if you are approving or rejecting this specific PR.

Thanks!

LoisRForgeFlow avatar Feb 08 '24 08:02 LoisRForgeFlow

Is this a comment for this PR, or something to be improved in general? In other words, could you clarify if you are approving or rejecting this specific PR.

Sorry, The mistake was on my end. I had the assumption this PR was supposed to fix the "translation" of the selection field. Which it does not. So, my comment is still valid and a separate issue should be created for it. (It is occurs in V16 + V17.)

I'm neutral on this PR. I did not encouter the problem, that this PR is supposed to fix.

bosd avatar Feb 08 '24 08:02 bosd

Is this a comment for this PR, or something to be improved in general? In other words, could you clarify if you are approving or rejecting this specific PR.

Sorry, The mistake was on my end. I had the assumption this PR was supposed to fix the "translation" of the selection field. Which it does not. So, my comment is still valid and a separate issue should be created for it. (It is occurs in V16 + V17.)

I'm neutral on this PR. I did not encouter the problem, that this PR is supposed to fix.

Ok, thanks for clarifying. You could create the issues then if you think they are relevant.

Regarding this PR, let's wait one more review.

LoisRForgeFlow avatar Feb 08 '24 09:02 LoisRForgeFlow

Hi I'm only noticing this PR now, I did #846 to fix this same part of the code, for another issue (form-embedded lists). Apparently according to a comment there, this also fixes workflow kinks.

I'm not closing #846 as duplicate though as it handles the "Reduce repeated code" you mention & adds a unit test.

I'll let you decide how we merge these (either only #846, or #846 rebased on top of this PR, to have both commits).

houzefa-abba avatar Mar 18 '24 09:03 houzefa-abba

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 Jul 21 '24 12:07 github-actions[bot]