[REF] contract: simplify _get_period_to_invoice

This commit is contained in:
Bejaoui Souheil
2019-12-09 12:28:57 +01:00
committed by Francisco Ivan Anton Prieto
parent bfa220bcb8
commit 313bacff0f

View File

@@ -667,9 +667,8 @@ class ContractLine(models.Model):
# TODO this method can now be removed, since # TODO this method can now be removed, since
# TODO self.next_period_date_start/end have the same values # TODO self.next_period_date_start/end have the same values
self.ensure_one() self.ensure_one()
first_date_invoiced = False
if not recurring_next_date: if not recurring_next_date:
return first_date_invoiced, False, recurring_next_date return False, False, False
first_date_invoiced = ( first_date_invoiced = (
last_date_invoiced + relativedelta(days=1) last_date_invoiced + relativedelta(days=1)
if last_date_invoiced if last_date_invoiced