-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
[FIX] website_sale: retain rental period on attribute #165068
[FIX] website_sale: retain rental period on attribute #165068
Conversation
@rupa-odoo please ping the right team, we have dedicated github teams for sale, loyalty, delivery, ecommerce, sales connector & payment. |
Hello @rupa-odoo I'll wait for @kcv-odoo's review before taking a look at this :) Have a nice day! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is related to rental and your fix is in website_sale
. Is your issue really related to eCom not rental?
About commit message:
First verb of title should be in first form not second you are proposing a fix as an PR so
your title should be like this This commit will {commit_title}
Also cause and fix part should not like this:
Cause: Traceback or issue occur Fix: Fix the trace back or issue
Cause should explain cause of issue what is root of that issue why it occur and may be add cause related commit or PR and Fix should explain your choices why your fix is best fix and why you did what you did this will save time of reviewer of PR also if someone look at your fix after some time they can easily understand it by reading commit message 🙂
Hope this helps 🙏
536a178
to
7ae96d3
Compare
Note: |
7ae96d3
to
3e37429
Compare
83b495d
to
db1b239
Compare
db1b239
to
9d903a6
Compare
Note : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for stable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rupa-odoo
Thanks for your work on this fix!
Those changes should be done in website_sale_renting
, as it only concerns renting period in a filter only available when website_sale_renting
is installed. Could you adapt your changes?
Have a nice day!
<input type="hidden" name="start_date" t-att-value="start_date"/> | ||
<input type="hidden" name="end_date" t-att-value="end_date"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't solve the issue for existing clients as templates are only updated at upgrade. It will work for new customers though
9d903a6
to
987c83f
Compare
Yes, Done the changes 👍 |
Hello @chevalierv 👋 I thought doing solution here in Or is it okay to ask for upgrade exception? 🤔 |
Hello @kcv-odoo Why do you think this would need an upgrade exception? IMO, we shouldn't do a bad fix to avoid exceptions, a good reason would be that the impact on the client is different (like with this ugly fix, clients don't need to upgrade the module to apply the fix) |
version - 16.0 Steps: -Install rental app. -Activate the date picker from the web-editor. -Add the start date and end date from that. -Select some attribute of the product. Issue: -When any user adds the start date and end date from the date picker and after that, the user adds the other attribute(filter) of the product, that s> Cause: -The selected rental period (start and end dates) is not persisted when the page refreshes or updates due to attribute selection. Fix: Get the value of 'start_date' and 'end_date'. Update the hidden input fields for 'start_date' and 'end_date' with the values before applying the attribute changes. opw-3774060
987c83f
to
42f51e2
Compare
@robodoo r+ |
@rupa-odoo @chevalierv 'ci/template' failed on this reviewed PR. |
version - 16.0 Steps: -Install rental app. -Activate the date picker from the web-editor. -Add the start date and end date from that. -Select some attribute of the product. Issue: -When any user adds the start date and end date from the date picker and after that, the user adds the other attribute(filter) of the product, that s> Cause: -The selected rental period (start and end dates) is not persisted when the page refreshes or updates due to attribute selection. Fix: Get the value of 'start_date' and 'end_date'. Update the hidden input fields for 'start_date' and 'end_date' with the values before applying the attribute changes. opw-3774060 closes #165068 Related: odoo/enterprise#64962 Signed-off-by: Valentin Chevalier <vcr@odoo.com>
version - 16.0
Steps:
-Install rental app.
-Activate the date picker from the web-editor.
-Add the start date and end date from that.
-Select some attribute of the product.
Issue:
-When any user adds the start date and end date from the date picker and
after that, the user adds the other attribute(filter) of the product, that s>
Cause:
-The selected rental period (start and end dates) is not persisted when the
page refreshes or updates due to attribute selection.
Fix:
Get the value of 'start_date' and 'end_date'.
Update the hidden input fields for 'start_date' and 'end_date' with the
values before applying the attribute changes.
opw-3774060