mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2025-02-25 18:55:21 -06:00
[PATCH] Upstream patch - 09082022
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<field name="name">EDI : Perform web services operations</field>
|
||||
<field name="model_id" ref="model_account_edi_document"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.search([('state', 'in', ('to_send', 'to_cancel'))])._process_documents_web_services(job_count=20)</field>
|
||||
<field name="code">model.search([('state', 'in', ('to_send', 'to_cancel')), ('move_id.state', '=', 'posted')])._process_documents_web_services(job_count=20)</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="numbercall">-1</field>
|
||||
|
||||
@@ -5,7 +5,7 @@ from flectra.addons.crm.tests import common as crm_common
|
||||
from flectra.tests.common import tagged, users
|
||||
|
||||
|
||||
@tagged('lead_manage', 'crm_performance')
|
||||
@tagged('lead_manage', 'crm_performance', 'post_install', '-at_install')
|
||||
class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon):
|
||||
|
||||
@classmethod
|
||||
@@ -18,13 +18,14 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon):
|
||||
@users('user_sales_manager')
|
||||
def test_assignment_salesmen(self):
|
||||
test_leads = self._create_leads_batch(count=50, user_ids=[False])
|
||||
test_leads.flush()
|
||||
user_ids = self.assign_users.ids
|
||||
self.assertEqual(test_leads.user_id, self.env['res.users'])
|
||||
|
||||
with self.assertQueryCount(user_sales_manager=0):
|
||||
test_leads = self.env['crm.lead'].browse(test_leads.ids)
|
||||
|
||||
with self.assertQueryCount(user_sales_manager=254): # often 251, sometimes +3 on runbot
|
||||
with self.assertQueryCount(user_sales_manager=709): # crm 659 / com 658 / ent 709
|
||||
test_leads.handle_salesmen_assignment(user_ids=user_ids, team_id=False)
|
||||
|
||||
self.assertEqual(test_leads.team_id, self.sales_team_convert | self.sales_team_1)
|
||||
@@ -35,6 +36,7 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon):
|
||||
@users('user_sales_manager')
|
||||
def test_assignment_salesmen_wteam(self):
|
||||
test_leads = self._create_leads_batch(count=50, user_ids=[False])
|
||||
test_leads.flush()
|
||||
user_ids = self.assign_users.ids
|
||||
team_id = self.sales_team_convert.id
|
||||
self.assertEqual(test_leads.user_id, self.env['res.users'])
|
||||
@@ -42,7 +44,7 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon):
|
||||
with self.assertQueryCount(user_sales_manager=0):
|
||||
test_leads = self.env['crm.lead'].browse(test_leads.ids)
|
||||
|
||||
with self.assertQueryCount(user_sales_manager=221): # crm only: 215 - generally 218, sometimes +2/+3 on runbot
|
||||
with self.assertQueryCount(user_sales_manager=639): # crm 638 / com 638 / ent 639
|
||||
test_leads.handle_salesmen_assignment(user_ids=user_ids, team_id=team_id)
|
||||
|
||||
self.assertEqual(test_leads.team_id, self.sales_team_convert)
|
||||
@@ -164,9 +166,11 @@ class TestLeadConvertMass(crm_common.TestLeadConvertMassCommon):
|
||||
@users('user_sales_manager')
|
||||
def test_mass_convert_performances(self):
|
||||
test_leads = self._create_leads_batch(count=50, user_ids=[False])
|
||||
test_leads.flush()
|
||||
user_ids = self.assign_users.ids
|
||||
|
||||
with self.assertQueryCount(user_sales_manager=1361): # still some randomness (1360 spotted) - crm only: 1352
|
||||
# non deterministic (+1)
|
||||
with self.assertQueryCount(user_sales_manager=2014): # crm: 1724 / com 2006 / ent 2013
|
||||
mass_convert = self.env['crm.lead2opportunity.partner.mass'].with_context({
|
||||
'active_model': 'crm.lead',
|
||||
'active_ids': test_leads.ids,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="row mt16" id="gmail_client_secret">
|
||||
<label string="Client Secret" for="google_gmail_client_secret" class="col-lg-3 o_light_label"/>
|
||||
<field name="google_gmail_client_secret" class="ml-2"/>
|
||||
<field name="google_gmail_client_secret" password="True" class="ml-2"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
|
||||
4
addons/hr_recruitment_survey/controllers/__init__.py
Normal file
4
addons/hr_recruitment_survey/controllers/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import main
|
||||
12
addons/hr_recruitment_survey/controllers/main.py
Normal file
12
addons/hr_recruitment_survey/controllers/main.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from flectra.http import request
|
||||
from flectra.addons.survey.controllers.main import Survey
|
||||
|
||||
|
||||
class RecruitmentSurvey(Survey):
|
||||
|
||||
def _check_validity(self, survey_token, answer_token, ensure_token=True, check_partner=True):
|
||||
check_partner = check_partner and not request.env.user.has_group('hr_recruitment.group_hr_recruitment_user')
|
||||
return super(RecruitmentSurvey, self)._check_validity(survey_token, answer_token, ensure_token, check_partner)
|
||||
@@ -101,7 +101,17 @@ class MailController(http.Controller):
|
||||
else:
|
||||
record_action = record_sudo.get_access_action()
|
||||
if record_action['type'] == 'ir.actions.act_url' and record_action.get('target_type') != 'public':
|
||||
return cls._redirect_to_messaging()
|
||||
url_params = {
|
||||
'model': model,
|
||||
'id': res_id,
|
||||
'active_id': res_id,
|
||||
'action': record_action.get('id'),
|
||||
}
|
||||
view_id = record_sudo.get_formview_id()
|
||||
if view_id:
|
||||
url_params['view_id'] = view_id
|
||||
url = '/web/login?redirect=#%s' % url_encode(url_params)
|
||||
return werkzeug.utils.redirect(url)
|
||||
|
||||
record_action.pop('target_type', None)
|
||||
# the record has an URL redirection: use it directly
|
||||
|
||||
@@ -11,12 +11,16 @@ from flectra import api, SUPERUSER_ID
|
||||
|
||||
def _pre_init_mrp(cr):
|
||||
""" Allow installing MRP in databases with large stock.move table (>1M records)
|
||||
- Creating the computed+stored field stock_move.is_done is terribly slow with the ORM and
|
||||
leads to "Out of Memory" crashes
|
||||
- Creating the computed+stored field stock_move.is_done and
|
||||
stock_move.unit_factor is terribly slow with the ORM and leads to "Out of
|
||||
Memory" crashes
|
||||
"""
|
||||
cr.execute("""ALTER TABLE "stock_move" ADD COLUMN "is_done" bool;""")
|
||||
cr.execute("""UPDATE stock_move
|
||||
SET is_done=COALESCE(state in ('done', 'cancel'), FALSE);""")
|
||||
cr.execute("""ALTER TABLE "stock_move" ADD COLUMN "unit_factor" double precision;""")
|
||||
cr.execute("""UPDATE stock_move
|
||||
SET unit_factor=1;""")
|
||||
|
||||
def _create_warehouse_data(cr, registry):
|
||||
""" This hook is used to add a default manufacture_pull_id, manufacture
|
||||
|
||||
@@ -42,7 +42,7 @@ class AccountMove(models.Model):
|
||||
previous_qties_delivered = defaultdict(float)
|
||||
stock_move_lines = current_invoice_amls.sale_line_ids.move_ids.move_line_ids.filtered(lambda sml: sml.state == 'done' and sml.lot_id).sorted(lambda sml: (sml.date, sml.id))
|
||||
for sml in stock_move_lines:
|
||||
if sml.product_id not in invoiced_products:
|
||||
if sml.product_id not in invoiced_products or 'customer' not in {sml.location_id.usage, sml.location_dest_id.usage}:
|
||||
continue
|
||||
product = sml.product_id
|
||||
product_uom = product.uom_id
|
||||
|
||||
@@ -8,7 +8,7 @@ from flectra.tests import tagged
|
||||
from flectra.tools import mute_logger, formataddr
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class BaseMailPerformance(TransactionCaseWithUserDemo):
|
||||
|
||||
def setUp(self):
|
||||
@@ -43,7 +43,7 @@ class BaseMailPerformance(TransactionCaseWithUserDemo):
|
||||
self.env['ir.config_parameter'].set_param('mail.default.from', self.default_from)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestBaseMailPerformance(BaseMailPerformance):
|
||||
|
||||
def setUp(self):
|
||||
@@ -180,7 +180,7 @@ class TestBaseMailPerformance(BaseMailPerformance):
|
||||
})
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMailAPIPerformance(BaseMailPerformance):
|
||||
|
||||
def setUp(self):
|
||||
@@ -244,9 +244,9 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
})
|
||||
#read activity_type to normalize cache between enterprise and community
|
||||
#voip module read activity_type during create leading to one less query in enterprise on action_feedback
|
||||
category = activity.activity_type_id.category
|
||||
_category = activity.activity_type_id.category
|
||||
|
||||
with self.assertQueryCount(__system__=17, emp=21):
|
||||
with self.assertQueryCount(__system__=18, emp=22): # tm 17/21
|
||||
activity.action_feedback(feedback='Zizisse Done !')
|
||||
|
||||
@users('__system__', 'emp')
|
||||
@@ -259,18 +259,18 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
activity = record.action_start('Test Start')
|
||||
#read activity_type to normalize cache between enterprise and community
|
||||
#voip module read activity_type during create leading to one less query in enterprise on action_close
|
||||
category = activity.activity_type_id.category
|
||||
_category = activity.activity_type_id.category
|
||||
|
||||
record.write({'name': 'Dupe write'})
|
||||
|
||||
with self.assertQueryCount(__system__=18, emp=21):
|
||||
with self.assertQueryCount(__system__=19, emp=22): # tm 18/21
|
||||
record.action_close('Dupe feedback')
|
||||
|
||||
self.assertEqual(record.activity_ids, self.env['mail.activity'])
|
||||
|
||||
@users('__system__', 'emp')
|
||||
@warmup
|
||||
@mute_logger('flectra.tests', 'flectra.addons.mail.models.mail_mail')
|
||||
@mute_logger('flectra.models.unlink', 'flectra.tests', 'flectra.addons.mail.models.mail_mail')
|
||||
def test_mail_composer(self):
|
||||
self._create_test_records()
|
||||
test_record = self.env['mail.test.ticket'].browse(self.test_record_full.id)
|
||||
@@ -285,7 +285,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
'partner_ids': [(4, customer_id)],
|
||||
})
|
||||
|
||||
with self.assertQueryCount(__system__=32, emp=39):
|
||||
with self.assertQueryCount(__system__=34, emp=41): # tm 33/40
|
||||
composer.send_mail()
|
||||
|
||||
@users('__system__', 'emp')
|
||||
@@ -306,7 +306,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
'partner_ids': [(4, customer_id)],
|
||||
})
|
||||
|
||||
with self.assertQueryCount(__system__=25, emp=32):
|
||||
with self.assertQueryCount(__system__=27, emp=34): # tm 26/33
|
||||
composer.send_mail()
|
||||
|
||||
@users('__system__', 'emp')
|
||||
@@ -316,8 +316,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
self._create_test_records()
|
||||
test_record = self.env['mail.test.ticket'].browse(self.test_record_full.id)
|
||||
test_template = self.env['mail.template'].browse(self.test_template_full.id)
|
||||
# TODO FIXME non deterministic, last check 25 Mar 2020. Runbot at most +7 compared to local.
|
||||
with self.assertQueryCount(__system__=12, emp=14):
|
||||
with self.assertQueryCount(__system__=34, emp=36): # tm 14/16
|
||||
composer = self.env['mail.compose.message'].with_context({
|
||||
'default_composition_mode': 'comment',
|
||||
'default_model': test_record._name,
|
||||
@@ -326,7 +325,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
}).create({})
|
||||
composer.onchange_template_id_wrapper()
|
||||
|
||||
with self.assertQueryCount(__system__=33, emp=40):
|
||||
with self.assertQueryCount(__system__=34, emp=41): # tm 33/40
|
||||
composer.send_mail()
|
||||
|
||||
# remove created partner to ensure tests are the same each run
|
||||
@@ -338,7 +337,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
def test_message_assignation_email(self):
|
||||
self.user_test.write({'notification_type': 'email'})
|
||||
record = self.env['mail.test.track'].create({'name': 'Test'})
|
||||
with self.assertQueryCount(__system__=37, emp=38):
|
||||
with self.assertQueryCount(__system__=39, emp=40): # tm 37/38
|
||||
record.write({
|
||||
'user_id': self.user_test.id,
|
||||
})
|
||||
@@ -347,7 +346,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
@warmup
|
||||
def test_message_assignation_inbox(self):
|
||||
record = self.env['mail.test.track'].create({'name': 'Test'})
|
||||
with self.assertQueryCount(__system__=18, emp=21):
|
||||
with self.assertQueryCount(__system__=20, emp=23): # tm 19/22
|
||||
record.write({
|
||||
'user_id': self.user_test.id,
|
||||
})
|
||||
@@ -391,7 +390,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
def test_message_post_one_email_notification(self):
|
||||
record = self.env['mail.test.simple'].create({'name': 'Test'})
|
||||
|
||||
with self.assertQueryCount(__system__=28, emp=31):
|
||||
with self.assertQueryCount(__system__=29, emp=32): # tm 28/31
|
||||
record.message_post(
|
||||
body='<p>Test Post Performances with an email ping</p>',
|
||||
partner_ids=self.customer.ids,
|
||||
@@ -403,7 +402,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
def test_message_post_one_inbox_notification(self):
|
||||
record = self.env['mail.test.simple'].create({'name': 'Test'})
|
||||
|
||||
with self.assertQueryCount(__system__=13, emp=18):
|
||||
with self.assertQueryCount(__system__=14, emp=19):
|
||||
record.message_post(
|
||||
body='<p>Test Post Performances with an inbox ping</p>',
|
||||
partner_ids=self.user_test.partner_id.ids,
|
||||
@@ -481,7 +480,7 @@ class TestMailAPIPerformance(BaseMailPerformance):
|
||||
)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMailComplexPerformance(BaseMailPerformance):
|
||||
|
||||
def setUp(self):
|
||||
@@ -555,7 +554,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
self.container.message_subscribe(self.user_portal.partner_id.ids)
|
||||
record = self.container.with_user(self.env.user)
|
||||
|
||||
with self.assertQueryCount(__system__=63, emp=64):
|
||||
with self.assertQueryCount(__system__=64, emp=65): # tm 63/64
|
||||
record.message_post(
|
||||
body='<p>Test Post Performances</p>',
|
||||
message_type='comment',
|
||||
@@ -572,7 +571,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
record = self.container.with_user(self.env.user)
|
||||
template_id = self.env.ref('test_mail.mail_test_container_tpl').id
|
||||
|
||||
with self.assertQueryCount(__system__=73, emp=75):
|
||||
with self.assertQueryCount(__system__=78, emp=80): # tm 73/75
|
||||
record.message_post_with_template(template_id, message_type='comment', composition_mode='comment')
|
||||
|
||||
self.assertEqual(record.message_ids[0].body, '<p>Adding stuff on %s</p>' % record.name)
|
||||
@@ -643,7 +642,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
})
|
||||
rec1 = rec.with_context(active_test=False) # to see inactive records
|
||||
self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id)
|
||||
with self.assertQueryCount(__system__=37, emp=38):
|
||||
with self.assertQueryCount(__system__=39, emp=40): # tm 37/38
|
||||
rec.write({'user_id': self.user_portal.id})
|
||||
self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id)
|
||||
# write tracking message
|
||||
@@ -663,7 +662,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
customer_id = self.customer.id
|
||||
user_id = self.user_portal.id
|
||||
|
||||
with self.assertQueryCount(__system__=108, emp=109):
|
||||
with self.assertQueryCount(__system__=112, emp=113): # tm 109/110
|
||||
rec = self.env['mail.test.ticket'].create({
|
||||
'name': 'Test',
|
||||
'container_id': container_id,
|
||||
@@ -692,7 +691,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
rec1 = rec.with_context(active_test=False) # to see inactive records
|
||||
self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id)
|
||||
self.assertEqual(len(rec1.message_ids), 1)
|
||||
with self.assertQueryCount(__system__=77, emp=77):
|
||||
with self.assertQueryCount(__system__=79, emp=79): # tm 78/78
|
||||
rec.write({
|
||||
'name': 'Test2',
|
||||
'container_id': self.container.id,
|
||||
@@ -729,7 +728,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
rec1 = rec.with_context(active_test=False) # to see inactive records
|
||||
self.assertEqual(rec1.message_partner_ids, self.user_portal.partner_id | self.env.user.partner_id)
|
||||
|
||||
with self.assertQueryCount(__system__=85, emp=85):
|
||||
with self.assertQueryCount(__system__=86, emp=86): # tm 85/85
|
||||
rec.write({
|
||||
'name': 'Test2',
|
||||
'container_id': container_id,
|
||||
@@ -762,7 +761,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
rec1 = rec.with_context(active_test=False) # to see inactive records
|
||||
self.assertEqual(rec1.message_partner_ids, self.partners | self.env.user.partner_id | self.user_portal.partner_id)
|
||||
|
||||
with self.assertQueryCount(__system__=29, emp=30):
|
||||
with self.assertQueryCount(__system__=31, emp=32): # tm 29/30
|
||||
rec.write({
|
||||
'name': 'Test2',
|
||||
'customer_id': customer_id,
|
||||
@@ -878,7 +877,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
]
|
||||
}])
|
||||
|
||||
with self.assertQueryCount(emp=5):
|
||||
with self.assertQueryCount(emp=6):
|
||||
res = messages.message_format()
|
||||
self.assertEqual(len(res), 2)
|
||||
for message in res:
|
||||
@@ -887,7 +886,7 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
messages.flush()
|
||||
messages.invalidate_cache()
|
||||
|
||||
with self.assertQueryCount(emp=17):
|
||||
with self.assertQueryCount(emp=18):
|
||||
res = messages.message_format()
|
||||
self.assertEqual(len(res), 2)
|
||||
for message in res:
|
||||
@@ -908,19 +907,19 @@ class TestMailComplexPerformance(BaseMailPerformance):
|
||||
'res_id': record.id
|
||||
} for record in records])
|
||||
|
||||
with self.assertQueryCount(emp=4):
|
||||
with self.assertQueryCount(emp=5):
|
||||
res = messages.message_format()
|
||||
self.assertEqual(len(res), 6)
|
||||
|
||||
messages.flush()
|
||||
messages.invalidate_cache()
|
||||
|
||||
with self.assertQueryCount(emp=14):
|
||||
with self.assertQueryCount(emp=15):
|
||||
res = messages.message_format()
|
||||
self.assertEqual(len(res), 6)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMailHeavyPerformancePost(BaseMailPerformance):
|
||||
|
||||
def setUp(self):
|
||||
@@ -1040,7 +1039,7 @@ class TestMailHeavyPerformancePost(BaseMailPerformance):
|
||||
]
|
||||
self.attachements = self.env['ir.attachment'].with_user(self.env.user).create(self.vals)
|
||||
attachement_ids = self.attachements.ids
|
||||
with self.assertQueryCount(emp=79):
|
||||
with self.assertQueryCount(emp=87): # tm 80 / com 85
|
||||
self.cr.sql_log = self.warm and self.cr.sql_log_count
|
||||
record.with_context({}).message_post(
|
||||
body='<p>Test body <img src="cid:cid1"> <img src="cid:cid2"></p>',
|
||||
|
||||
@@ -8,7 +8,7 @@ from flectra.tests import tagged
|
||||
from flectra.tools import mute_logger
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestSMSPerformance(BaseMailPerformance, sms_common.SMSCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -91,7 +91,7 @@ class TestSMSPerformance(BaseMailPerformance, sms_common.SMSCase):
|
||||
self.assertSMSNotification([{'partner': self.customer}], 'Performance Test', messages, sent_unlink=True)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestSMSMassPerformance(BaseMailPerformance, sms_common.MockSMS):
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -7,6 +7,7 @@ from flectra.tests import tagged
|
||||
from flectra.tools import mute_logger
|
||||
|
||||
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMassMailPerformanceBase(TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -36,7 +37,7 @@ class TestMassMailPerformanceBase(TransactionCase):
|
||||
self.patch(self.env.registry, 'ready', True)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMassMailPerformance(TestMassMailPerformanceBase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -60,15 +61,15 @@ class TestMassMailPerformance(TestMassMailPerformanceBase):
|
||||
'mailing_domain': [('id', 'in', self.mm_recs.ids)],
|
||||
})
|
||||
|
||||
# runbot needs +51 compared to local
|
||||
with self.assertQueryCount(__system__=1718, marketing=1720): # test_mass_mailing_only: 1665 - 1666
|
||||
# runbot needs +52 compared to local
|
||||
with self.assertQueryCount(__system__=1718, marketing=1720): # tmm 1666 / 1668
|
||||
mailing.action_send_mail()
|
||||
|
||||
self.assertEqual(mailing.sent, 50)
|
||||
self.assertEqual(mailing.delivered, 50)
|
||||
|
||||
|
||||
@tagged('mail_performance')
|
||||
@tagged('mail_performance', 'post_install', '-at_install')
|
||||
class TestMassMailBlPerformance(TestMassMailPerformanceBase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -100,8 +101,8 @@ class TestMassMailBlPerformance(TestMassMailPerformanceBase):
|
||||
'mailing_domain': [('id', 'in', self.mm_recs.ids)],
|
||||
})
|
||||
|
||||
# runbot needs +63 compared to local
|
||||
with self.assertQueryCount(__system__=1995, marketing=1997): # test_mass_mailing only: 1931 - 1932
|
||||
# runbot needs +64 compared to local (sometimes +1 for system)
|
||||
with self.assertQueryCount(__system__=1997, marketing=1998): # tmm 1932 / 1934- com+ent 1996/1998
|
||||
mailing.action_send_mail()
|
||||
|
||||
self.assertEqual(mailing.sent, 50)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-lg-3 o_light_label" string="API secret" for="twitter_api_secret"/>
|
||||
<field name="twitter_api_secret" class="oe_inline"/>
|
||||
<field name="twitter_api_secret" password="True" class="oe_inline"/>
|
||||
</div>
|
||||
<a data-toggle="collapse" href="#" data-target="#twitter_tutorial" aria-label="Twitter tutorial">
|
||||
<i class="fa fa-arrow-right"/>
|
||||
|
||||
Reference in New Issue
Block a user