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

[17.0][IMP] product_contract: Set new button to configure contract #1194

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

CarlosRoca13
Copy link
Contributor

With this change, we allow the user to modify the contract without going through the product configuration stage, which overwrites the product and causes the loss of some information, even when no changes are made.

Removed too the description feature because is changing the description when no option is activated. Since we have the information about what has been configured under the product, this is not a completely necessary feature. Added BTW on the ROADMAP.

cc @Tecnativa TT55066

ping @pedrobaeza @carlos-lopez-tecnativa

@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza
Copy link
Member

Put the removal in a separate commit.

@CarlosRoca13 CarlosRoca13 force-pushed the 17.0-FIX-product_contract-configurator branch 2 times, most recently from 54bfbb7 to f8e512f Compare February 12, 2025 16:36
With this change, we allow the user to modify the contract without going through the product configuration stage, which overwrites the product and causes the loss of some information, even when no changes are made.
Removed the description feature because is changing the description when no option is activated. Since we have the information about what has been configured under the product, this is not a completely necessary feature. Added BTW on the ROADMAP.
@CarlosRoca13 CarlosRoca13 force-pushed the 17.0-FIX-product_contract-configurator branch from f8e512f to b4917a9 Compare February 12, 2025 16:37
@CarlosRoca13
Copy link
Contributor Author

Done @pedrobaeza

@pedrobaeza pedrobaeza added this to the 17.0 milestone Feb 12, 2025
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Shouldn't you remove also the context storage thing?

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

Please check this error:

  • Add a product with variants and a contract.
  • Edit the product, confirm the variant, but cancel the contract configuration.
  • The product is removed—why?
  • Obviously, when trying to edit again, the error occurs because the product is empty.

Peek 2025-02-12 13-20

@CarlosRoca13
Copy link
Contributor Author

@pedrobaeza The storage of the context can be removed, but when changing a product attribute, the wizard's information will not be automatically filled in.

@carlos-lopez-tecnativa The issue that is occurring is that when pressing OK in the product configurator, the product is assigned regardless of whether it is changed or not. As a result, the new product process is executed. If, in a new product, the contract configuration is canceled, this causes the product not to be assigned, just as it happens with events.

@carlos-lopez-tecnativa
Copy link
Contributor

@carlos-lopez-tecnativa The issue that is occurring is that when pressing OK in the product configurator, the product is assigned regardless of whether it is changed or not. As a result, the new product process is executed. If, in a new product, the contract configuration is canceled, this causes the product not to be assigned, just as it happens with events.

I understand your point, but when the record has not been saved yet, it's fine for the product to be empty.

Would it be possible to hide the buttons if no product is selected? This would prevent users from clicking and causing a traceback.

However, if the sale.order has already been saved and has an ID, canceling the wizard should not clear the product. Also, I think that on the second attempt, the Edit Configuration button should not open the contract configuration. There is now a dedicated button for that, so this should only happen when adding a new line. This change could also resolve the issue.

This is an edge case that usually doesn’t occur. I'm just testing possible scenarios based on customer feedback.

What do you think?

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

Successfully merging this pull request may close these issues.

4 participants