forked from odoo/odoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] Forward-port 8.0 up to rev. 26d0fe6
- Loading branch information
Showing
28 changed files
with
310 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import test_new_lead_notification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from openerp.tests.common import TransactionCase | ||
|
||
|
||
class NewLeadNotificationTest(TransactionCase): | ||
def test_new_lead_notification(self): | ||
# Create a new user | ||
user = self.env["res.users"].create({ | ||
"name": __file__, | ||
"login": __file__, | ||
}) | ||
|
||
# Subscribe him to sales department | ||
team = self.env.ref("sales_team.team_sales_department") | ||
subtype = self.env.ref("crm.mt_salesteam_lead") | ||
team.sudo(user).message_subscribe_users(subtype_ids=[subtype.id]) | ||
|
||
# Imitate what happens in the controller when somebody creates a new | ||
# lead from the website form | ||
lead = (self.env["crm.lead"] | ||
.with_context(mail_create_nosubscribe=True) | ||
.sudo() | ||
.create({"contact_name": "Somebody", | ||
"description": "Some question", | ||
"email_from": "[email protected]", | ||
"name": "Some subject", | ||
"partner_name": "Some company", | ||
"team_id": team.id, | ||
"phone": "+0000000000"})) | ||
|
||
# The user should have a new unread message | ||
self.assertTrue(lead.sudo(user).message_unread) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Spain, 2015-05-07 | ||
|
||
Grupo ESOC agrees to the terms of the Odoo Corporate Contributor License | ||
Agreement v1.0. | ||
|
||
I declare that I am authorized and able to make this agreement and sign this | ||
declaration. | ||
|
||
Signed, | ||
|
||
Nuria Pastor <[email protected]> https://github.com/grupoesoc/ | ||
|
||
List of contributors: | ||
|
||
Jairo Llopis <[email protected]> https://github.com/Yajo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Spain, september 24th 2015 | ||
|
||
I hereby agree to the terms of the Odoo Individual Contributor License | ||
Agreement v1.0. | ||
|
||
I declare that I am authorized and able to make this agreement and sign this | ||
declaration. | ||
|
||
Signed, | ||
|
||
Jairo Llopis [email protected] https://github.com/Yajo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Belgium, 2015-09-09 | ||
|
||
I hereby agree to the terms of the Odoo Individual Contributor License | ||
Agreement v1.0. | ||
|
||
I declare that I am authorized and able to make this agreement and sign this | ||
declaration. | ||
|
||
Signed, | ||
|
||
Cédric Krier [email protected] https://github.com/cedk |
Oops, something went wrong.