Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][ADD] web_translate_dialog: remove hidden field from wizzard #2992

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from

Conversation

cyrilmanuel
Copy link

This PR contain a new method to check fields evaluated as invisible = true. in this case the field shall not appear on the wizzard. we shall not translate field not use in the form that is showed to the client.

@cyrilmanuel
Copy link
Author

@yvaucher @ivantodorovich could you check this pr :)

var record_id = this.record_id;
_.each(parent.renderer.allModifiersData, function(modifier){
var evaluatedmodifier = modifier.evaluatedModifiers[record_id];
if (modifier.node.tag == 'field' && evaluatedmodifier && evaluatedmodifier.hasOwnProperty("invisible") && evaluatedmodifier.invisible == true){
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (modifier.node.tag == 'field' && evaluatedmodifier && evaluatedmodifier.hasOwnProperty("invisible") && evaluatedmodifier.invisible == true){
if (modifier.node.tag == 'field' && evaluatedmodifier?.invisible){

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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

Successfully merging this pull request may close these issues.

4 participants