[IMP] Add type to analytic account / contract

This commit is contained in:
Stefan Becker
2017-09-06 13:18:00 +02:00
committed by Jean-Charles Drubay
parent 2b7844caf9
commit a32ba288f8
4 changed files with 128 additions and 19 deletions

View File

@@ -233,6 +233,12 @@ class TestContract(TestContractBase):
result = self.contract.action_contract_send()
self.assertEqual(result['res_model'], 'mail.compose.message')
def test_onchange_contract_type(self):
self.contract._onchange_contract_type()
self.assertEqual(self.contract.journal_id.type, 'sale')
self.assertEqual(
self.contract.journal_id.company_id, self.contract.company_id)
def test_contract_onchange_product_id_domain_blank(self):
"""It should return a blank UoM domain when no product."""
line = self.env['account.analytic.contract.line'].new()