|
@ -42,7 +42,7 @@ class CompanyCase(TransactionCase): |
|
|
|
|
|
|
|
|
class PersonCase(CompanyCase): |
|
|
class PersonCase(CompanyCase): |
|
|
"""Test ``res.partner`` when it is a person.""" |
|
|
"""Test ``res.partner`` when it is a person.""" |
|
|
context = {"default_is_company": False} |
|
|
|
|
|
|
|
|
context = {"default_is_company": False, "default_type": 'contact'} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UserCase(CompanyCase, MailInstalled): |
|
|
class UserCase(CompanyCase, MailInstalled): |
|
@ -58,3 +58,15 @@ class UserCase(CompanyCase, MailInstalled): |
|
|
else: |
|
|
else: |
|
|
# Run tests |
|
|
# Run tests |
|
|
super(UserCase, self).tearDown() |
|
|
super(UserCase, self).tearDown() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AddressCase(TransactionCase): |
|
|
|
|
|
"""Test ``res.partner`` when it is a address.""" |
|
|
|
|
|
|
|
|
|
|
|
def test_new_empty_address(self): |
|
|
|
|
|
"""Create an empty partner.""" |
|
|
|
|
|
self.original = self.env["res.partner"].create({ |
|
|
|
|
|
"is_company": False, |
|
|
|
|
|
"type": 'invoice', |
|
|
|
|
|
"lastname": "", |
|
|
|
|
|
"firstname": ""}) |