[14.0][MIG] contract_variable_qty_prorated

This commit is contained in:
Giovanni
2022-10-31 10:03:58 +01:00
parent 5daadbd0f3
commit 11ffdc6853
7 changed files with 23 additions and 18 deletions

View File

@@ -7,10 +7,7 @@ from odoo import api, models
class ContractLine(models.Model):
_inherit = "contract.line"
@api.multi
def compute_prorated(
self, period_first_date, period_last_date, invoice_date
):
def compute_prorated(self, period_first_date, period_last_date, invoice_date):
self.ensure_one()
return self._compute_prorated(
period_first_date,
@@ -42,9 +39,7 @@ class ContractLine(models.Model):
recurring_rule_type == "monthlylastday"
and recurring_invoicing_type == "post-paid"
):
relative_delta = self.get_relative_delta(
"monthly", recurring_interval
)
relative_delta = self.get_relative_delta("monthly", recurring_interval)
theoretical_next_date += self.get_relative_delta("daily", 1)
if recurring_invoicing_type == "pre-paid":