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] repair: Fix sequence auto generation #165852

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 16, 2024

Issue: In the upgraded version, we have implemented the condition vals['name'] == _('New').
However, the data type of the 'name' field is character and translate = False.
Additionally, the default value for the 'name' field is set to 'New', causing
this condition to evaluate to false and consequently terminating the execution
of the if block.

Solution: To address this, we propose changing the condition to vals['name'] == 'New'
          to ensure correct comparison. This modification is warranted due to the
          [configuration](https://github.com/odoo/odoo/blob/89fbb75659ba71b8c76dddd62ba331966161f59b/addons/repair/models/repair.py#L31)
          of the field:

          The field is not translatable.
          The field is required and set to readonly true, preventing customers from inputting values.
          The default value for the field is set to 'New'.

Before:
       Unable to obtain the auto-generated sequence (receiving default value 'New').

After:
      The sequence is generated automatically.

OPW-3887638

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #165771

    Issue: In the upgraded version, we have implemented the condition vals['name'] == _('New').
           However, the data type of the 'name' field is character and translate = False.
           Additionally, the default value for the 'name' field is set to 'New', causing
           this condition to evaluate to false and consequently terminating the execution
           of the if block.

    Solution: To address this, we propose changing the condition to vals['name'] == 'New'
              to ensure correct comparison. This modification is warranted due to the
              [configuration](https://github.com/odoo/odoo/blob/89fbb75659ba71b8c76dddd62ba331966161f59b/addons/repair/models/repair.py#L31)
              of the field:

              The field is not translatable.
              The field is required and set to readonly true, preventing customers from inputting values.
              The default value for the field is set to 'New'.

    Before:
           Unable to obtain the auto-generated sequence (receiving default value 'New').

    After:
          The sequence is generated automatically.

    OPW-3887638

X-original-commit: 80d259d
@robodoo
Copy link
Contributor

robodoo commented May 16, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 16, 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 May 16, 2024
@fw-bot
Copy link
Contributor Author

fw-bot commented May 16, 2024

@bsra-odoo @ticodoo ci/runbot failed on this forward-port PR

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 16, 2024
robodoo pushed a commit that referenced this pull request May 27, 2024
    Issue: In the upgraded version, we have implemented the condition vals['name'] == _('New').
           However, the data type of the 'name' field is character and translate = False.
           Additionally, the default value for the 'name' field is set to 'New', causing
           this condition to evaluate to false and consequently terminating the execution
           of the if block.

    Solution: To address this, we propose changing the condition to vals['name'] == 'New'
              to ensure correct comparison. This modification is warranted due to the
              [configuration](https://github.com/odoo/odoo/blob/89fbb75659ba71b8c76dddd62ba331966161f59b/addons/repair/models/repair.py#L31)
              of the field:

              The field is not translatable.
              The field is required and set to readonly true, preventing customers from inputting values.
              The default value for the field is set to 'New'.

    Before:
           Unable to obtain the auto-generated sequence (receiving default value 'New').

    After:
          The sequence is generated automatically.

    OPW-3887638

closes #165852

X-original-commit: 80d259d
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
@robodoo robodoo closed this May 27, 2024
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 OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants