Commit Graph

934 Commits

Author SHA1 Message Date
Olivier Dony 4ed8413dc7 [FIX] mail.thread: avoid wrongly matching model,id from a foreign OpenERP system
When emails transit from an OpenERP system to another
there is a chance of wrongly considering the foreign
model,id pair as local, possibly attaching a reply
to a wrong parent message.
This naive heuristic ignore the foreign identifiers
unless the hostname of the message-id mentioned in
the In-Reply-To header matches the local one.
This may fail after a change of local hostname but
is still better than the alternative.
In OpenERP v8 we should stop including the model,res_id
in outgoing Message-Id headers and only rely on the
stored, opaque, unique Message-Ids, preventing
any future mismatch.

bzr revid: odo@openerp.com-20140411101349-h3jmkdzvbr7lut26
2014-04-11 12:13:49 +02:00
Thibault Delavallée 73bebb6563 [IMP] mail: default recipients management
- mail.compose.message: in render_message_batch, compute defaults recipients
for the composer (method called for mass mailing only). This way values are
available for inheriting models.

bzr revid: tde@openerp.com-20140325135347-9v7u4uokffy7ud43
2014-03-25 14:53:47 +01:00
Thibault Delavallée 71b146d0ad [IMP] mail: mail_thread: added a method that try to find
some default recipients for a document. Basically it looks for a partner_id field,
or an email_from, or an email field, and return a dict result used for populating
a creation dictionary, for example.

bzr revid: tde@openerp.com-20140321171615-ksce5mqzyugya8hs
2014-03-21 18:16:15 +01:00
Christophe Simonis 99a3c45976 [MERGE] forward port of branch saas-3 up to revid 9328 chs@openerp.com-20140318120024-mcxmkncn1xktjs7v
bzr revid: chs@openerp.com-20140318132741-aur3q1k7t9iympri
2014-03-18 14:27:41 +01:00
Christophe Simonis b3bb47076b [MERGE] forward port of branch saas-2 up to revid 9151 chs@openerp.com-20140314104803-19c5snl2fcuih91o
bzr revid: chs@openerp.com-20140314105753-7a7wh9a1z99azgfj
2014-03-14 11:57:53 +01:00
Denis Ledoux 02459f8d4a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9929 revid:dle@openerp.com-20140325104921-x8zjx5p71l1o3uif
bzr revid: dle@openerp.com-20140310133913-465x5t3n1bo7fu98
bzr revid: dle@openerp.com-20140311164146-2s599kogbqj8e94l
bzr revid: dle@openerp.com-20140312111149-u6y036aej3ywq7et
bzr revid: dle@openerp.com-20140312121145-06s1jvct9v4m7l6s
bzr revid: mat@openerp.com-20140313084409-c0kckxemy3in0mlo
bzr revid: chs@openerp.com-20140313163420-ifa4hyixj722d6jo
bzr revid: chs@openerp.com-20140314102034-g0nzryvwhrpzdas9
bzr revid: chs@openerp.com-20140314104803-19c5snl2fcuih91o
bzr revid: odo@openerp.com-20140314143519-x6rzcfkkqxwc0e1g
bzr revid: chs@openerp.com-20140318110229-y8098w3shdpmoig2
bzr revid: dle@openerp.com-20140318151824-sscl4m8p87emjl8s
bzr revid: dle@openerp.com-20140320112618-yfyihlwz66ryeqf5
bzr revid: dle@openerp.com-20140320161003-j01cc6sqves2wnp2
bzr revid: dle@openerp.com-20140320181252-4gqcog22p1ex0pz7
bzr revid: dle@openerp.com-20140321140450-8ulnhr76qybiadks
bzr revid: dle@openerp.com-20140324104743-ubvu8st7emq9pg1q
bzr revid: dle@openerp.com-20140325112413-xs5z7y81rhyjt0rd
2014-03-25 12:24:13 +01:00
Olivier Dony 9e002d9233 [FIX] mail.thread: avoid error if `message_unread_count` has been popped 1 line earlier
bzr revid: odo@openerp.com-20140314104605-qi7eqj2g37dvxvc3
2014-03-14 11:46:05 +01:00
Christophe Simonis 44a99c0976 [FIX] calendar: correct recurrency end date computation
bzr revid: chs@openerp.com-20140314094809-0wuus62tob8vtyi0
2014-03-14 10:48:09 +01:00
Christophe Simonis d504764eff [MERGE] forward port of branch saas-3 up to revid 9298 chm@openerp.com-20140311130852-3ft0v1mc9ht1any6
bzr revid: chs@openerp.com-20140311145205-s56fj113fsrnisc3
2014-03-11 15:52:05 +01:00
Thibault Delavallée 307119bd55 [IMP] mail: message_last_update -> message_last_post + only update when having a subtype
bzr revid: tde@openerp.com-20140305094042-6f1cne3srq7y1ffn
2014-03-05 10:40:42 +01:00
Thibault Delavallée 72fac9527e [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140305085545-0uy3b0k71hkqe20j
2014-03-05 09:55:45 +01:00
Thibault Delavallée b54b8681a0 [MERGE] [ADD] crm_project_issue module: create issues from leads.
This bridge and optional module add a button on the lead form view to
allow users to create issues from leads. The lead is distroyed during
the operation. All communication history is kept and transferred to the
new issue.

bzr revid: tde@openerp.com-20140304170544-kp624l6vhj0s1rwc
2014-03-04 18:05:44 +01:00
Jérôme f664ff2ace [FIX] : tde's last remark correction
bzr revid: jem@openerp.com-20140226164521-gccablfi8b6e36qr
2014-02-26 17:45:21 +01:00
Thibault Delavallée d7c974aa5b [MERGE] [IMP] mail: subtype: order by application + allow to hide technical subtypes + updated addons subtypes
- mail.message.subtype:
-- added sequence field, used to order subtypes when displaying them
-- added hidden field, used to hide some subtypes. Subtypes like 'Task Created' or 'Issue Created' are not necessary on a task or issue, but useful on the project form view. Indeed by following the task created subtype on the project, the user is notified of new tasks. However on the task itself it makes no sense to be able to follow task created. This subtype has to exist due to the technical implementation, but should be hidden in the followers widget of the task.
- mail: updated followers widget accordingly, and display subtypes by application with a visual border to separate them

- project, crm, sale_crm: updated hidden and sequence of subtypes

bzr revid: tde@openerp.com-20140221122036-m30laylmb4tqndkh
2014-02-21 13:20:36 +01:00
Thibault Delavallée 0b21db907e [MERGE] Sync with trunk, because trunk was broken at last update
bzr revid: tde@openerp.com-20140221115207-oussz4cxss9u99vw
2014-02-21 12:52:07 +01:00
Thibault Delavallée 587c8474b0 [FIX] mail: fixed regression caused by forward-porting saas-3: re-removed
the hack in mail_thread about subscription in create mode.

bzr revid: tde@openerp.com-20140221113919-3b51stz2u9rj4kcz
2014-02-21 12:39:19 +01:00
Thibault Delavallée e2eb37efe2 [IMP] mail: do not fetch hidden subtypes in follower widgets
bzr revid: tde@openerp.com-20140221112816-xhtc97az72ip355o
2014-02-21 12:28:16 +01:00
Thibault Delavallée fc7f21e4bf [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140221102322-oi7wa2sc3867g81d
2014-02-21 11:23:22 +01:00
Christophe Simonis 4769ff5e5d [FIX] mail: fix IndentationError introduced in last commit
bzr revid: chs@openerp.com-20140220172926-4fy9x1i1q4wknfqx
2014-02-20 18:29:26 +01:00
Christophe Simonis 4b72678bc7 [MERGE] forward port of branch saas-2 up to revid 9195 chs@openerp.com-20140220154517-6y531n1mqtnfnsmr
bzr revid: chs@openerp.com-20140220163815-69sza1kclnh5mavs
2014-02-20 17:38:15 +01:00
Thibault Delavallée 700bbfcce1 [FIX] mail_thread: when reading subscription data, add a protection
against not planned subtype data (coming from error in subtype relationship
table, or for undisplayed subtypes, old subtypes, ...).

bzr revid: tde@openerp.com-20140225090637-mnztroc05nk7l2sl
2014-02-25 10:06:37 +01:00
Thibault Delavallée f9993774f1 [IMP] note: user_id owner field added in model, allowing to tune a bit
the access rules, notably about reading and creation. This allows by the way
to remove the hack about the operation in context when subscribing
users on a document.
The new rules on create and read now include user_id, aka the owner of a note
can always create (default value) and read its notes.
Also removed an unnecessary field (current_partner_id), as it was buggy and
unnecessary; view udpated accordingly.

[IMP] mail: removed a hack introduced in saas-3 with the current orm operation
in context to by-pass some access rules when subscribing someone on a document.

bzr revid: tde@openerp.com-20140219111330-l3hw5324hvuikpjc
2014-02-19 12:13:30 +01:00
Darshan Kalola (OpenERP) 1f71463cfc [IMP] extract subtype ordering from lp:~openerp-dev/openobject-addons/trunk-visibility-hr_holidays-darshan.
bzr revid: dka@tinyerp.com-20140219105246-qmm78w81erhfvhlc
2014-02-19 16:22:46 +05:30
Jérôme 41a4d00abe [FIX] : modified according to tde's remarks
bzr revid: jem@openerp.com-20140218143038-msk038rdmrp1fox1
2014-02-18 15:30:38 +01:00
Jérôme 0ff108c00c [ADD] change the link between lead and issue. Now : transfrom a lead into a issue and modify the mail thread
bzr revid: jem@openerp.com-20140217135731-538vluw7i1gverjf
2014-02-17 14:57:31 +01:00
Denis Ledoux 0ef17beed0 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9846 revid:dle@openerp.com-20140217124044-o8sgz1esfqeha01f
bzr revid: dle@openerp.com-20140214100922-m6rf7c6x85nv67sl
bzr revid: dle@openerp.com-20140214114713-oab4kbearvv7g3nh
bzr revid: dle@openerp.com-20140214131810-9abebxpfeoga1crn
bzr revid: dle@openerp.com-20140217124230-ov201kfep88f5tn7
2014-02-17 13:42:30 +01:00
Olivier Dony 76d89c0477 [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 9133 dle@openerp.com-20140214131810-9abebxpfeoga1crn
bzr revid: odo@openerp.com-20140217091203-kmeg4qsn2qyvll23
2014-02-17 10:12:03 +01:00
Thibault Delavallée ec5291c130 [IMP] fetchmail: try / except the processinf of each email and log any exception
found during processing. This way, all emails in the queue are managed and
all failed emails have their own exception in the logs, allowing easier
debugging.
Note that a failed email is set as seen to avoid processing it every time
the scheduler runs.

bzr revid: tde@openerp.com-20140213095717-tcwgkl143i3ujw8h
2014-02-13 10:57:17 +01:00
Thibault Delavallée dca7f71d71 [DOC] mail_thread: docstrings to add raised exceptions in message_process and message_route
bzr revid: tde@openerp.com-20140213090122-0gwin1pjigwu42sz
2014-02-13 10:01:22 +01:00
Olivier Dony bbd813e76e [MERGE] Forward-port of latest saas-2 (incl. 7.0) bugfixes, up to rev. 9127 odo@openerp.com-20140212122042-3m2tysmr31mtecnc
bzr revid: odo@openerp.com-20140212175141-i9yz8zlseglrk8sb
2014-02-12 18:51:41 +01:00
Thibault Delavallée 150d5a9e18 [IMP] mail: mail_thread: message routing: raise exceptions instead of using asserts.
Indeed assert are statements meant to be used when developping, for
debug purpose. In a production environment it is safer to use real
exceptions that can be managed accordingly.

bzr revid: tde@openerp.com-20140212152737-c7q339psd9hi4iwd
2014-02-12 16:27:37 +01:00
Thibault Delavallée 96d3693441 [FIX] mail_alias: avoid performing tracking when migrating to
alias. Indeed in this method, we have unitialized inherited fields because the orm
is updating. A new no_track key (already intorduced in 7.0, added in this branch because
of a missing forward-port) in mail_thread allows to avoid doing the tracking of values
and is used in mail_alias.

bzr revid: tde@openerp.com-20140210171350-ajwxwau2ar1gu9io
2014-02-10 18:13:50 +01:00
Thibault Delavallée 4be860c167 [REVIEW] mail: mail_thread: cleaned comment of modified code in get_empty_list_help
bzr revid: tde@openerp.com-20140210144611-16nkcju2yerc80e5
2014-02-10 15:46:11 +01:00
Denis Ledoux 0043f81e33 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9824 revid:dle@openerp.com-20140210134603-ck0jr56xhl8xgzg2
bzr revid: dle@openerp.com-20140210141704-sjzjwhe7fh5gszxr
2014-02-10 15:17:04 +01:00
Turkesh Patel (Open ERP) ee471832f9 [IMP] improved code to show default alias id
bzr revid: tpa@tinyerp.com-20140210131609-v5cxl5pexk37pt6d
2014-02-10 18:46:09 +05:30
Thibault Delavallée 759ed5bbb6 [IMP] mail: subscription: if no-one to (un)subscribe, already return. This is not
necessary for computation, but saves some browse / access right checking.

bzr revid: tde@openerp.com-20140210115827-2y451i0edgve59mi
2014-02-10 12:58:27 +01:00
Martin Trigaux 54a1ffc480 [FIX] mail: priority -10 on message_follower_ids to make sure executed before other function field that may use the followers (eg: note.note for access rights)
bzr revid: mat@openerp.com-20140210083130-ag95lqwlpkv7ceqc
2014-02-10 09:31:30 +01:00
Turkesh Patel (Open ERP) f94df0e389 [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20140210072100-p3ry9oq4eklwt9k0
2014-02-10 12:51:00 +05:30
Olivier Dony f7c1afffcb [FIX] mail.thread: avoid tracking multiple temporary changes during copy
bzr revid: odo@openerp.com-20140206173251-1njroiu08fzgdbyp
2014-02-06 18:32:51 +01:00
Denis Ledoux 15c105d95f [FIX] mail: re-apply security fix correctly from 9812 revid:mat@openerp.com-20140206121438-epghqo042ync24v5 of 7.0 branch
bzr revid: dle@openerp.com-20140206170829-918bxb88qh415w9e
2014-02-06 18:08:29 +01:00
Denis Ledoux 8e4279835b [FIX]mail: fix indentation problem from previous forward port
bzr revid: dle@openerp.com-20140206165630-13w44y6iewdrsl02
2014-02-06 17:56:30 +01:00
Denis Ledoux 041f1db4a6 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9814 revid:dle@openerp.com-20140206163444-ckcmurcwk2vhi5vp
bzr revid: dle@openerp.com-20140206164522-fi05cb4mpg22rkv2
2014-02-06 17:45:22 +01:00
Martin Trigaux 5ebcb64c34 [IMP] mail: in case of creation, still check creation access rights for subscription
bzr revid: mat@openerp.com-20140206120109-6h2vz1ulu33t1509
2014-02-06 13:01:09 +01:00
Martin Trigaux 922836d8cd [IMP] mail: check at least access_rights in case of creation
bzr revid: mat@openerp.com-20140206110327-zar4yl03r1lympx6
2014-02-06 12:03:27 +01:00
Martin Trigaux 7407f3c888 [FIX] mail: backport of saas-2 revision 9065 and 9081.
Make sure the user is subscribed before the super() call in mail_thread. This allows to have follower based record rules working (eg: note.note)

bzr revid: mat@openerp.com-20140206104714-anpehaik4wajnfrw
2014-02-06 11:47:14 +01:00
Thibault Delavallée 763496be49 [IMP] mail: added message_last_update field. This field is a datetime
field, updated everytime message_post in called. This allows to build filters, search or
actions based on the last message date, for reporting for example.

bzr revid: tde@openerp.com-20140206094831-nvyds6nqz0v25t59
2014-02-06 10:48:31 +01:00
Antony Lesuisse 6b7d9f2bac [IMP] ir.model.data new api
bzr revid: al@openerp.com-20140129030853-aqm4nu8buhj9gu7n
2014-01-29 04:08:53 +01:00
Raphael Collet 4c2cc018b1 [FIX] in ir_model_data.get_object(), rename parameter 'check' into 'raise_exception'
bzr revid: rco@openerp.com-20140127152112-s9ft7q9xlixedjew
2014-01-27 16:21:12 +01:00
Fabien Pinckaers 3e2c0c6d64 [FIX] showing help message for leads and its alias
bzr revid: fp@tinyerp.com-20140126093236-9djrusln4wvi3zdx
2014-01-26 10:32:36 +01:00
Raphael Collet b37d6e72c1 [FIX] mail: adapt to improved behavior of ir_model_data.get_object()
bzr revid: rco@openerp.com-20140123103425-gaud319o6t1f94qu
2014-01-23 11:34:25 +01:00
Thibault Delavallée 9cf78e93cc [MERGE] Sync with trunk, tries to solve conflicts. There are still some new images to convert into images in xml files.
bzr revid: tde@openerp.com-20140116103910-qmm2y6kucmngplnk
2014-01-16 11:39:10 +01:00
Christophe Simonis 91aaaec0a5 [MERGE] forward port of branch saas-2 up to revid 9092 dle@openerp.com-20140115165506-yuux9km39gbv7k4n
bzr revid: chs@openerp.com-20140115214454-dhl8xzr429co0j5d
2014-01-15 22:44:54 +01:00
Thibault Delavallée 4d73f955a9 [FIX] mail: mail_thread: fixed a bug in subscription, new followers
could overwrite the subscription of previous followers.

This has already been fixed in saas-2 branch at revision 9079 (revid
tde@openerp.com-20140109131748-hgtflp40pmjhlhu2). But the fix is also
valid for the 7.0 stable branch.

bzr revid: tde@openerp.com-20140115115825-fniobvz33sssvrwd
2014-01-15 12:58:25 +01:00
Martin Trigaux b7f393da31 [FIX] mail: do not check access rights for autosubscription after create.
This is required for models using message_follower_ids in their record rules (eg: note.note)

bzr revid: mat@openerp.com-20140110100133-wemcu6ou8avk6rpi
2014-01-10 11:01:33 +01:00
Thibault Delavallée 3e95a42690 [FIX] mail: fixed auto subscription overriding subscription of other followers
bzr revid: tde@openerp.com-20140109131748-hgtflp40pmjhlhu2
2014-01-09 14:17:48 +01:00
Christophe Simonis c0117351a8 [MERGE] forward port of branch 7.0 up to revid 9735 mat@openerp.com-20140106153818-lsy030btlzminvw9
bzr revid: chs@openerp.com-20140107142554-lx0ls3fly7cxmahj
2014-01-07 15:25:54 +01:00
Martin Trigaux d106d54ade [FIX] mail: check access rules of related documents when subscribing to it
Fix tests to execute actions with user that are allowed to

bzr revid: mat@openerp.com-20140106141157-0tp2bgw2d40ynrag
2014-01-06 15:11:57 +01:00
Martin Trigaux 964dae2311 [FIX] mail: subscribe user at creation as a default value instead of post processing.
This allows to have a value for the _set_followers call and be able to have record rules based on followers (eg: note.note).
Set the priority of message_follower_ids fields to -10 to be sure it will be executed before other function fields using these followers (eg: _set_stage_per_user from note.note does a browse which would trigger record rules to read the note)

bzr revid: mat@openerp.com-20140106100010-jl4cuvgvpsw26v28
2014-01-06 11:00:10 +01:00
Denis Ledoux 4305522776 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9728 rev-id: dle@openerp.com-20140102161149-x268xj7bzvvsit2h
bzr revid: dle@openerp.com-20140102164522-og7f932e50kzz7z6
2014-01-02 17:45:22 +01:00
Denis Ledoux bc50cd3558 [FIX] mail: mails with attachments containing special chars (such as é) were not delivered properly
get_filename method from email lib returns sometimes decoded value, sometimes still encoded.
for instance, get_filename cannot decode iso encoded filename

Recently, decode method has been applied on filename string, to handle iso encoded file. 
Sadly, one cannot decode already decoded values.
Therefore, decoding already decoded windows or utf-8 encoded filename with special chars failed.

bzr revid: dle@openerp.com-20140102161149-x268xj7bzvvsit2h
2014-01-02 17:11:49 +01:00
Thibault Delavallée d9343e2d27 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20131213094016-ylqkilyo4190g81w
2013-12-13 10:40:16 +01:00
Turkesh Patel (Open ERP) 2c5ad7b0fa [MRG] merge with lp:openobjet-addons
bzr revid: tpa@tinyerp.com-20131211132326-2hya21cd9td46m3b
2013-12-11 18:53:26 +05:30
Denis Ledoux 20be322c45 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9684 rev-id: dle@openerp.com-20131209145652-3g9rgnfz1w8k0whw
bzr revid: chs@openerp.com-20131202105848-33gcz1715w370rve
bzr revid: dle@openerp.com-20131204150643-is3y0b9n8enh3yql
bzr revid: chs@openerp.com-20131206152726-pirikn7v8pev90ic
bzr revid: dle@openerp.com-20131206162437-b9niay99mirk44qm
bzr revid: tde@openerp.com-20131209102019-kjeg0rx2au1d5e5v
bzr revid: dle@openerp.com-20131209155721-589zihxx8jmvlpvp
2013-12-09 16:57:21 +01:00
Thibault Delavallée 4b96e85a30 [MERGE] [FORWARD] Forward port of saas-2 branch until revision 9036 (revid tde@openerp.com-20131209102019-kjeg0rx2au1d5e5v)
bzr revid: tde@openerp.com-20131209105031-17920wsidpqrwmxj
2013-12-09 11:50:31 +01:00
Thibault Delavallée fcd5f7d960 [MERGE] Sync with 7.0
bzr revid: tde@openerp.com-20131209090903-al4o6uhrhhw4cqcl
2013-12-09 10:09:03 +01:00
Thibault Delavallée 2382710f6f [REV] mail: removed some changes to be done in trunk, not in 7.0
bzr revid: tde@openerp.com-20131209090802-q8fzn88ia9w6o5pq
2013-12-09 10:08:02 +01:00
Turkesh Patel (Open ERP) 4719072186 [MRG] merge with lp:opneobject-addons
bzr revid: tpa@tinyerp.com-20131206115703-nhertydfsrb5wg0q
2013-12-06 17:27:03 +05:30
Thibault Delavallée 1e5432edec [FIX] mail: fixed subtype check broken by get_object refactoring, should be fixed now + updated other call to get_object
bzr revid: tde@openerp.com-20131206101117-atlch4ea102a4gx0
2013-12-06 11:11:17 +01:00
Thibault Delavallée 4f5d36a464 [IMP] [CLEAN] mail: mail_thread: routing
- removed a debug print statement
- now searching all references once instead of each reference one at a time
to lessen the number of queries; as the newest message will be the first
in the search result, it's ok.

bzr revid: tde@openerp.com-20131205093921-h7sits57vqc51c8p
2013-12-05 10:39:21 +01:00
Thibault Delavallée 0624beb6af [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20131205093609-3lj3hsxz2vsudhw3
2013-12-05 10:36:09 +01:00
Turkesh Patel (Open ERP) 0ed4e99fb7 [MRG] merge with lp;Openobject-addons
bzr revid: tpa@tinyerp.com-20131204090847-pv3lvxn9cqqdn31e
2013-12-04 14:38:47 +05:30
Christophe Matthieu fd2821086f [MERGE] sync with trunk
bzr revid: chm@openerp.com-20131202150925-eqsi0uu0fqtwimhj
2013-12-02 16:09:25 +01:00
Fabien Pinckaers ed7623fc45 [IMP] Performance improvement: improved cache with context, better get_object
bzr revid: fp@tinyerp.com-20131130154659-uqis34x2cemmocly
2013-11-30 16:46:59 +01:00
Christophe Simonis 289023d92f [MERGE] forward port of branch saas-2 up to revid 9024 chs@openerp.com-20131130130014-hi5h5a00kjx0dbvp
It’s over NINE THOUSAAAAAAAND!

bzr revid: chs@openerp.com-20131130130725-9ntxdr5r7r04uoht
2013-11-30 14:07:25 +01:00
Thibault Delavallée 5859d84dc1 [MERGE] Sync with saas-2
bzr revid: tde@openerp.com-20131128094037-j59xo6sbj7k00fbf
bzr revid: tde@openerp.com-20131129092306-t0nb7tgyoqovx101
2013-11-29 10:23:06 +01:00
Thibault Delavallée 8253453d64 [IMP] mail: mail_thread: routing: implement compat-mode routing
It now accepts <111...222..openerp-res_id-model@mydomain.com> partial matching
only if the target record has messages without message_id, aka <= 6.1 record.

Updated and added tests

bzr revid: tde@openerp.com-20131128133226-ce1qyeswi9n83q8v
2013-11-28 14:32:26 +01:00
Thibault Delavallée 4f2e951cde [IMP] mail: mail_thread: routing: check for exact message_id.
WIP: will be improved, notably about what to do for partial match.

bzr revid: tde@openerp.com-20131128103921-q1a36otv9ptazehd
2013-11-28 11:39:21 +01:00
Denis Ledoux 2a9de8ba6f [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9654 rev-id: dle@openerp.com-20131127151815-gzk9py9wtzmndziw
bzr revid: dle@openerp.com-20131127152136-5p0lkz4vpfn9qxxx
2013-11-27 16:21:36 +01:00
Martin Trigaux 7c1bf0dd29 [FIX] mail: decode filename at email reception (if non-ascii characters) (opw 591729)
bzr revid: mat@openerp.com-20131127124021-bliapaggdjd1xnuz
2013-11-27 13:40:21 +01:00
Christophe Simonis 0521d1aab3 [MERGE] forward port of branch saas-2 up to revid 9017 chs@openerp.com-20131127110552-3u2nxwu01gxj9i7m
bzr revid: chs@openerp.com-20131127111208-iclt7a9ib7oucumh
2013-11-27 12:12:08 +01:00
Christophe Simonis 6b05beecc1 [MERGE] forward port of branch 7.0 up to revid 9651 chs@openerp.com-20131127104459-jb77x7quwcvtifm7
bzr revid: dle@openerp.com-20131126171210-jovr7e7efehuq3s2
bzr revid: chs@openerp.com-20131127110046-4ow36dkuuyzgf1pl
2013-11-27 12:00:46 +01:00
Thibault Delavallée ae7fcfb564 [IMP] [FIX] mail: mail_thread :
- avoid having to browse the record in message_subscribe: refactored message_subscribe
to work on ids without browsing, try to lessen the number of queries to do
- update _set_followers, method of the function field message_follower_ids, to use
message_subscribe and message_unsibscribe
- in create: add author as follower in creation values, not after create, allowing
create access rules based on followers
- updated message_unsubscribe to be the lower method, not calling _set_followers anymore

bzr revid: tde@openerp.com-20131126171752-1irizm7mhv2y1wrn
2013-11-26 18:17:52 +01:00
Turkesh Patel (Open ERP) 982549b31a [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20131126124206-gw02bnwnerl5dzrv
2013-11-26 18:12:06 +05:30
Thibault Delavallée cf214ed724 [FIX] mail: when generating pure email mass mailing
we have to process attachments as well as attachment_ids in the values generated
by the composer and the optional template.
As this behavior is the same as the one already implemented for message_post, this
feature has been moved into its dedicated method to be called by message_post
or before calling mail_mail.create().
This also allows to have attachments in pure email mass mailing that are attached
to mail.message, not to mail.compose.message model. When unlinking those emails,
the attachments will be also removed, and not lost in the database anymore.

bzr revid: tde@openerp.com-20131126110942-h8p0d9sbjtk0hwlu
2013-11-26 12:09:42 +01:00
Thibault Delavallée 4be6ac800b [FIX] mail: in some cases tracking is called
without the context (some workflows for example). In that case use the
current user lang when generating the automatic message. This is done
by adding it in the context if not present.

lp bug: https://launchpad.net/bugs/1219163 fixed

bzr revid: tde@openerp.com-20131125163808-bbbqwvx22my38zdj
2013-11-25 17:38:08 +01:00
Christophe Simonis bb1e256f5b [MERGE] forward port of branch saas-2 up to revid 9010 dle@openerp.com-20131125143003-vjtzj1c5051pdnk3
bzr revid: chs@openerp.com-20131125150054-b135qshkx6icakgk
2013-11-25 16:00:54 +01:00
Thibault Delavallée f148061b94 [MERGE] [IMP] chatter: improved 'Log a note'
- the button is now only displayed for employee users. This is done
by overriding the fields_view_get in mail.thread and adding options
to the widget according to the groups the user belongs to. Indeed
it is currently not possible to set widget options specific to
some groups. Therefore an override of fields view get was
necessary.
- small layout improvements: Log a note -> Log an internal note, 
background color of notes updated.

bzr revid: tde@openerp.com-20131125130455-u8517iyr4jgdgoqn
2013-11-25 14:04:55 +01:00
Olivier Dony 2cba6a5355 [MERGE] Forward-port of latest 7.0 fixes up to rev 9629 rev-id odo@openerp.com-20131121153230-keie85rmes2zh2o8
bzr revid: chs@openerp.com-20131121112139-aw2ara1i1xymue62
bzr revid: odo@openerp.com-20131121154205-ul9hf9tz3h0x2n7m
2013-11-21 16:42:05 +01:00
Thibault Delavallée 1761086ad7 [FIX] mail: auto_subscribe: fix subscription, could have subtypes linked to another model than the current model
bzr revid: tde@openerp.com-20131120154320-gf67wbv3en2f7ral
2013-11-20 16:43:20 +01:00
Olivier Dony 44664076da [MERGE] Forward-port of latest 7.0 fixes up to rev 9618 rev-id: dle@openerp.com-20131120142131-s333lyva85cyn41o
bzr revid: odo@openerp.com-20131120144059-yyh7emvgdarff09b
bzr revid: odo@openerp.com-20131120144318-11nmn1zj00zmi10z
2013-11-20 15:43:18 +01:00
Thibault Delavallée 20f10d574a [FIX] mail: auto_subscribe: domain for fetching followers was wrong, forgot an AND
bzr revid: tde@openerp.com-20131114121746-lqqr4nzpduk4lfdq
2013-11-14 13:17:46 +01:00
Thibault Delavallée cf40f4e9b0 [FIX] [IMP] mail: refactored code of message_auto_subscribe.
This new code allows faster computation, because it avoids
- searching in a many2many relationship that is very costly in production
databases, because it is replaced by an 'id in [ids]' equivalent leaf
that can be huge.
- browsing in a create/write (should also lessen the number of issues
about read access rights in create)

A new optionnal parameter is given to the method, that are the
modified values. If this is not given (compatibility-mode) the
records are browsed to fetch the value.

bzr revid: tde@openerp.com-20131114113231-oyk16t9i3m3wul6k
2013-11-14 12:32:31 +01:00
ajay javiya (OpenERP) 1bafe48697 [MERGE]: with trunk
bzr revid: aja@tinyerp.com-20131029133048-1ki53bbmy31igan7
2013-10-29 19:00:48 +05:30
Olivier Dony d1d35b3f57 [FIX] mail.thread: message_redirect_action should not crash when the message has been deleted
bzr revid: odo@openerp.com-20131028160100-yhebao3adbzz00cn
2013-10-28 17:01:00 +01:00
Turkesh Patel (Open ERP) 7618ba4d08 [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20131022064725-jxjl9fnn38mzdptg
2013-10-22 12:17:25 +05:30
Thibault Delavallée 62e88a16e4 [FIX] mail: mail_mail: fixed url embedded in notification emails.
When having emails not linked to a notification (mail.notification = False)
the link is generated without any clue about the source record.
However we can try to use model and res_id defined on the mail_mail record
to correctly format a link.

Added support of model and res_id in message_redirect_action. This method
now can redirect based on a message_id, or based on model / res_id.

bzr revid: tde@openerp.com-20131018144924-j4f22hen3lsua7cb
2013-10-18 16:49:24 +02:00
Olivier Dony 748ac8626c [FIX] mail: typo during earlier fwd-port merge
bzr revid: odo@openerp.com-20131015181331-97k21d3xooox8z1j
2013-10-15 20:13:31 +02:00
Christophe Simonis 273face907 [MERGE] forward port of branch saas-1 up to revid 8791 chs@openerp.com-20131009175454-j06y1ngylfbqyrpj
bzr revid: chs@openerp.com-20131009180337-cxgdt6zzd1z68ga9
2013-10-09 20:03:37 +02:00
Olivier Dony 8ac110c4dd [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5098 rev-id: odo@openerp.com-20131011123914-7zuvd9mch21yxgj8
bzr revid: dle@openerp.com-20131009131902-a93nsbou4w8y0vlx
bzr revid: chs@openerp.com-20131009175454-j06y1ngylfbqyrpj
bzr revid: dle@openerp.com-20130918160049-fo88fl7uyhfoofkv
bzr revid: dle@openerp.com-20130924130544-kmkyr0d73cusvdav
bzr revid: odo@openerp.com-20131011134433-nyfjipvlql4xu127
2013-10-11 15:44:33 +02:00
Turkesh Patel (Open ERP) 40f189adfb [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20131009093540-y9ueph05ah04gixg
2013-10-09 15:05:40 +05:30
Denis Ledoux d32c663fbe [FIX]mail: mail_thread, trying to send a message in the chatter while the emails where all mal-formed raised an error.
bzr revid: dle@openerp.com-20131008111845-tx3bpp8snfl03cnk
2013-10-08 13:18:45 +02:00
ajay javiya (OpenERP) 46fdb4ee83 [IMP]: Change warning message if login user is not an employee and try to post internal note
bzr revid: aja@tinyerp.com-20130927094215-nf4mvdkz4mqr7543
2013-09-27 15:12:15 +05:30
ajay javiya (OpenERP) 6b4a1a3d55 [IMP]: Rename log a note to Log an internal note
bzr revid: aja@tinyerp.com-20130926132322-pvu18fr5w24lc18m
2013-09-26 18:53:22 +05:30
ajay javiya (OpenERP) 2f708369cb [IMP][REM]: Improve code and remove unused method
bzr revid: aja@tinyerp.com-20130924133041-0j2k8qc5ubjxwghx
2013-09-24 19:00:41 +05:30
ajay javiya (OpenERP) 712eee6e3d [ADD]: Warning message if user try to post a internal comment and he/she is not an employee
bzr revid: aja@tinyerp.com-20130924105210-rrfk2z6du7hiblr6
2013-09-24 16:22:10 +05:30
ajay javiya (OpenERP) cbe9d337a5 [IMP]: reduce rpc call , add options 'display_log_button' on field,
[REM]: unwanted record rule

bzr revid: aja@tinyerp.com-20130923133201-zclwecr2n596e989
2013-09-23 19:02:01 +05:30
Thibault Delavallée 1d76129a22 [FIX] mass_mailing:
- fixed forgottent import of mail_thread in mass_mailing, to enable bounce and replied tracking
- fixed replied computation in message_route_process, adding the original email in parameters
- fixed form view of campaign, to add edit and dlete now that clicking on it redirects to the waves
- added track field on mail_mail, to avoid creating too mush entries in mail.mail.statistics
- fixed mass_mailign controller

bzr revid: tde@openerp.com-20130916114706-b9zyhp0ha6mr9fzg
2013-09-16 13:47:06 +02:00
Thibault Delavallée fbc6443692 [CLEAN] mail: cleaned some read -> browse + forgotten statement to remove
bzr revid: tde@openerp.com-20130913122956-6zkk9ucewbt6w407
2013-09-13 14:29:56 +02:00
Thibault Delavallée ed62d1dac7 [REF] mass_mailing: first refactor
Mail statistics are now stored onto a separated object (mail.mail.statistics), allowing to
handle emails separately from statistics (among other removing mail.mail entries while keeping
statistics).

Everything linnked to opened/replied/bounce is not managed by mass_mailing, removed added code
in mail module.

bzr revid: tde@openerp.com-20130913115408-322cyjipdg680as6
2013-09-13 13:54:08 +02:00
Thibault Delavallée ce8c987089 [IMP] mail, email_template, mass_mailing: improvev mass mailing management in mail.compose.message + form view cleanings + some fixes in mail_mail about set_opened/replied/bounced, now checking that ids effectively exist
bzr revid: tde@openerp.com-20130910151901-nhuwvtrkbwekyh7x
2013-09-10 17:19:01 +02:00
Thibault Delavallée 903ca548c7 [IMP] mass_mailing: added kanban views for mass_mailing, implemented segment for campaigns. Moved sparkline and gauge widgets to web.
Segment: template, date, mails.
Campaign: grouped statistics.

bzr revid: tde@openerp.com-20130903145936-nwy250w1suxmtbl3
2013-09-03 16:59:36 +02:00
Thibault Delavallée 21d57f5e9d [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130826085410-qngwkw6eyxol4192
2013-08-26 10:54:10 +02:00
Turkesh Patel (Open ERP) 155d152b90 [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20130826053724-dzymzruugarkfv34
2013-08-26 11:07:24 +05:30
Christophe Simonis 5343c48c5f [MERGE] forward port of branch saas-1 up to revid 8760 chs@openerp.com-20130823143114-83tdjhbsdes0kydr
bzr revid: chs@openerp.com-20130823154655-blm2wyfivmg8qi2z
2013-08-23 17:46:55 +02:00
Christophe Simonis 58868227f9 [MERGE] forward port of branch 7.0 up to revid 9382 chs@openerp.com-20130823131214-ipouwtnz8r16mlvv
bzr revid: chs@openerp.com-20130823143114-83tdjhbsdes0kydr
2013-08-23 16:31:14 +02:00
Thibault Delavallée d874d9980d [FIX] mail: fixed wrong parsing of multipart/mixed emails.
alternative mode is computed when browsing the parts, not from
the message content type.

Added tests.

Also added some notification_email_send to none to avoid sending
emails in demo/data/update.

bzr revid: tde@openerp.com-20130823120611-0n4ull3c8gvwug2u
2013-08-23 14:06:11 +02:00
Turkesh Patel (Open ERP) 9162b740e9 [MRG] merge lp:openobject-addons
bzr revid: tpa@tinyerp.com-20130813104102-11sp0qb2iupu0xyq
2013-08-13 16:11:02 +05:30
Thibault Delavallée 982915b7d0 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130807145147-ltn86n2a87q8y88g
2013-08-07 16:51:47 +02:00
Thibault Delavallée 2eece10cd4 [FIX] mail_mail: computation of reply_to after create to avoid
interfering with automatic message_id creation of mail_message
[FIX] mail_thread: fixed issues with private messages through mailgateway
(wrong route checking, variable erasing)
[TEST] mail: added test for the second bug

bzr revid: tde@openerp.com-20130807142418-3h5qxdt3ekosj9x6
2013-08-07 16:24:18 +02:00
Thibault Delavallée fd100054cc [FIX] mail_mail: fixed reply_to computation (before create was leading to a wrong message_id to the embedded mail_message); mail_thread; fixed private discussion not going through the route checking; improved replying through mailgateway now incrementing the replied field of mail_mail.
bzr revid: tde@openerp.com-20130807130118-yggvmontssofxt0q
2013-08-07 15:01:18 +02:00
Thibault Delavallée 38a534dee0 [IMP] mail: first implementation of tracking and bounce management.
Added 2 fields on mail_mail to count read/bounce.
Added bounce alias bounce-mail_id-model-res_id.
Added message_receive_bounce method that try to incremetn message_bounce field.

bzr revid: tde@openerp.com-20130806151143-7dw6xlj8n7mh0nqe
2013-08-06 17:11:43 +02:00
Turkesh Patel (Open ERP) b210c4de66 [MRG] merge with lp:openobject-addons, changes of stage state task merged in this changes
bzr revid: tpa@tinyerp.com-20130726124542-dl3f1g0jgmb8gjan
2013-07-26 18:15:42 +05:30
Thibault Delavallée e0e3d98557 [IMP] mail: refactored check_mail_message_access
bzr revid: tde@openerp.com-20130723144507-bwwegheqofs7x1ox
2013-07-23 16:45:07 +02:00
Thibault Delavallée 68d1c2928f [CLEAN] Cleaning befor merging
No need to use an image for edition -> use webtypo font instead
Small code cleaning in js / python

bzr revid: tde@openerp.com-20130723095509-knp45uvmlfmr27v9
2013-07-23 11:55:09 +02:00
Christophe Simonis bf29a2ebc7 [MERGE] forward port of branch 7.0 up to revid 9302 chs@openerp.com-20130718111616-apacuhc2qhquobtc
bzr revid: dle@openerp.com-20130627104833-b9zgtu8urj43f12b
bzr revid: mat@openerp.com-20130702135856-kmg7d8anw17nkbd8
bzr revid: chs@openerp.com-20130718115928-wpa84dqh8tcq31zt
2013-07-18 13:59:28 +02:00
Paramjit Singh Sahota 54837802ac Improved code.
bzr revid: psa@tinyerp.com-20130715113736-ww4wffkajnwkk961
2013-07-15 17:07:36 +05:30
Paramjit Singh Sahota 670710b88e [IMP] Improved code and passed the data according to the format as suggest (partner_id, partner_name, {'is_editable': True/False, 'is_uid': True/False}) and done changes according this changes.
bzr revid: psa@tinyerp.com-20130715080106-63dbeh3mhgiqppzv
2013-07-15 13:31:06 +05:30
Paramjit Singh Sahota 6694183dcb [IMP] Improved code and added
{'is_editable': True/False, 'is_uid': True/False}
-- where is_editable will be True if uid is in technical group
-- where is_uid will be True if uid is in partner.user_ids.

bzr revid: psa@tinyerp.com-20130712133920-96l6axns7yynyz9e
2013-07-12 19:09:20 +05:30
Paramjit Singh Sahota 3ed5c9e838 [MERGE] Sync with lp:openobject-addons
bzr revid: psa@tinyerp.com-20130711110346-63ouy2j3zp5sndcr
2013-07-11 16:33:46 +05:30
Turkesh Patel (Open ERP) e4fd9bb105 [IMP] improved view and code to show default alias for job
bzr revid: tpa@tinyerp.com-20130704083631-e0cyn2fxpqfhg5hb
2013-07-04 14:06:31 +05:30
RGA(OpenERP) 07282840ac [FIX] fetch mail should uncode attached filename too
bzr revid: rgaopenerp-20130703092937-jqrj76i3gzro9isx
2013-07-03 14:59:37 +05:30
Martin Trigaux d2d72d8416 [MERGE] forward port of saas-1 up to revision 8749 (mat@openerp.com-20130702135856-kmg7d8anw17nkbd8)
bzr revid: mat@openerp.com-20130702144646-y1wqs5mz4rzoh50g
2013-07-02 16:46:46 +02:00
Paramjit Singh Sahota cc2632f9c7 [MERGE] Sync with lp:openobject-addons.
bzr revid: psa@tinyerp.com-20130628045057-iapbncjjao6tiew6
2013-06-28 10:20:57 +05:30
Thibault Delavallée e3c729e1a6 [CLEAN] Cleaned last commit.
bzr revid: tde@openerp.com-20130627145519-533br1ho1da3d4f0
2013-06-27 16:55:19 +02:00
Thibault Delavallée bf4ada34b4 [REF] mail_thread: message_track now uses browse records instead of read results.
Updated addons accordingly.
Updated tests to test corner cases using False / null browse records.

bzr revid: tde@openerp.com-20130627144647-swbj77i84vo9ii0v
2013-06-27 16:46:47 +02:00
Paramjit Singh Sahota 74bbd696f7 [MERGE] Sync with lp:openobject-addons.
bzr revid: psa@tinyerp.com-20130626065359-z17dk91q9c0rgfaw
2013-06-26 12:23:59 +05:30
Thibault Delavallée 3994ea12e9 [CLEAN] Misc cleaning before merging (some code cleaning, added comments).
bzr revid: tde@openerp.com-20130625092606-l8bqt3ce2xz4zm9t
2013-06-25 11:26:06 +02:00
Thibault Delavallée e6ee1d315e [CLEAN] Misc cleaning before merging
bzr revid: tde@openerp.com-20130624162457-8y8eqwebwolvcdc6
2013-06-24 18:24:57 +02:00
Thibault Delavallée fd90140d7b [REF] mail_thread: refactored message_route improvement, to be closer to the original code + call to a new method that checks the route, instead of doing everything in one method.
bzr revid: tde@openerp.com-20130624151827-hxwaelefs540pvca
2013-06-24 17:18:27 +02:00
Thibault Delavallée b7f4ddb880 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130621092424-supbxu8mwm2qtu6b
2013-06-21 11:24:24 +02:00
Thibault Delavallée ff00a84d33 [FIX] mail: fixed a glitch in message_subscribe sometimes overriding specified subtypes
bzr revid: tde@openerp.com-20130620135718-qi0d8fpqvombq3v1
2013-06-20 15:57:18 +02:00
Thibault Delavallée cd9efe1f99 [FIX] mail: take into account default_ context values for auto subscribe
bzr revid: tde@openerp.com-20130619123829-gr1rkgp490bdci9u
2013-06-19 14:38:29 +02:00
Paramjit Singh Sahota 7428cac4af [MERGE] Merged lp:openobject-addons.
bzr revid: psa@tinyerp.com-20130617113826-hb6zbv73t3h2hmij
2013-06-17 17:08:26 +05:30
Thibault Delavallée 7b7dfb955f [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130617095141-74uttqtw60iorl5g
2013-06-17 11:51:41 +02:00
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
Paramjit Singh Sahota 01fcf4686e [MERGE] Merged lp:openobject-addons.
bzr revid: psa@tinyerp.com-20130612130222-ro7iun4a23qqjefj
2013-06-12 18:32:22 +05:30
Thibault Delavallée fc44f25d3a [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130612123429-a4mp0wiicdhlvk0m
2013-06-12 14:34:29 +02:00