mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] - fix stop_plan_successor case 5
contract line start in the suspension period and end after it
This commit is contained in:
committed by
Francisco Ivan Anton Prieto
parent
0e27aa2365
commit
a855a77354
@@ -557,7 +557,7 @@ class AccountAnalyticInvoiceLine(models.Model):
|
||||
- suspension.date_start)
|
||||
* contract line start and end's in the suspension period
|
||||
-> apply delay
|
||||
- delay: suspension.date_end - contract_line.end_date
|
||||
- delay: suspension.date_end - contract_line.date_start
|
||||
* contract line start in the suspension period and end after it
|
||||
-> apply delay
|
||||
- delay: suspension.date_end - contract_line.date_start
|
||||
@@ -576,13 +576,7 @@ class AccountAnalyticInvoiceLine(models.Model):
|
||||
contract_line = self.env['account.analytic.invoice.line']
|
||||
for rec in self:
|
||||
if rec.date_start >= date_start:
|
||||
if rec.date_end and rec.date_end <= date_end:
|
||||
delay = date_end - rec.date_end
|
||||
elif (
|
||||
rec.date_end
|
||||
and rec.date_end > date_end
|
||||
or not rec.date_end
|
||||
) and rec.date_start <= date_end:
|
||||
if rec.date_start < date_end:
|
||||
delay = date_end - rec.date_start
|
||||
else:
|
||||
delay = date_end - date_start
|
||||
|
||||
Reference in New Issue
Block a user