From 29192aa014bbe338a0d83d08c1cc310556e927a3 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 7 Dec 2017 17:30:04 +0100 Subject: [PATCH] [10.0][FIX+IMP] contract: Improve usability and don't fail on wrong data (#130) * [FIX+IMP] contract: Improve usability and don't fail on wrong data * Cron create invoices masked for avoiding silent errors * New constraints for assuring data consistency * UI helps for entering consistent data * Spanish translation * Remove double company_id field on form * [FIX] contract_sale_generation: Adapt tests to upstream contract --- .../tests/test_contract_sale.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/contract_sale_generation/tests/test_contract_sale.py b/contract_sale_generation/tests/test_contract_sale.py index 88c7e6d3..b64286b5 100644 --- a/contract_sale_generation/tests/test_contract_sale.py +++ b/contract_sale_generation/tests/test_contract_sale.py @@ -57,19 +57,12 @@ class TestContractSale(TransactionCase): res = self.contract_line._onchange_product_id() self.assertIn('uom_id', res['domain']) self.contract_line.price_unit = 100.0 - - self.contract.partner_id = False - with self.assertRaises(ValidationError): - self.contract.recurring_create_sale() - self.contract.partner_id = self.partner.id - self.contract.recurring_create_sale() self.sale_monthly = self.env['sale.order'].search( [('project_id', '=', self.contract.id), ('state', '=', 'draft')]) self.assertTrue(self.sale_monthly) self.assertEqual(self.contract.recurring_next_date, '2017-02-28') - self.sale_line = self.sale_monthly.order_line[0] self.assertAlmostEqual(self.sale_line.price_subtotal, 50.0) self.assertEqual(self.contract.partner_id.user_id, @@ -81,12 +74,6 @@ class TestContractSale(TransactionCase): res = self.contract_line._onchange_product_id() self.assertIn('uom_id', res['domain']) self.contract_line.price_unit = 100.0 - - self.contract.partner_id = False - with self.assertRaises(ValidationError): - self.contract.recurring_create_sale() - self.contract.partner_id = self.partner.id - self.contract.recurring_create_sale() self.sale_monthly = self.env['sale.order'].search( [('project_id', '=', self.contract.id),