-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
[17.0][FIX] product_contract: Compute date_start and date_end correctly. Make fields computed #1188
Conversation
Hi @sbejaoui, |
a3b606d
to
90dcd82
Compare
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.
6c26639
to
111b506
Compare
cb44b22
to
ffa3e67
Compare
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.
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 |
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.
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": |
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.
Why did you change the field?
I see this field cannot have the option monthlylastday
contract/product_contract/models/sale_order_line.py
Lines 68 to 74 in 4f6bd60
auto_renew_rule_type = fields.Selection( | |
[ | |
("daily", "Day(s)"), | |
("weekly", "Week(s)"), | |
("monthly", "Month(s)"), | |
("yearly", "Year(s)"), | |
], |
…ke fields computed
… to use them on _compute_name method
4f6bd60
to
76d8c2f
Compare
@carlos-lopez-tecnativa Changes done! |
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
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.
/ocabot merge patch
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 4cbc960. Thanks a lot for contributing to OCA. ❤️ |
cc @Tecnativa TT54646
ping @CarlosRoca13 @carlos-lopez-tecnativa