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.

19 lines
652 B

9 years ago
  1. # -*- coding: utf-8 -*-
  2. # © 2015 ACSONE SA/NV (<http://acsone.eu>).
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. import openerp.tests.common as common
  5. class TestBasePartnerSequence(common.TransactionCase):
  6. def test_ref_sequence_on_partner(self):
  7. res_partner = self.env['res.partner']
  8. partner = res_partner.create({
  9. 'name': "test1",
  10. 'email': "test@test.com"})
  11. self.assertTrue(partner.ref, "A partner has always a ref.")
  12. copy = partner.copy()
  13. self.assertTrue(copy.ref, "A partner with ref created by copy "
  14. "has a ref by default.")