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][FIX] product_contract: Compute date_start and date_end correctly. Make fields computed #1188

Merged

Conversation

sergio-teruel
Copy link
Contributor

@OCA-git-bot
Copy link
Contributor

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

@sergio-teruel sergio-teruel force-pushed the 17.0-FIX-product_contract-compute-dates branch 2 times, most recently from a3b606d to 90dcd82 Compare January 24, 2025 22:51
Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

If we set different date_end than computed on configurator, it is not being applied, see next gif:

recomputo

@sergio-teruel sergio-teruel force-pushed the 17.0-FIX-product_contract-compute-dates branch 2 times, most recently from 6c26639 to 111b506 Compare January 27, 2025 10:21
@sergio-teruel sergio-teruel force-pushed the 17.0-FIX-product_contract-compute-dates branch 2 times, most recently from cb44b22 to ffa3e67 Compare January 27, 2025 10:58
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 rebase to resolve conflicts.

)
).replace(day=1) - relativedelta(days=1)
elif sol.contract_start_date_method == "start_next":
# Dia 1 del siguiente recurring_rule_type
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please avoid spanglish?

def _get_auto_renew_rule_type(self):
"""monthly last day don't make sense for auto_renew_rule_type"""
self.ensure_one()
if self.recurring_rule_type == "monthlylastday":
if self.auto_renew_rule_type == "monthlylastday":
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change the field?
I see this field cannot have the option monthlylastday

auto_renew_rule_type = fields.Selection(
[
("daily", "Day(s)"),
("weekly", "Week(s)"),
("monthly", "Month(s)"),
("yearly", "Year(s)"),
],

@pedrobaeza pedrobaeza added this to the 17.0 milestone Jan 28, 2025
@CarlosRoca13 CarlosRoca13 force-pushed the 17.0-FIX-product_contract-compute-dates branch from 4f6bd60 to 76d8c2f Compare January 28, 2025 07:47
@sergio-teruel
Copy link
Contributor Author

@carlos-lopez-tecnativa Changes done!

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.

LGTM

@rousseldenis
Copy link
Contributor

@sbejaoui

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.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-1188-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f91a487 into OCA:17.0 Jan 28, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4cbc960. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 17.0-FIX-product_contract-compute-dates branch January 28, 2025 18:35
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.

6 participants