[MERGE] forward port branch saas-14 up to 7f7b705236

This commit is contained in:
Christophe Simonis
2018-07-17 16:37:07 +02:00
5 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -525,7 +525,7 @@ class Escpos:
# https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444
self._raw('\x00')
else:
raise exception.BarcodeCodeError()
raise BarcodeCodeError()
def receipt(self,xml):
"""
+1 -1
View File
@@ -502,7 +502,7 @@ class Post(models.Model):
self.env.user.sudo().add_karma(post.forum_id.karma_gen_answer_accept * mult)
if 'tag_ids' in vals:
tag_ids = set(tag.get('id') for tag in self.resolve_2many_commands('tag_ids', vals['tag_ids']))
if any(set(post.tag_ids) != tag_ids for post in self) and any(self.env.user.karma < post.forum_id.karma_edit_retag for post in self):
if any(set(post.tag_ids.ids) != tag_ids for post in self) and any(self.env.user.karma < post.forum_id.karma_edit_retag for post in self):
raise KarmaError(_('Not enough karma to retag.'))
if any(key not in trusted_keys for key in vals) and any(not post.can_edit for post in self):
raise KarmaError('Not enough karma to edit a post.')
+1 -1
View File
@@ -620,7 +620,7 @@
<div t-if="not is_answer">
<br/>
<input type="hidden" name="karma_edit_retag" t-attf-value="#{forum.karma_edit_retag}" id="karma_edit_retag"/>
<input type="text" name="post_tags" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}" value="Tags"/>
<input type="text" name="post_tags" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}" value="Tags" t-att-readonly="user.karma &lt; forum.karma_edit_retag" t-att-title="'You need to have sufficient karma to edit tags' if user.karma &lt; forum.karma_edit_retag else ''"/>
<br/>
</div>
<button type="submit" class="btn btn-primary btn-lg">Save</button>
-1
View File
@@ -211,7 +211,6 @@ Use the following pattern :
*concerned_group* is the short name of the concerned group ('user'
for the 'model_name_group_user', 'public' for public user, 'company'
for multi-company rules, ...).
* For a group : :samp:`{<model_name>}_group_{<group_name>}` where *group_name* is the name of the group, generally 'user', 'manager', ...
.. code-block:: xml
+1
View File
@@ -476,6 +476,7 @@ class IrTranslation(models.Model):
discarded += trans
else:
trans.write({'src': matches[0], 'state': trans.state})
trans_src.append(matches[0]) # avoid reuse of term
else:
outdated += trans