When you mark an crm.lead as "won" using the "mark as won" button, the user will be shown a rainbowman under certain conditions. This happens notably when you win your first lead. This commit fixes the 'ir.actions.act_window_close' model to allow the 'effect' key within its readable fields (even if it's not a real field) which is in turn picked up by the web client to display the infamous rainbowman. At the same time, we add the tour that is testing the rainbowman of the crm app in the test suite, since it was missing and never actually executed by the CI. Some fixes were also necessary to make the test run properly. Task ID-2394745 closes odoo/odoo#63259 X-original-commit: 47079f67f586adf45da15fc98dbc81571f7a9100 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
25 lines
844 B
Python
25 lines
844 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import odoo.tests
|
|
|
|
|
|
@odoo.tests.tagged('post_install','-at_install')
|
|
class TestUi(odoo.tests.HttpCase):
|
|
|
|
def test_01_crm_tour(self):
|
|
self.start_tour("/web", 'crm_tour', login="admin")
|
|
|
|
def test_02_crm_tour_rainbowman(self):
|
|
# we create a new user to make sure he gets the 'Congrats on your first deal!'
|
|
# rainbowman message.
|
|
self.env['res.users'].create({
|
|
'name': 'Temporary CRM User',
|
|
'login': 'temp_crm_user',
|
|
'password': 'temp_crm_user',
|
|
'groups_id': [(6, 0, [
|
|
self.ref('base.group_user'),
|
|
self.ref('sales_team.group_sale_salesman')
|
|
])]
|
|
})
|
|
self.start_tour("/web", 'crm_rainbowman', login="temp_crm_user")
|