-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
[14.0][BUG] - Contract with an End date raise an error #712
Comments
The problem seems to be in this function : @api.depends(
"contract_line_ids.recurring_next_date",
"contract_line_ids.is_canceled",
)
def _compute_recurring_next_date(self):
for contract in self:
recurring_next_date = contract.contract_line_ids.filtered(
lambda l: (
l.recurring_next_date
and not l.is_canceled
and (not l.display_type or l.is_recurring_note)
)
).mapped("recurring_next_date")
# we give priority to computation from date_start if modified
if (
contract._origin
and contract._origin.date_start != contract.date_start
or not recurring_next_date
):
super(ContractContract, contract)._compute_recurring_next_date()
else:
contract.recurring_next_date = min(recurring_next_date) Why are we calling If By changing the But is not totally good because with that modification we can't copy a Contract anymore 🙈 because of a constrains in Any other ideas or advices to fix this ? Thanks, Mkxm |
What are the steps to reproduce the problem in UI? |
@pedrobaeza we had the same issue (V13). We suggest 2 solutions: A) If we add the condition is_terminated = False to the domain ( B) When calling Pedro, could you validate which option would be better? We can take care of this. |
Hi @pedrobaeza , did you have the chance to have a look at this? We can manage the FIX. THX. |
Hello Team Any update on this issue? |
I'd like to vote for this issue - have the same problem here in Odoo v13. |
Hello Team Someone have solution for this issue ? |
I can confirm that this is not working when setting the recurrence at contract level instead of line level, the recurring_next_date will be update to the value of date_start if it reach the date_end, that makes the contract never be finished. Recurrence on line level seems to be fine, except that we can not duplicate the contract record |
This is fixed in #853 (for v13, but it's applicable the same for 14 and 15) |
I think #841 also solves this issue. |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Hello there,
I'm sorry let me know if am I on the wrong way but I'm not sure if this is a bad understanding of the module or if this is a real problem.
I have a problem if I want to specify the Date End of the Contract.
For instance this is Contract of 3 months invoiced 1 time for each month.
Steps to reproduce the problem :
With an empty database and the Contracts (14.0) module freshly updated from github.
With and Odoo 14 with standard addons in a new project.
This error appear because in the last call, the value of "last_date_invoiced" is "False".
We should never call this function again because this Contract shoudn't be invoiced a new time.
Is there a bug ? The "recurring_next_date" should be empty at the end of the Contract ?
Thanks
The text was updated successfully, but these errors were encountered: