You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
599 B

# -*- coding: utf-8 -*-
# © 2015 Antiun Ingenieria S.L. - Javier Iniesta
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from openerp.exceptions import ValidationError
class TestResPartner(TransactionCase):
def test_check_sectors(self):
sector = self.env['res.partner.sector'].create({'name': 'Test'})
with self.assertRaises(ValidationError):
self.env['res.partner'].create(
{'name': 'Test', 'sector_id': sector.id,
'secondary_sector_ids': [(4, sector.id)]})