[IMP] - can't upsell or downsell a resiliated contract

This commit is contained in:
sbejaoui
2020-01-30 13:24:25 +01:00
committed by Abraham Anes
parent 9ff15571f3
commit 2eff566cb4
4 changed files with 39 additions and 0 deletions

View File

@@ -342,3 +342,18 @@ class TestSaleOrder(TransactionCase):
self.env['contract.contract'].search(action['domain']),
self.sale.order_line.mapped('contract_id'),
)
def test_check_contact_is_not_resiliated(self):
self.contract.is_resiliated = True
with self.assertRaises(ValidationError):
self.order_line1.contract_id = self.contract
def test_check_contact_is_not_resiliated(self):
self.order_line1.contract_id = self.contract
self.sale.action_confirm()
self.contract.is_resiliated = True
self.sale.action_cancel()
with self.assertRaises(ValidationError):
self.sale.action_draft()
self.contract.is_resiliated = False
self.sale.action_draft()