mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[12.0][IMP] - Add failing test for wrong invoicing date after contract line stop
This commit is contained in:
committed by
Francisco Ivan Anton Prieto
parent
cf2b206fca
commit
f54661e53e
@@ -2315,3 +2315,19 @@ class TestContract(TestContractBase):
|
|||||||
'recurring_next_date': '2019-01-01',
|
'recurring_next_date': '2019-01-01',
|
||||||
'last_date_invoiced': '2019-06-01',
|
'last_date_invoiced': '2019-06-01',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def test_stop_and_update_recurring_invoice_date(self):
|
||||||
|
self.acct_line.write(
|
||||||
|
{
|
||||||
|
'date_start': '2019-01-01',
|
||||||
|
'date_end': '2019-12-31',
|
||||||
|
'recurring_next_date': '2020-01-01',
|
||||||
|
'recurring_invoicing_type': 'post-paid',
|
||||||
|
'recurring_rule_type': 'yearly',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
self.acct_line.stop(to_date('2019-05-31'))
|
||||||
|
self.assertEqual(self.acct_line.date_end, to_date('2019-05-31'))
|
||||||
|
self.assertEqual(
|
||||||
|
self.acct_line.recurring_next_date, to_date('2019-06-01')
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user