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

[FW][FIX] website, website_hr_recruitment: action should not be undefined #163043

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 23, 2024

Step to reproduce:

  • Go to /jobs (install website_hr_recruitment)
  • Go on a job offer
  • Click on the "Apply" button
  • Edit the form

Purpose:

Since the implementation of commit 1, our system employs alerts resembling this field 'partner_name' is mandatory for the action 'actionName'. However, this alteration has led to a bug where in certain forms exhibit an undefined action name value, particularly evident when users attempt to modify specific forms containing required fields. The bug manifests when an alert is triggered, and the action name becomes undefined due to the condition this.modelCantChange evaluating to true within the willStart function. Consequently, invoking _super results in the return of willStart without assigning a value to currentActionName.

After this commit:

Now, before returning the function, it sets a value for currentActionName and then proceeds with the necessary steps. This prevents the issue where an action was undefined.

task-3680483

Forward-Port-Of: #162468
Forward-Port-Of: #157501

Step to reproduce:
- Go to /jobs (install website_hr_recruitment)
- Go on a job offer
- Click on the "Apply" button
- Edit the form

Purpose:

Since the implementation of commit [1], our system employs alerts
resembling `this field 'partner_name' is mandatory for the action
'actionName'`. However, this alteration has led to a bug where in
certain forms exhibit an undefined action name value, particularly
evident when users attempt to modify specific forms containing required
fields. The bug manifests when an alert is triggered, and the action
name becomes undefined due to the condition `this.modelCantChange`
evaluating to `true` within the `willStart` function. Consequently,
invoking `_super` results in the return of `willStart` without assigning
a value to `currentActionName`.

After this commit:

Now, before returning the function, it sets a value for
`currentActionName` and then proceeds with the necessary steps. This
prevents the issue where an action was `undefined`.

[1]: odoo@b154fe1

task-3680483

X-original-commit: c028578
@robodoo
Copy link
Contributor

robodoo commented Apr 23, 2024

Pull request status dashboard.

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 23, 2024

This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 23, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 23, 2024
@bso-odoo
Copy link
Contributor

@fw-bot r+

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 24, 2024

@visp-odoo @bso-odoo child PR #163057 was modified / updated and has become a normal PR. This PR (and any of its parents) will need to be merged independently as approvals won't cross.

robodoo pushed a commit that referenced this pull request Apr 24, 2024
Step to reproduce:
- Go to /jobs (install website_hr_recruitment)
- Go on a job offer
- Click on the "Apply" button
- Edit the form

Purpose:

Since the implementation of commit [1], our system employs alerts
resembling `this field 'partner_name' is mandatory for the action
'actionName'`. However, this alteration has led to a bug where in
certain forms exhibit an undefined action name value, particularly
evident when users attempt to modify specific forms containing required
fields. The bug manifests when an alert is triggered, and the action
name becomes undefined due to the condition `this.modelCantChange`
evaluating to `true` within the `willStart` function. Consequently,
invoking `_super` results in the return of `willStart` without assigning
a value to `currentActionName`.

After this commit:

Now, before returning the function, it sets a value for
`currentActionName` and then proceeds with the necessary steps. This
prevents the issue where an action was `undefined`.

[1]: b154fe1

task-3680483

closes #163043

X-original-commit: c028578
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
@robodoo robodoo closed this Apr 24, 2024
@fw-bot fw-bot deleted the saas-17.1-saas-16.4-undefined-action-forms-visp-glK4-fw branch May 8, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants