[FIX] - Compute recurring_next_date before create contract line

This commit is contained in:
sbejaoui
2018-11-05 18:05:53 +01:00
committed by Thomas Binsfeld
parent 6ee1b9c242
commit c8ec4f3404
2 changed files with 28 additions and 2 deletions

View File

@@ -16,7 +16,25 @@ class TestSaleOrder(TransactionCase):
{'name': 'Template 1'}
)
self.contract_template2 = self.env['account.analytic.contract'].create(
{'name': 'Template 2'}
{
'name': 'Template 2',
'recurring_invoice_line_ids': [
(
0,
0,
{
'product_id': self.product2.id,
'name': 'Services from #START# to #END#',
'quantity': 1,
'uom_id': self.product2.uom_id.id,
'price_unit': 100,
'discount': 50,
'recurring_rule_type': 'yearly',
'recurring_interval': 1,
},
)
],
}
)
self.product1.write(
{