summaryrefslogtreecommitdiff
path: root/addons/website_mail
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-07-06 16:44:26 +0200
committerAntony Lesuisse <al@openerp.com>2014-07-06 17:05:41 +0200
commitcbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 (patch)
treed6ff62b719fce32392397783c961b734b1e4c50e /addons/website_mail
parentd78192c489d3be66cd6487b39f5ce7ba4733a187 (diff)
[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
Diffstat (limited to 'addons/website_mail')
-rw-r--r--addons/website_mail/controllers/email_designer.py2
-rw-r--r--addons/website_mail/models/mail_message.py2
-rw-r--r--addons/website_mail/models/mail_thread.py5
3 files changed, 2 insertions, 7 deletions
diff --git a/addons/website_mail/controllers/email_designer.py b/addons/website_mail/controllers/email_designer.py
index a9462f7be7d..0a3e1043fad 100644
--- a/addons/website_mail/controllers/email_designer.py
+++ b/addons/website_mail/controllers/email_designer.py
@@ -17,6 +17,7 @@ class WebsiteEmailDesigner(http.Controller):
'email' not in model_cols and 'email_from' not in model_cols or \
'name' not in model_cols and 'subject' not in model_cols:
return request.redirect('/')
+ res_id = int(res_id)
obj_ids = request.registry[model].exists(request.cr, request.uid, [res_id], context=request.context)
if not obj_ids:
return request.redirect('/')
@@ -33,7 +34,6 @@ class WebsiteEmailDesigner(http.Controller):
body_field = 'body_html'
cr, uid, context = request.cr, request.uid, request.context
- res_id = int(res_id)
record = request.registry[model].browse(cr, uid, res_id, context=context)
values = {
diff --git a/addons/website_mail/models/mail_message.py b/addons/website_mail/models/mail_message.py
index cff950f2962..4206872199c 100644
--- a/addons/website_mail/models/mail_message.py
+++ b/addons/website_mail/models/mail_message.py
@@ -43,7 +43,7 @@ class MailMessage(osv.Model):
help='Message description: either the subject, or the beginning of the body'
),
'website_published': fields.boolean(
- 'Published', help="Visible on the website as a comment"
+ 'Published', help="Visible on the website as a comment", copy=False,
),
}
diff --git a/addons/website_mail/models/mail_thread.py b/addons/website_mail/models/mail_thread.py
index bea9178a335..cb19b52cf66 100644
--- a/addons/website_mail/models/mail_thread.py
+++ b/addons/website_mail/models/mail_thread.py
@@ -36,8 +36,3 @@ class MailThread(osv.AbstractModel):
),
}
- def copy(self, cr, uid, id, default=None, context=None):
- if default is None:
- default = {}
- default['website_message_ids'] = []
- return super(MailThread, self).copy(cr, uid, id, default=default, context=context) \ No newline at end of file