[MERGE] forward port of branch 8.0 up to fc329b6

This commit is contained in:
Jeremy Kersten
2014-11-18 11:52:25 +01:00
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -276,7 +276,7 @@ class WebsiteForum(http.Controller):
if not request.session.uid:
return login_redirect()
post_tag_ids = forum.tag_to_write_vals(post.get('post_tags', False))
post_tag_ids = forum._tag_to_write_vals(post.get('post_tags', False))
new_question = request.env['forum.post'].create({
'forum_id': forum.id,
'name': post.get('post_name', ''),
@@ -336,7 +336,7 @@ class WebsiteForum(http.Controller):
@http.route('/forum/<model("forum.forum"):forum>/post/<model("forum.post"):post>/save', type='http', auth="user", methods=['POST'], website=True)
def post_save(self, forum, post, **kwargs):
post_tags = forum.tag_to_write_vals(kwargs.get('post_tag', ''))
post_tags = forum._tag_to_write_vals(kwargs.get('post_tag', ''))
vals = {
'tag_ids': post_tags,
'name': kwargs.get('post_name'),
+1 -1
View File
@@ -105,7 +105,7 @@ class Forum(models.Model):
return super(Forum, self.with_context(mail_create_nolog=True)).create(values)
@api.model
def tag_to_write_vals(self, tags=''):
def _tag_to_write_vals(self, tags=''):
User = self.env['res.users']
Tag = self.env['forum.tag']
post_tags = []
+1 -1
View File
@@ -87,7 +87,7 @@
{%- if show_copyright %}
<li>
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> <a href="https://odoo.com">{{ copyright }}</a>.{% endtrans %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> <a href="https://odoo.com">{{ copyright }}</a>{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright <a href="https://odoo.com">{{ copyright }}</a>.{% endtrans %}
{%- endif %}
+2 -2
View File
@@ -18,7 +18,7 @@ set of records of the same model.
Methods defined on a model are executed on a recordset, and their ``self`` is
a recordset::
class AModel(Model):
class AModel(models.Model):
_name = 'a.model'
def a_method(self):
# self can be anywhere between 0 records and all records in the
@@ -279,7 +279,7 @@ Creating Models
Model fields are defined as attributes on the model itself::
from openerp import models, fields
class AModel(Model):
class AModel(models.Model):
_name = 'a.model.name'
field1 = fields.Char()