mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: Add followers to invoices created
This commit is contained in:
@@ -201,6 +201,21 @@ class TestContract(TestContractBase):
|
||||
)
|
||||
self.assertEqual(self.acct_line.last_date_invoiced, last_date_invoiced)
|
||||
|
||||
def test_contract_invoice_followers(self):
|
||||
self.acct_line.recurring_next_date = '2018-02-23'
|
||||
self.acct_line.recurring_rule_type = 'daily'
|
||||
self.contract.pricelist_id = False
|
||||
self.contract.message_subscribe(
|
||||
partner_ids=self.contract.partner_id.ids,
|
||||
subtype_ids=self.env.ref(
|
||||
'contract.mail_message_subtype_invoice_created'
|
||||
).ids
|
||||
)
|
||||
self.contract.recurring_create_invoice()
|
||||
invoice_daily = self.contract._get_related_invoices()
|
||||
self.assertTrue(invoice_daily)
|
||||
self.assertEqual(len(invoice_daily.message_partner_ids.ids), 2)
|
||||
|
||||
def test_contract_weekly_post_paid(self):
|
||||
recurring_next_date = to_date('2018-03-01')
|
||||
last_date_invoiced = to_date('2018-02-21')
|
||||
|
||||
Reference in New Issue
Block a user