mirror of
https://github.com/bringout/oca-ocb-test.git
synced 2026-04-24 06:42:01 +02:00
19.0 vanilla
This commit is contained in:
parent
38c6088dcc
commit
d9452d2060
243 changed files with 30797 additions and 10815 deletions
|
|
@ -12,7 +12,6 @@ pip install odoo-bringout-oca-ocb-test_crm_full
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- crm
|
||||
- crm_iap_enrich
|
||||
- crm_iap_mine
|
||||
|
|
@ -24,34 +23,12 @@ This addon depends on:
|
|||
- website_crm_partner_assign
|
||||
- website_crm_livechat
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: Test Full Crm Flow
|
||||
- **Version**: 1.0
|
||||
- **Category**: Hidden/Tests
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `test_crm_full`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/test_crm_full
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -1,21 +1,23 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-test_crm_full"
|
||||
version = "16.0.0"
|
||||
description = "Test Full Crm Flow - Odoo addon"
|
||||
description = "Test Full Crm Flow -
|
||||
Odoo addon
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-crm>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_iap_enrich>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_iap_mine>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_sms>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-event_crm>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-sale_crm>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_iap_reveal>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_partner_assign>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_livechat>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-crm>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_iap_enrich>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_iap_mine>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-crm_sms>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-event_crm>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-sale_crm>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_iap_reveal>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_partner_assign>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-website_crm_livechat>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -25,7 +27,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -20,5 +20,6 @@ backend. It notably includes IAP bridges modules to test their impact. """,
|
|||
'website_crm_partner_assign',
|
||||
'website_crm_livechat',
|
||||
],
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ class TestCrmFullCommon(TestCrmCommon, MockIAPReveal, MockVisitor):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestCrmFullCommon, cls).setUpClass()
|
||||
cls._init_mail_gateway()
|
||||
cls._activate_multi_company()
|
||||
|
||||
# Context data: dates
|
||||
|
|
@ -34,7 +33,6 @@ class TestCrmFullCommon(TestCrmCommon, MockIAPReveal, MockVisitor):
|
|||
'email': 'partner.email.%02d@test.example.com' % idx,
|
||||
'function': 'Noisy Customer',
|
||||
'lang': 'fr_BE',
|
||||
'mobile': '04569999%02d' % idx,
|
||||
'name': 'PartnerCustomer',
|
||||
'phone': '04560000%02d' % idx,
|
||||
'street': 'Super Street, %092d' % idx,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
from freezegun import freeze_time
|
||||
|
||||
from odoo.addons.test_crm_full.tests.common import TestCrmFullCommon
|
||||
from odoo.tests.common import users, warmup, Form
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests import Form, users, warmup, tagged
|
||||
|
||||
|
||||
@tagged('crm_performance', 'post_install', '-at_install', '-standard')
|
||||
|
|
@ -15,10 +14,13 @@ class CrmPerformanceCase(TestCrmFullCommon):
|
|||
super(CrmPerformanceCase, self).setUp()
|
||||
# patch registry to simulate a ready environment
|
||||
self.patch(self.env.registry, 'ready', True)
|
||||
# we don't use mock_mail_gateway thus want to mock smtp to test the stack
|
||||
self._mock_smtplib_connection()
|
||||
|
||||
self._flush_tracking()
|
||||
|
||||
self.user_sales_leads.write({
|
||||
'groups_id': [
|
||||
'group_ids': [
|
||||
(4, self.env.ref('event.group_event_user').id),
|
||||
(4, self.env.ref('im_livechat.im_livechat_group_user').id),
|
||||
]
|
||||
|
|
@ -40,16 +42,15 @@ class TestCrmPerformance(CrmPerformanceCase):
|
|||
""" Test multiple lead creation (import) """
|
||||
batch_size = 10
|
||||
country_be = self.env.ref('base.be')
|
||||
lang_be_id = self.env['res.lang']._lang_get_id('fr_BE')
|
||||
lang_be_id = self.env['res.lang']._get_data(code='fr_BE').id
|
||||
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=194): # tcf 193 / com 194
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=192): # tcf 191
|
||||
self.env.cr._now = self.reference_now # force create_date to check schedulers
|
||||
crm_values = [
|
||||
{'country_id': country_be.id,
|
||||
'email_from': 'address.email.%02d@test.example.com' % idx,
|
||||
'function': 'Noisy Customer',
|
||||
'lang_id': lang_be_id,
|
||||
'mobile': '04551111%02d' % idx,
|
||||
'name': 'Test Lead %02d' % idx,
|
||||
'phone': '04550000%02d' % idx,
|
||||
'street': 'Super Street, %092d' % idx,
|
||||
|
|
@ -70,14 +71,13 @@ class TestCrmPerformance(CrmPerformanceCase):
|
|||
country_be = self.env.ref('base.be')
|
||||
lang_be = self.env['res.lang']._lang_get('fr_BE')
|
||||
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=189): # tcf only: 173 - com runbot: 174/175
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=145): # tcf 142 / com 144
|
||||
self.env.cr._now = self.reference_now # force create_date to check schedulers
|
||||
with Form(self.env['crm.lead']) as lead_form:
|
||||
lead_form.country_id = country_be
|
||||
lead_form.email_from = 'address.email@test.example.com'
|
||||
lead_form.function = 'Noisy Customer'
|
||||
lead_form.lang_id = lang_be
|
||||
lead_form.mobile = '0455111100'
|
||||
lead_form.name = 'Test Lead'
|
||||
lead_form.phone = '0455000011'
|
||||
lead_form.street = 'Super Street, 00'
|
||||
|
|
@ -89,7 +89,7 @@ class TestCrmPerformance(CrmPerformanceCase):
|
|||
@warmup
|
||||
def test_lead_create_form_partner(self):
|
||||
""" Test a single lead creation using Form with a partner """
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=199): # tcf 186 / com 188
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=144): # tcf 141 / com 143
|
||||
self.env.cr._now = self.reference_now # force create_date to check schedulers
|
||||
with self.debug_mode():
|
||||
# {'invisible': ['|', ('type', '=', 'opportunity'), ('is_partner_visible', '=', False)]}
|
||||
|
|
@ -105,16 +105,15 @@ class TestCrmPerformance(CrmPerformanceCase):
|
|||
def test_lead_create_single_address(self):
|
||||
""" Test multiple lead creation (import) """
|
||||
country_be = self.env.ref('base.be')
|
||||
lang_be_id = self.env['res.lang']._lang_get_id('fr_BE')
|
||||
lang_be_id = self.env['res.lang']._get_data(code='fr_BE').id
|
||||
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=43): # tcf only: 41 - com runbot: 42
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=30): # tcf 29
|
||||
self.env.cr._now = self.reference_now # force create_date to check schedulers
|
||||
crm_values = [
|
||||
{'country_id': country_be.id,
|
||||
'email_from': 'address.email.00@test.example.com',
|
||||
'function': 'Noisy Customer',
|
||||
'lang_id': lang_be_id,
|
||||
'mobile': '0455111100',
|
||||
'name': 'Test Lead',
|
||||
'phone': '0455000000',
|
||||
'street': 'Super Street, 00',
|
||||
|
|
@ -127,7 +126,7 @@ class TestCrmPerformance(CrmPerformanceCase):
|
|||
@warmup
|
||||
def test_lead_create_single_partner(self):
|
||||
""" Test multiple lead creation (import) """
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=49): # tcf only: 47 - com runbot: 48
|
||||
with freeze_time(self.reference_now), self.assertQueryCount(user_sales_leads=30): # tcf 29
|
||||
self.env.cr._now = self.reference_now # force create_date to check schedulers
|
||||
crm_values = [
|
||||
{'partner_id': self.partners[0].id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue