mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: Add followers to invoices created
[UPD] Update contract.pot [UPD] README.rst
This commit is contained in:
committed by
Christopher Rogos
parent
cdc17eba63
commit
5b52ee97d0
@@ -220,6 +220,21 @@ class TestContract(TestContractBase):
|
||||
self.assertEqual(self.acct_line.recurring_next_date, recurring_next_date)
|
||||
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), 1)
|
||||
|
||||
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