[MERGE] forward port branch 10.0 up to 633a65d231
This commit is contained in:
@@ -525,7 +525,7 @@ class Escpos:
|
|||||||
# https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444
|
# https://github.com/python-escpos/python-escpos/pull/98/files#diff-a0b1df12c7c67e38915adbe469051e2dR444
|
||||||
self._raw('\x00')
|
self._raw('\x00')
|
||||||
else:
|
else:
|
||||||
raise exception.BarcodeCodeError()
|
raise BarcodeCodeError()
|
||||||
|
|
||||||
def receipt(self,xml):
|
def receipt(self,xml):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ class Post(models.Model):
|
|||||||
self.env.user.sudo().add_karma(post.forum_id.karma_gen_answer_accept * mult)
|
self.env.user.sudo().add_karma(post.forum_id.karma_gen_answer_accept * mult)
|
||||||
if 'tag_ids' in vals:
|
if 'tag_ids' in vals:
|
||||||
tag_ids = set(tag.get('id') for tag in self.resolve_2many_commands('tag_ids', vals['tag_ids']))
|
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.'))
|
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):
|
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.')
|
raise KarmaError('Not enough karma to edit a post.')
|
||||||
|
|||||||
@@ -620,7 +620,7 @@
|
|||||||
<div t-if="not is_answer">
|
<div t-if="not is_answer">
|
||||||
<br/>
|
<br/>
|
||||||
<input type="hidden" name="karma_edit_retag" t-attf-value="#{forum.karma_edit_retag}" id="karma_edit_retag"/>
|
<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 < forum.karma_edit_retag" t-att-title="'You need to have sufficient karma to edit tags' if user.karma < forum.karma_edit_retag else ''"/>
|
||||||
<br/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary btn-lg">Save</button>
|
<button type="submit" class="btn btn-primary btn-lg">Save</button>
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ Use the following pattern :
|
|||||||
*concerned_group* is the short name of the concerned group ('user'
|
*concerned_group* is the short name of the concerned group ('user'
|
||||||
for the 'model_name_group_user', 'public' for public user, 'company'
|
for the 'model_name_group_user', 'public' for public user, 'company'
|
||||||
for multi-company rules, ...).
|
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
|
.. code-block:: xml
|
||||||
|
|
||||||
|
|||||||
@@ -496,6 +496,7 @@ class IrTranslation(models.Model):
|
|||||||
discarded += trans
|
discarded += trans
|
||||||
else:
|
else:
|
||||||
trans.write({'src': matches[0], 'state': trans.state})
|
trans.write({'src': matches[0], 'state': trans.state})
|
||||||
|
trans_src.append(matches[0]) # avoid reuse of term
|
||||||
else:
|
else:
|
||||||
outdated += trans
|
outdated += trans
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user