Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
76cee517
Commit
76cee517
authored
10 years ago
by
Jérome Maes
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] im_chat, im_livechat : fix loading covnersation history and is_in_session function
parent
911db9df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/im_chat/im_chat.py
+3
-2
3 additions, 2 deletions
addons/im_chat/im_chat.py
addons/im_livechat/im_livechat.py
+1
-0
1 addition, 0 deletions
addons/im_livechat/im_livechat.py
with
4 additions
and
2 deletions
addons/im_chat/im_chat.py
+
3
−
2
View file @
76cee517
...
...
@@ -57,6 +57,7 @@ class im_chat_session(osv.Model):
sids
=
self
.
search
(
cr
,
uid
,
[(
'
uuid
'
,
'
=
'
,
uuid
)],
context
=
context
,
limit
=
1
)
for
session
in
self
.
browse
(
cr
,
uid
,
sids
,
context
=
context
):
return
user_id
and
user_id
in
[
u
.
id
for
u
in
session
.
user_ids
]
return
False
def
users_infos
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
"""
get the user infos for all the user in the session
"""
...
...
@@ -419,7 +420,7 @@ class Controller(openerp.addons.bus.bus.Controller):
@openerp.http.route
([
'
/im_chat/history
'
],
type
=
"
json
"
,
auth
=
"
none
"
)
def
history
(
self
,
uuid
,
last_id
=
False
,
limit
=
20
):
registry
,
cr
,
uid
,
context
=
request
.
registry
,
request
.
cr
,
request
.
session
.
uid
,
request
.
context
return
registry
[
"
im_chat.message
"
].
get_messages
(
cr
,
openerp
.
SUPERUSER_ID
,
uuid
,
last_id
,
limit
,
context
=
context
)
registry
,
cr
,
uid
,
context
=
request
.
registry
,
request
.
cr
,
request
.
session
.
uid
or
openerp
.
SUPERUSER_ID
,
request
.
context
return
registry
[
"
im_chat.message
"
].
get_messages
(
cr
,
uid
,
uuid
,
last_id
,
limit
,
context
=
context
)
# vim:et:
This diff is collapsed.
Click to expand it.
addons/im_livechat/im_livechat.py
+
1
−
0
View file @
76cee517
...
...
@@ -202,6 +202,7 @@ class im_chat_session(osv.Model):
return
True
else
:
return
super
(
im_chat_session
,
self
).
is_in_session
(
cr
,
uid
,
uuid
,
user_id
,
context
=
context
)
return
False
def
users_infos
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
"""
add the anonymous user in the user of the session
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment