-
- Downloads
[FIX] base,hr,mail: prefetch mention suggestions
The purpose of this commit is to improve the overall performance of the mention mechanism of the client action and chatter composer, by pre-fetching some data. First, the employees are fetched at chat initialization (basically, at web client initialization), if hr is installed. Second, when focusing on the composer of a channel, the members of this channel are fetched. In the case of a chatter, the members are already known as they are the followers of the document. When the user types a mention, we first display suggestions from the pre-fetched partners, and we only perform an RPC when there are no more result matching the search string. This RPC searches among user, and then partners if there aren't enough matches. A few side changes occurred: - auto_join set to True on user_ids field of res.partner to boost the query that searches partners that are users - the '/mail/read_followers' route now returns follower's email as well, as we need it for the mention; - a partner can now be mentionned several times in the same message; - mentionned partner previsualization has been removed, mainly because of the previous point, but also because it simplifies the code;
Showing
- addons/hr/__init__.py 1 addition, 0 deletionsaddons/hr/__init__.py
- addons/hr/res_partner.py 22 additions, 0 deletionsaddons/hr/res_partner.py
- addons/mail/controllers/main.py 3 additions, 1 deletionaddons/mail/controllers/main.py
- addons/mail/models/mail_channel.py 11 additions, 0 deletionsaddons/mail/models/mail_channel.py
- addons/mail/models/res_partner.py 20 additions, 42 deletionsaddons/mail/models/res_partner.py
- addons/mail/static/src/js/chat_manager.js 23 additions, 0 deletionsaddons/mail/static/src/js/chat_manager.js
- addons/mail/static/src/js/chatter.js 35 additions, 4 deletionsaddons/mail/static/src/js/chatter.js
- addons/mail/static/src/js/client_action.js 6 additions, 5 deletionsaddons/mail/static/src/js/client_action.js
- addons/mail/static/src/js/composer.js 72 additions, 52 deletionsaddons/mail/static/src/js/composer.js
- addons/mail/static/src/less/client_action.less 0 additions, 10 deletionsaddons/mail/static/src/less/client_action.less
- addons/mail/static/src/less/composer.less 2 additions, 2 deletionsaddons/mail/static/src/less/composer.less
- addons/mail/static/src/xml/chatter.xml 1 addition, 1 deletionaddons/mail/static/src/xml/chatter.xml
- addons/mail/static/src/xml/composer.xml 5 additions, 28 deletionsaddons/mail/static/src/xml/composer.xml
- openerp/addons/base/res/res_partner.py 1 addition, 1 deletionopenerp/addons/base/res/res_partner.py
Loading
Please register or sign in to comment