Commit Graph

82 Commits

Author SHA1 Message Date
Thibault Delavallée db2bdee343 MERGE] [FIX] email_template: fix relative -> absolute url conversion
Local URLs are converted into absolute URLs, notably because when using the
email designer, images are added using local URLs. Previously to this fix
the template was analyzed to find local URLs and make them absolute.
However this causes 2 issues :
- mako-based URLs are broken because a scheme is added before the mako that
generated the image src
- when changing the base url, the templates are not updated
The URLs are now converted dynamically when generating the content of the
html. This is done by passing a new parameter that enable the post processing
of the generated content.
Also fixed double body generation when using templates; fields parameter
was not propagated correctly.

bzr revid: tde@openerp.com-20140304112957-l9b10gyjqphs5fgc
2014-03-04 12:29:57 +01:00
Thibault Delavallée a9a4767d17 [FIX] email_template :
- fixed composer using template that were rendering the body twice, once form the template and
once from the composer body. Only the latter one is used, so avoid generating the template body
that is not necessary
- fixed email_template generating values for a set of given fields, ignoring the field list
given into parameter
- fixed post processing of templates to transform local urls into absolute urls; now urls are
transformed after body generation, when sending email based on templates , or when generating
the content when using the composer.

bzr revid: tde@openerp.com-20140227153835-gmqnxrzed9fnbxhm
2014-02-27 16:38:35 +01:00
Fabien Pinckaers b15dbfa3a6 [IMP] mini imp
bzr revid: fp@openerp.com-20140125123758-4fhewd19ib38oal3
2014-01-25 13:37:58 +01:00
Pooja Zankhariya (OpenERP) 722aee5336 [MERGE]Merge with Parent
bzr revid: pza@tinyerp.com-20140117062056-yaw069hktnsk3iwj
2014-01-17 11:20:56 +05: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
Pooja Zankhariya (OpenERP) ba458f6abc [MERGE]Merge with Parent
bzr revid: pza@tinyerp.com-20140115123052-n9pfmaoh5jzev28d
2014-01-15 17:30:52 +05:00
Denis Ledoux 899166ecac [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9761 revid:dle@openerp.com-20140114164804-zhfy9lb308554kp1
bzr revid: dle@openerp.com-20140114173653-xhh85ubx27uu1306
2014-01-14 18:36:53 +01:00
Olivier Dony a7cb9b762d [FIX] email_template: fix invalid uses of tools.email_split
This is necessary to have the tests pass after
the corresponding server patch in server 7.0
at revision 5198 revision-id: odo@openerp.com-20140114120344-r58wndgybqusnnq7

lp bug: https://launchpad.net/bugs/1199386 fixed
lp bug: https://launchpad.net/bugs/1165531 fixed

bzr revid: odo@openerp.com-20140114134627-6j83f4s6pvnj4uma
2014-01-14 14:46:27 +01:00
Thibault Delavallée 49c0b7a820 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140106135700-rt0g44w5xmpbtxiu
2014-01-06 14:57:00 +01:00
Fabien Pinckaers 9cbe77bc90 [IMP] several cleaning
bzr revid: fp@tinyerp.com-20140101154754-cp4m9u84okx7m057
2014-01-01 16:47:54 +01:00
Denis Ledoux 1508c5dd00 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9718 rev-id: dle@openerp.com-20131224103535-rhtje7dnq1ie7jtb
bzr revid: tde@openerp.com-20131220162158-hbgktly09dv37958
bzr revid: dle@openerp.com-20131223155041-8zp8e08fihbr0ie2
bzr revid: dle@openerp.com-20131224112407-aw6dq2q92312kjbk
2013-12-24 12:24:07 +01:00
Thibault Delavallée ba73588c6c [FIX] email_template: fixed default_get, not possible ot render when we do not have any data about the record used for rendering
bzr revid: tde@openerp.com-20131217165931-muxsi0hwhihcvo1f
2013-12-17 17:59:31 +01:00
ajay javiya (OpenERP) 8f4617c335 [MERGE]: with main
bzr revid: aja@tinyerp.com-20131210050701-116a01x8r194arg2
2013-12-10 10:37:01 +05:30
Thibault Delavallée 1037874e15 [CLEAN] mail: removed modifications that have nothing to do with website in mail.js + typo introduced in a test file
bzr revid: tde@openerp.com-20131206101716-08q6f4ufhj50e239
2013-12-06 11:17:16 +01:00
ajay javiya (OpenERP) 3e5ae00690 [ADD]: Quote roller module
bzr revid: aja@tinyerp.com-20131202123437-zn6u2ckxbid3jknb
2013-12-02 18:04:37 +05:30
Thibault Delavallée 4fb0880259 [IMP] email_template: already generate tmeplate values in default_get
bzr revid: tde@openerp.com-20131120135904-r630n937txivqak9
2013-11-20 14:59:04 +01:00
Thibault Delavallée 9ef46123a6 [IMP] mail.compose.message, email.template: rendering is now done in batch.
Also refactored send_mail in mail.compose.message in order to be able to override
mail values without having to intefere with the send_mail behavior.

bzr revid: tde@openerp.com-20130828140929-xe9hbmbo6jxgs9mh
2013-08-28 16:09:29 +02:00
Olivier Dony c02afb45fa [MERGE] Forward-port of bugfixes from saas-1 series up to rev.8759 rev-id: odo@openerp.com-20130820152607-0p0fx87v1rqhk3vy
bzr revid: odo@openerp.com-20130820165258-3mjzbo990xg44dfu
2013-08-20 18:52:58 +02:00
Thibault Delavallée f1f2b2ba06 [IMP] mail: mail.message now has mail_server_id from template_id.
bzr revid: tde@openerp.com-20130722131725-i30xd4b03nui3hyw
2013-07-22 15:17:25 +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
Denis Ledoux f8480b69be [FIX]email_template: generate_email_for_composer, clean context before find or create partner, to avoid default values for partner
bzr revid: dle@openerp.com-20130716095928-z79ipwgjxw5ypg3y
2013-07-16 11:59:28 +02:00
Thibault Delavallée 62a03693a3 [FIX] mail.compose.message in email_template: var typo
bzr revid: tde@openerp.com-20130606130851-h5jswklvvz98enue
2013-06-06 15:08:51 +02:00
Thibault Delavallée 72f6a8c646 [FIX] mail.compose.message: supports user_signature of template. Note that in case of multiple wizards (send on ids that is not a singleton list), user_signature on one template is valid for all wizard.
bzr revid: tde@openerp.com-20130606123724-f7q3mwm81ek7mr5c
2013-06-06 14:37:24 +02:00
Thibault Delavallée f728ec93fd [FIX] email_template: fixed errors due to template_id now being a many2one, not an int anymore.
bzr revid: tde@openerp.com-20130411134119-q1o71pn34v8u49jy
2013-04-11 15:41:19 +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 0d14fd300a [MERGE] [IMP] email_template: template_id field is now a many2one towards email.template
- changed selection field to a many2one using a domain; this
allows to edit the template while being in a composition wizard.
- improved email template and template preview form view

bzr revid: tde@openerp.com-20130329114631-fd6phvjaxojk9ja5
2013-03-29 12:46:31 +01:00
Thibault Delavallée 56e28b9a56 [FIX] email_template: saving as template did not choose the right template.
bzr revid: tde@openerp.com-20130327151727-agbzm41sae2bsxan
2013-03-27 16:17:27 +01:00
Turkesh Patel (Open ERP) cd90ed025a [MRG] merge with lp:openobject-addons
bzr revid: tpa@tinyerp.com-20130321045350-wrm8yh6p0zywlhbb
2013-03-21 10:23:50 +05:30
Thibault Delavallée 522f144781 [CLEAN] Misc cleaning and code review before merging.
bzr revid: tde@openerp.com-20130319091844-tnpd0w8tlagcbypz
2013-03-19 10:18:44 +01:00
Thibault Delavallée 5d59401b91 [MERGE] Sync with trunk, tried to resolve the conflicts without breakign everything.
bzr revid: tde@openerp.com-20130315120759-sf1o1sd80ycuuy7n
2013-03-15 13:07:59 +01:00
Thibault Delavallée f4dbf7051b [FIX] email_template: fixed behavior of email_to, email_cc, partner_to; improved form view.
bzr revid: tde@openerp.com-20130314110315-3gfl7mjj08jgqo93
2013-03-14 12:03:15 +01:00
Thibault Delavallée 70ce1e5eb4 [FIX] Fixed forgotten conflict when merging trunk.
bzr revid: tde@openerp.com-20130314085315-m4didtupt20gmkyv
2013-03-14 09:53:15 +01:00
Thibault Delavallée 272501d66c [MERGE] Sync with 7.0
bzr revid: tde@openerp.com-20130314082535-6fdvgnernmbo1liw
2013-03-14 09:25:35 +01:00
Thibault Delavallée a2a8c238dc [CLEAN] email_template: removed a print statement.
bzr revid: tde@openerp.com-20130311124254-xzxs1r6cnqw2zxxc
2013-03-11 13:42:54 +01:00
Thibault Delavallée 22bba15ccd [FIX] email_template: on_change values for m2m can be list of ids, not necessarily commands.
bzr revid: tde@openerp.com-20130308124341-ih0f4us81cffer7m
2013-03-08 13:43:41 +01:00
Thibault Delavallée 5ebf390f96 [FIX] email_template: void value in partner_ids when generating tmeplate does not erase wizard value anymore.
bzr revid: tde@openerp.com-20130308091156-ytw5k4y5w321705f
2013-03-08 10:11:56 +01:00
Turkesh Patel (Open ERP) 439b35d9ed [IMP] email_template:make template_id field many2one from selection and aplly domain of related model, improve view of email_template
bzr revid: tpa@tinyerp.com-20130307132446-gsb9yp32o7fnomco
2013-03-07 18:54:46 +05:30
Thibault Delavallée 4665d10f05 [IMP] mail, email_template: better consistence of mail.compose.message mdoel ans 0 or res_id res_id for attachments on composer; generate_email_for_composer should avoid returning keys for void values.
bzr revid: tde@openerp.com-20130306134612-yazwi6cgwvw8suyw
2013-03-06 14:46:12 +01:00
Thibault Delavallée f8481a83d0 [IMP] email_template: cleaned a bit duplicated code.
bzr revid: tde@openerp.com-20130305151503-t99tu53x35d3ea29
2013-03-05 16:15:03 +01:00
Thibault Delavallée c7d8842b02 [IMP] mail, email_template: fixed attachment management (template does not override provided attachments anymore; fixed possible unexisting attachment ids key; fixed some duplication.
bzr revid: tde@openerp.com-20130304092248-mqadzmrhgdu58j8y
2013-03-04 10:22:48 +01:00
Thibault Delavallée 46a5b63cad [IMP] email_template: better management of attachments. In mass mail, we want attachments to be duplicated due to the ownership concept of attachments in OpenERP.
bzr revid: tde@openerp.com-20130301144827-762362bgng5m4nye
2013-03-01 15:48:27 +01:00
Thibault Delavallée b0eb876160 [FIX] mail: first try to fix attachment duplication.
bzr revid: tde@openerp.com-20130228132625-8yjggruhrvbvep21
2013-02-28 14:26:25 +01:00
Thibault Delavallée 0aaca4daa9 [IMP] mail: improved mass mailing. Correctly take into account email_to, email_cc, partner_to even if no template. Mass mailing is a no-subtype post with additional recipients manually notified. Added option (in technical features) to send to followers, or to directly create a mail_mail. Added some default values in mail_message. Added explicit management of email_from and reply_to. Having a reply_to bypasses the 'model-res_id' in message_id behavior allowing to construct threads. Added explicit recipient_ids field on mail_mail that replaces the recipient_ids parameter in mail_mail.send(). Updated tests accordingly.
bzr revid: tde@openerp.com-20130225164857-i635atksj7riq9nd
2013-02-25 17:48:57 +01:00
Thibault Delavallée 22afd0cefd [IMP] email_template: renamed email_recipients field to partner_to, in order to have a name that means something.
bzr revid: tde@openerp.com-20130225101918-khyd6qkvtsyr2wi3
2013-02-25 11:19:18 +01:00
Thibault Delavallée efedfde1bd [FIX] email_template: template does not erase the wizard content anymore.
bzr revid: tde@openerp.com-20130213173940-ut3ff921aocgw2rf
2013-02-13 18:39:40 +01:00
Thibault Delavallée 0237833240 [FIX] mail.compose.message: fixed rendering when no template is chosen in the selection box; also cleaned display of recipients when using the wizard in mass mailing mode.
bzr revid: tde@openerp.com-20121211155435-l5s9lpghpxw8bi9o
2012-12-11 16:54:35 +01:00
Olivier Dony e5374b93b4 [REF] email_template: cleanup/remove obsolete fields on mail composition wizard: use_template is the default
bzr revid: odo@openerp.com-20121116170259-08eot6wy40yehkh4
2012-11-16 18:02:59 +01:00
Olivier Dony c558ac6272 [MERGE] Sync with trunk
bzr revid: odo@openerp.com-20121114172252-q1xj3hdugqhky532
bzr revid: odo@openerp.com-20121115135141-ia8uf5649rapj0v7
2012-11-15 14:51:41 +01:00
Thibault Delavallée da9951baf9 [CLEAN] removed a commented statement, fixed a var name in js.é
bzr revid: tde@openerp.com-20121115124931-w20igi8qk66uvnj0
2012-11-15 13:49:31 +01:00
Thibault Delavallée 81d4467c8f [REV] mail.compose.message using email_template: _reopen is back, as the spec of a wizard should be that hitting a button close it. Therefore _reopen is necessaru to reopen the wizard with its previous value, to continue working on it.
bzr revid: tde@openerp.com-20121115122406-d88ozw5iclsqdyff
2012-11-15 13:24:06 +01:00