Commit Graph

237 Commits

Author SHA1 Message Date
Stefan Rijnhart b139c5819d [FIX] email_template: allow override of in new API
If context is passed as a non-keyword argument to a new-API override of this
method, it ends up as the positional fields argument.

Closes #9911
2015-12-10 15:28:21 +01:00
Goffin Simon 9b3e606538 [FIX] sale: format date according to partner language in SO emails.
opw:625594
2015-01-29 16:22:21 +01:00
Denis Ledoux 4b756c599d [FIX] email_template: format tz, do no display tz if none set
When displaying the datetime according to the lang in the context

Otherwise, it displays '(False)' at the end of the datetime
2015-01-29 14:48:35 +01:00
Denis Ledoux a6212d2d20 [MERGE] forward port of branch saas-3 up to e11d1c2 2014-12-11 14:11:33 +01:00
Denis Ledoux e11d1c2b7a [MERGE] forward port of branch 7.0 up to db98434 2014-12-11 12:15:09 +01:00
Ravi Gohil b035cfb7e9 [FIX] email_template: missing translations in email template
When composing an email based on an email template, some parts of the template
(the result of name_get on fields) were not translated.
This was due to missing language in context when rendering the template.
Fixes #3708, opw 617309
2014-12-10 15:56:57 +01:00
Christophe Simonis 2e3f59181d [MERGE] forward port of branch saas-3 up to db75994 2014-10-14 15:13:14 +02:00
Christophe Simonis db759948ff [MERGE] forward port of branch 7.0 up to 75d3ea6 2014-10-14 14:36:45 +02:00
Denis Ledoux 0b13f32868 [FIX] email_template: do not try to add user signature if none set
append_content_to_html expects two strings. If the user has no signature, it returns user.signature returns False
2014-10-14 13:41:52 +02:00
Christophe Simonis 780dd9891f [MERGE] forward port of branch saas-5 up to 7eab880 2014-09-15 14:00:02 +02:00
Christophe Simonis 56f2b7ae0f [MERGE] forward port of branch saas-3 up to fdc6271 2014-09-12 18:53:48 +02:00
Denis Ledoux 0aa92fdb03 [FIX] email_template: a tag link rendering, do not process if no href 2014-09-09 19:17:23 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Jeremy Kersten 581275a63c [IMP] email_template: add a lambda function to allow a user to format a date from a template mail into a specific timezone, and/or in a specific format.
Eg: ${format_tz(object.name, object.employee_id.address_id.tz,'%m/%d/%Y %H:%M')}
2014-08-07 17:38:01 +02:00
Thibault Delavallée e9f9bb5802 [FIX] email_template: when generating body containing the user's signature, add it as html as it is now pure html, not plaintext anymore. 2014-08-07 16:47:59 +02:00
Christophe Simonis f654a7719b [MERGE] forward port of branch saas-5 up to 73d39a0 2014-07-10 22:49:53 +02:00
Christophe Simonis a361947143 [MERGE] forward port of branch saas-3 up to a35aec2 2014-07-10 22:02:58 +02:00
Christophe Simonis a35aec2a0b [MERGE] forward port of branch 7.0 up to 6e96ffd 2014-07-10 22:02:01 +02:00
FalcoBolger e6b6392f3a FIX email_template: Update help from lang field leading to confusion while creating a template 2014-07-10 11:28:33 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Christophe Simonis 36f9af78aa [MERGE] forward port of branch saas-3 up to revid faace84 2014-06-01 10:56:39 +02:00
Christophe Simonis faace8493d [FIX] email_template: partners ids are integers, not strings 2014-06-01 10:52:02 +02:00
Christophe Simonis 7a7d7febf8 [MERGE] forward port of branch saas-3 up to revid 9429 chs@openerp.com-20140424123538-rxk9got9k2on1ki1
bzr revid: chs@openerp.com-20140424131824-4ksluvhnegp7kplb
bzr revid: chs@openerp.com-20140424134533-lhhcd32n3s0m9cqk
2014-04-24 15:45:33 +02:00
Denis Ledoux 2b2153bc39 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9991 revid:dle@openerp.com-20140417110435-u8uwwcf5ji1b54ao
bzr revid: dle@openerp.com-20140417112655-eeaiokbqzokpwx4i
2014-04-17 13:26:55 +02:00
Martin Trigaux 1ab962d338 [FIX] mail: convert attachments to binary as it is the expected format of message_post opw 604205
The double convertion (render_message and send_mail) is done to keep the API but should be changed in next version.

bzr revid: mat@openerp.com-20140415161441-q6pfueetvv0namgw
2014-04-15 18:14:41 +02:00
Thibault Delavallée 3eaeae55a0 [IMP] mail, mass_mailing: better recipientsz computation
for mass mailing, composer and template. This allows to have one method computing recipints
and avoid repetiting myself.

bzr revid: tde@openerp.com-20140415154700-zu2izvxfjq1k4h4a
2014-04-15 17:47:00 +02:00
Thibault Delavallée 272a7e5f80 [FIX] email_template: fixed error in default recipients calculation
bzr revid: tde@openerp.com-20140327141141-qe47tlnnfb5xt9s8
2014-03-27 15:11:41 +01:00
Thibault Delavallée 2dc0372431 [FIX] email_template: protect against possible non existent value
bzr revid: tde@openerp.com-20140325154006-fb5bu1khcvg6vdjb
2014-03-25 16:40:06 +01:00
Thibault Delavallée 8c270f9b87 [FIX] email_template: fixed iteration on a dict
bzr revid: tde@openerp.com-20140325142519-z3j1saqry9j23e0p
2014-03-25 15:25:19 +01:00
Thibault Delavallée 97d49659d0 [IMP] email_template: added an option to automatically generate
recipients instead of using template-based values. This should be the default way of using
templates actually, to avoid confusion with mako, ill-defined templates, ...

email_template code has been updated to handle recipient_ids when creating an email, depending
on its generated template values or default recipients.

mail_compose_message has also been updated, delegating the calculation of recipient when
having a template to the template itself, using some context keys to force the use
of partners instead of email_to and email_cc.

Also updated email_template form view to be a bit less confusing.

bzr revid: tde@openerp.com-20140325140324-bljvybigk3zv5ugm
2014-03-25 15:03:24 +01:00
Simon Lejeune 1c5a57a129 [FIX] email_template now use the new get_pdf method on the report model in order to avoid the blocking bug of generating a pdf with a public request.session
bzr revid: sle@openerp.com-20140319185350-5t8iuvnzikwfajei
2014-03-19 19:53:50 +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
Olivier Dony 9a3261da85 [IMP] email_template: allow extra builtins in rendering sandbox
bzr revid: odo@openerp.com-20140310102410-m66aa8164tekr51t
2014-03-10 11:24:10 +01:00
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 05fdc2290a [IMP] email_template: relocate url rewritign stuff directly into the rendering method.
bzr revid: tde@openerp.com-20140303104044-hgmii31ga6msf72z
2014-03-03 11:40:44 +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
Thibault Delavallée a17c09afff [IMP] [FIX] email_template: do not sanitize the template content.
Indeed its content may contain invalid html that could be stripped by the
sanitizer. The content generated based on the template will be sanitized
when stored in the mail_mail or mail_message body field, thus after
rendering.

bzr revid: tde@openerp.com-20140227144228-d275lxz6ryarkg4t
2014-02-27 15:42:28 +01:00
Thibault Delavallée b1f88d634d [IMP] [FIX] email_template: do not sanitize the template content.
Indeed its content may contain invalid html that could be stripped by the
sanitizer. The content generated based on the template will be sanitized
when stored in the mail_mail or mail_message body field, thus after
rendering.
The template therefore holds html, but that is not sanitized. But that's
still html, therefore using an html field.

bzr revid: tde@openerp.com-20140227134829-te8mxeakc3s96fun
2014-02-27 14:48:29 +01:00
openerp-sle 999050a9df [IMP] Email_template module now handles qweb-pdf report in mail attachment
bzr revid: openerp-sle@openerp-sle.home-20140212212259-sq7mpkt09a0t6v6d
2014-02-12 22:22:59 +01:00
Christophe Simonis c202dc1c52 merge upstream
bzr revid: chs@openerp.com-20140129190834-xfcat3ulfbg5omhn
2014-01-29 20:08:34 +01:00
Christophe Simonis 731019154a [MERGE] forward port of branch saas-2 up to revid 9109 dle@openerp.com-20140129171022-wf6244k90lpncmah
bzr revid: chs@openerp.com-20140129184703-ypd7iqnor5m5lr3d
2014-01-29 19:47:03 +01:00
Frédéric van der Essen 5585a38ecc [MERGE] from trunk, need point_of_sale updates
bzr revid: fva@openerp.com-20140127160946-yeswyv4o7t2tfbqt
2014-01-27 17:09:46 +01:00
Denis Ledoux 1fb1a6f2af [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9789 revid:dle@openerp.com-20140124120102-we2yxio553ws2yz4
bzr revid: dle@openerp.com-20140120174449-tui0a24zgn9bien2
bzr revid: dle@openerp.com-20140121125538-ke7i6kaz486hwgl8
bzr revid: dle@openerp.com-20140122134115-0ogjemlqe327xoac
bzr revid: dle@openerp.com-20140123103655-mf2zslfbgue97ed2
bzr revid: dle@openerp.com-20140124121027-uk9zy4dx9tqlsblr
2014-01-24 13:10:27 +01:00
Thibault Delavallée b845b708af [CLEAN] email_template: cleaned code
bzr revid: tde@openerp.com-20140124114743-m6s8d1byabl78l63
2014-01-24 12:47:43 +01:00
Turkesh Patel (Open ERP) 43ba81ad1b [IMP] use product.template model for templates
bzr revid: tpa@tinyerp.com-20140123134233-vp52fv0e047bbfgk
2014-01-23 19:12:33 +05:30
Martin Trigaux b25d08f917 [FIX] email_template: error message instead of traceback when sending an email from a user without user
bzr revid: mat@openerp.com-20140122094837-a0bkx2huqvkylniy
2014-01-22 10:48:37 +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
Thibault Delavallée 778de23d6f [IMP] email_template: body_html is now an html file, not a text file anymore.
Now that tools.mail.html_sanitize() has been detroyed, there is
no need anymore to keep this field as a text field.

bzr revid: tde@openerp.com-20140113092440-je3vpgohvljukjmn
2014-01-13 10:24:40 +01:00