Commit Graph

653 Commits

Author SHA1 Message Date
Christophe Simonis aa133b4d29 [MERGE] forward port of branch saas-1 up to revid 8745 chs@openerp.com-20130613181503-82234mo34wxb0oap
bzr revid: chs@openerp.com-20130614091924-z5ta02kwhmwcrgox
2013-06-14 11:19:24 +02:00
Christophe Simonis 6a9adbca62 [MERGE] forward port of branch 7.0 up to revid 9236 mat@openerp.com-20130613160953-itt79mu5xrl7suv4
bzr revid: chs@openerp.com-20130613181503-82234mo34wxb0oap
2013-06-13 20:15:03 +02:00
Thibault Delavallée 41311b9f33 [FIX] mail: fixed id of record in a loop (record.id, not all ids).
bzr revid: tde@openerp.com-20130613095228-b4r8kca7hkjd6ppa
2013-06-13 11:52:28 +02:00
Thibault Delavallée 2652bd586d [FIX] mail: message_subscribe_users: refactoring of the algorithm to achieve better computation time.
Previous implementation did a search on mail.followers with subtype_ids=False, leading
to a very bad computation time. This search is now avoided.

bzr revid: tde@openerp.com-20130613082029-lmd63s3mqwxasy4j
2013-06-13 10:20:29 +02:00
Thibault Delavallée 43d08b898f [MERGE] [IMP] 'Social Aspects' Task
Purpose:
- mail is now focused on messaging; partner document is now a classic document, without specific behavior; removed the concept of 'my followers' from mail;
- hr adds social features to mail: employee profile is used to display internal messages; employees can follow other employees, comment and react on their profile messages;
- display suggestion of Groups and Employees to follow in the Inbox, using a new widget. The purpose is to promote social interactions between employees and to improve the visibility of groups;

mail:
- add suggestions.Group widget that allows to display a list of suggested groups to follow; this widget is displayed in the Inbox;
- display 'Partner profile of' or 'News from' when reading messages from a partner profile / employee profile in the Inbox;
- 'Compose a new message or Write to my followers' is not present anymore when hr is not installed, because this social aspect comes with HR;
- mail_thread: add a search function on message_is_follower;
- mail_group: implement suggested groups behavior;
- res_partner: removed specific code changing message_post with type='email' to a private discussion between author and destination partner; partner document behaves like a classic document;
- res_users: add 'display_groups_suggestions' field that controls the display of suggested groups to follow;
- res_users: writing on a res.users object is considered as a private discussion; when Hr is not installed, only aliases should be able to post on a user;

hr_employee:
- when creating an employee, post a message on its profile and push it to every employees of the same company;
- add follow/unfollow and message and follower count on employee kanban view;
- implement suggested employee behavior;
- HR improves the basic Inbox by adding the 'Compose a new message or Write to my followers';
- allow to post on an employee profile when having read access right if the user that posts is an employee;

HR:
- add suggestions.Employee widget that allows to display a list of suggested employees to follow; this widget is displayed in the Inbox;
- res_users: add 'display_employees_suggestions' field that controls the display of suggested employees to follow;
- res_users: do not welcome new users anymore, welcome new employees instead
- res_users: incoming emails are still considered as private messages (using aliases); however messages posted on user profile are redirected to the related employee profiles (used for 'Write to my followers')

bzr revid: tde@openerp.com-20130612121258-j38do5opsot2ur7c
2013-06-12 14:12:58 +02:00
Thibault Delavallée 99dd06cfd0 [FIX] [HACK] Delocate code about mail_thread inheritance from portal to mail_thread, because of the inheritance graph bug in trunk to sovle that makes this code not visible for hr.employee.
bzr revid: tde@openerp.com-20130612113630-ao1dxpv0ax5n4xje
2013-06-12 13:36:30 +02:00
Denis Ledoux 75ed151ad9 [FIX]mail: mail_thread, method message_capable_models was not returning all message capable models
bzr revid: dle@openerp.com-20130611133314-pq9bmj7af61k7swe
2013-06-11 15:33:14 +02:00
Thibault Delavallée dff9e6f8d8 [FIX] mail: fixed hasattr on hasattr.
bzr revid: tde@openerp.com-20130610154809-uro1vnbpe90ip1d4
2013-06-10 17:48:09 +02:00
Thibault Delavallée 5601fbd78c [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130606135313-u3mbe1a8yeussnck
2013-06-06 15:53:13 +02:00
Thibault Delavallée a216e70e85 [FIX] [IMP] mail: allow to use message_post on models not having message_post method defined.
mail.compose.message wizard and messaage_process now check that the active model
has message_post defined. Otherwise using thread_model context key that is better
managed in message_post, it is possible to use mail_thread.message_post() with a
thread_model and thread_id that should not allow message_post otherwise.

Hint: look for backport into 7.0

bzr revid: tde@openerp.com-20130606123230-d7ql14yydzfrlc7h
2013-06-06 14:32:30 +02:00
Martin Trigaux ccb38117ee [MERGE] Forward porting of saas-1 until rev 8739
bzr revid: mat@openerp.com-20130605090453-e4mg37kms5j1r18n
2013-06-05 11:04:53 +02:00
Thibault Delavallée 25544c2289 [FIX] mail_alias: aliases proposed in empty list fixed.
Check only aliases that effectively create new records (not aliases used for updating).
When having several possible aliases, do not display any alias, because we do not have
any information about the correct alias to display.

bzr revid: tde@openerp.com-20130530124128-w7lz1jsrspyu38dv
2013-05-30 14:41:28 +02:00
Martin Trigaux d626d3cb61 [MERGE] backport saas-1 rev 8728
[FIX] mail, project, project_issue, crm_lead: fixed 'XX Created' subtype not triggered because of condition
based on state=new and not state=draft.
For tasks, issues and leads, no generic 'Document created' message is posted anymore
because of the 'XX Created' message with subtype automatically logged.
Generic creation message is logged before automatic subscription to enable
message pushing to responsibles.

bzr revid: mat@openerp.com-20130529143022-wy76srwb2nwkspe3
2013-05-29 16:30:22 +02:00
Thibault Delavallée d4dbd3524c [FIX] mail, project, project_issue, crm_lead: fixed 'XX Created' subtype not triggered because of condition
based on state=new and not state=draft.
For tasks, issues and leads, no generic 'Document created' message is posted anymore
because of the 'XX Created' message with subtype automatically logged.
Generic creation message is logged before automatic subscription to enable
message pushing to responsibles.

bzr revid: tde@openerp.com-20130529131458-9709ffrsy479hwy3
2013-05-29 15:14:58 +02:00
Thibault Delavallée cdffc4db54 [FIX] project_issue: fixed write of date_action_last: it is possible to post a message without having access to write access rights on an issue, therefore using SUPERUSER_ID (e.g. portal user).
[FIX] mail_message, mail, project, task, issue: it is now possible to have model-specific access rule checking for mail.message related acces right / rules. Task and issue allow to create mail.message when the user has a read access on the related document, not only when having write access.

bzr revid: tde@openerp.com-20130528144447-3ivcom6r9x7q949b
2013-05-28 16:44:47 +02:00
Thibault Delavallée cd278d83ab [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130522103305-yi5ql1chdx9qxxlx
bzr revid: tde@openerp.com-20130522114236-qi2s3i2dl2lemdvh
2013-05-22 13:42:36 +02:00
Thibault Delavallée a05b0bebbe [FORWARD] Forward port of 7.0 branch until revision 9143.
bzr revid: tde@openerp.com-20130521122359-b5vii7gv8arluz06
2013-05-21 14:23:59 +02:00
Martin Trigaux 0c5bd1acd6 [IMP] mail: clean code
bzr revid: mat@openerp.com-20130508133224-y0mtl3421yfoka2p
2013-05-08 15:32:24 +02:00
Thibault Delavallée ea0316e3f1 [FIX] [FIX] mail: fixed subscription of an already subscribed follower erasing already existing subtypes + added tests
bzr revid: tde@openerp.com-20130508102304-p52bq0qux9s7rses
2013-05-08 12:23:04 +02:00
Martin Trigaux 1fdf64b309 [IMP] search on field message_is_follower
bzr revid: mat@openerp.com-20130502123945-z3sg64sotgd5q98n
2013-05-02 14:39:45 +02:00
Olivier Dony 9c08e12962 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9085
revision-id: odo@openerp.com-20130429105458-r89mnkx8okdxsdld

bzr revid: odo@openerp.com-20130429151410-54y94063gijyk16o
2013-04-29 17:14:10 +02:00
Thibault Delavallée c08b877370 [FIX] mail: fixed redirection action that was not redirecting to the discussion when failing to open the document.
bzr revid: tde@openerp.com-20130429093329-w0qxiiipx1mkz6qt
2013-04-29 11:33:29 +02:00
Thibault Delavallée 0691000b61 [IMP] account_invoice: now have its _get_formview_action method. _get_formview_action is the renaming of _get_document_action, by the way.
bzr revid: tde@openerp.com-20130426144019-w4tq4of7rdkyqbah
2013-04-26 16:40:19 +02:00
Thibault Delavallée b61c12d28e [MERGE] Revisions 9000 ... 9002 of 7.0 branch
bzr revid: tde@openerp.com-20130426132847-mr8e0yuxao582bs6
2013-04-26 15:28:47 +02:00
Thibault Delavallée 0dada27fcd [MERGE] Revisions 8997 ... 8999 of 7.0 branch.
bzr revid: tde@openerp.com-20130426132721-02lkoc41fms9ve1k
2013-04-26 15:27:21 +02:00
Martin Trigaux 67bffc62c4 [IMP] clean code
bzr revid: mat@openerp.com-20130417151721-fmwd143gazkldvu3
2013-04-17 17:17:21 +02:00
Thibault Delavallée a75cc23573 [REF] mail: refactored system to generate links in signatures. A new server action is used that choose to redirect to the document or to the Inbox (Portal or Classic Inbox, depending on the user).
bzr revid: tde@openerp.com-20130417122225-faf0bb5vyhbcx7ys
2013-04-17 14:22:25 +02:00
Martin Trigaux cadddbdf81 [IMP] overwrite get_suggested_thread for anonymous
bzr revid: mat@openerp.com-20130417104504-k0us58cta22goblj
2013-04-17 12:45:04 +02:00
Martin Trigaux 56a5a3280f [MERGE] Latest trunk
bzr revid: mat@openerp.com-20130417072750-dp6pjn14vy6hitsp
2013-04-17 09:27:50 +02:00
Thibault Delavallée c2f02f6798 [FIX] mail, crm: fixed some access rights issues when using chatter on a document without access rights with portal users.
bzr revid: tde@openerp.com-20130417085927-wg07siehk2uhrkpu
2013-04-17 10:59:27 +02:00
Thibault Delavallée 4da68cbc22 [FORWARD] Forward port of addons 7.0 until revision 9008
bzr revid: tde@openerp.com-20130411124446-73gzyw3eo925w3dv
2013-04-11 14:44:46 +02:00
Thibault Delavallée f8a2299525 [MERGE] [FIX] mail, email_template: fix attachment duplication and clean attachment management
The way attachments are linked to the document has been cleaned. Posting method message_post may receives 2 arguments:
- attachment_ids: those linked to the wizard model (mail.compose.message) are linked to the document (res_model, res_id)
- attachments: the tuples are used to create new attachments linked to the document
The wizard does not set the res_model and res_id of attachments anymore, delegating this job to message_post.

The mail.message and mail.compose.message now use their respective attachment_ids field when possible. This is done instead of reading/creating new attachments based on the attachments tuple each time a mail.compose.message is processed. Email templates now also use attachment_ids, in particular when generating emails, instead of using the attachments tuple. Only reports are still generated on the fly and put into attachments instead of attachment_ids.

A cron job has been added to unlink 'lost' attachments. Those are attachments:
- linked to 'mail.compose.message'
- with res_id=0 (due Chatter used in minimal mode or reports generated by templates before the wizard has an ID)
- with no activity for more than one day (create_date and write_date)

bzr revid: tde@openerp.com-20130411112033-mqph9vjlcjkoolfs
2013-04-11 13:20:33 +02:00
Thibault Delavallée 8c7cf300eb [MERGE] [FIX] mail: bettersuggested recipients based on email address. It tries to find a partner that is in the related document followers, or a user, or the first partner with matching email.
bzr revid: tde@openerp.com-20130411104151-wi5ru54b362pv957
2013-04-11 12:41:51 +02:00
Thibault Delavallée fe2ea997a2 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20130411103645-rmr3sa8p9ropx2gc
2013-04-11 12:36:45 +02:00
Thibault Delavallée f994529725 [IMP] mail: finding partner based on email: improved code for suggested partners, added somme comments and tests.
bzr revid: tde@openerp.com-20130411101720-mumz152dsxvv1xbj
2013-04-11 12:17:20 +02:00
Raphael Collet 894eeef8e0 [MERGE] from trunk
bzr revid: rco@openerp.com-20130411073708-gaxl2332umtedmg6
2013-04-11 09:37:08 +02:00
Thibault Delavallée 8b97805621 [FIX] mail: fixed some translation issues.
Document created text was not translatable
Subtype was fetched without context, therefore not translated
Removed odd override of _t introduced in mail_followers at revision 7885

bzr revid: tde@openerp.com-20130408092447-3ri41v6xluuj0wha
2013-04-08 11:24:47 +02:00
Martin Trigaux b9352e9eea [MERGE] Latest trunk
bzr revid: mat@openerp.com-20130405141758-2a0nzmg8cbwe7145
2013-04-05 16:17:58 +02:00
Martin Trigaux c593c0cfe8 [FIX] do not show suggestions for anonymous
bzr revid: mat@openerp.com-20130405141618-zosargns9o355v7y
2013-04-05 16:16:18 +02:00
Thibault Delavallée c41cc328bb [IMP] mail_thread: in empty list help, do not display alias info when alias domain is not configured.
bzr revid: tde@openerp.com-20130405115830-wv64k3z20t8m1odx
2013-04-05 13:58:30 +02:00
Thibault Delavallée d50b159f81 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20130405111048-kqxll4mdwnsq2r8o
2013-04-05 13:10:48 +02:00
Thibault Delavallée 1804c558e7 [IMP] mail: empty list help: take first created alias by default, because this should be the configuration data like 'sales'.
bzr revid: tde@openerp.com-20130405110702-51yt8on1t3c2v54o
2013-04-05 13:07:02 +02:00
Martin Trigaux 87e3fe92bd [FIX] remove strange unicode char
bzr revid: mat@openerp.com-20130405074322-fiy3merl5kfuvlc2
2013-04-05 09:43:22 +02:00
Quentin (OpenERP) 3bb51ac696 [MERGE] forward port of bugfixes made in 7.0, up to revision 8969.
bzr revid: qdp-launchpad@openerp.com-20130404095257-oek77sijuxjyi0aj
2013-04-04 11:52:57 +02:00
Martin Trigaux ee1c4c18c9 [IMP] sort on id
bzr revid: mat@openerp.com-20130404082028-0klv136soo0oba73
2013-04-04 10:20:28 +02:00
Martin Trigaux 8d8eb553ce [ADD] suggestions for employees to follow
bzr revid: mat@openerp.com-20130403142716-lmsz9hwkg7tathly
2013-04-03 16:27:16 +02:00
Christophe Matthieu 8c67d4150b [PROGRESS]
bzr revid: chm@openerp.com-20130403142206-i4oirpl41usx4qg0
2013-04-03 16:22:06 +02:00
Martin Trigaux 851e6c1f5a [REF] cleaning js code
bzr revid: mat@openerp.com-20130403122408-fbbybeczf6xqwjvc
2013-04-03 14:24:08 +02:00
Thibault Delavallée 37bec9643d [FIX] mail: fixed recipients of private discussion, that were not correct. Author could be notified of their own reply independently of the specified recipients. Added tests for private discussions.
bzr revid: tde@openerp.com-20130403121307-4rixx7ct6y86spoz
2013-04-03 14:13:07 +02:00
Thibault Delavallée a173caa0f4 [FIX] Fixed wrong parameter name given to astimezone introduced at revision 8954; correct parameter name is tz, not tzinfo.
bzr revid: tde@openerp.com-20130403120926-xfxtj5hsva6jzb1u
2013-04-03 14:09:26 +02:00