mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-24 15:52:01 +02:00
Initial commit: Crm packages
This commit is contained in:
commit
21a345b5b9
654 changed files with 418312 additions and 0 deletions
3
odoo-bringout-oca-ocb-crm_sms/crm_sms/tests/__init__.py
Normal file
3
odoo-bringout-oca-ocb-crm_sms/crm_sms/tests/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import test_crm_lead
|
||||
29
odoo-bringout-oca-ocb-crm_sms/crm_sms/tests/test_crm_lead.py
Normal file
29
odoo-bringout-oca-ocb-crm_sms/crm_sms/tests/test_crm_lead.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.addons.crm.tests.common import TestCrmCommon
|
||||
from odoo.tests.common import users
|
||||
|
||||
|
||||
class TestCRMLead(TestCrmCommon):
|
||||
|
||||
@users('user_sales_manager')
|
||||
def test_phone_mobile_update(self):
|
||||
lead = self.env['crm.lead'].create({
|
||||
'name': 'Lead 1',
|
||||
'country_id': self.env.ref('base.us').id,
|
||||
'phone': self.test_phone_data[0],
|
||||
})
|
||||
self.assertEqual(lead.phone, self.test_phone_data[0])
|
||||
self.assertFalse(lead.mobile)
|
||||
self.assertEqual(lead.phone_sanitized, self.test_phone_data_sanitized[0])
|
||||
|
||||
lead.write({'phone': False, 'mobile': self.test_phone_data[1]})
|
||||
self.assertFalse(lead.phone)
|
||||
self.assertEqual(lead.mobile, self.test_phone_data[1])
|
||||
self.assertEqual(lead.phone_sanitized, self.test_phone_data_sanitized[1])
|
||||
|
||||
lead.write({'phone': self.test_phone_data[1], 'mobile': self.test_phone_data[2]})
|
||||
self.assertEqual(lead.phone, self.test_phone_data[1])
|
||||
self.assertEqual(lead.mobile, self.test_phone_data[2])
|
||||
self.assertEqual(lead.phone_sanitized, self.test_phone_data_sanitized[2])
|
||||
Loading…
Add table
Add a link
Reference in a new issue