diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index f9d0c2a6ca6..ca2f18011a3 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -172,7 +172,7 @@ class AccountMove(models.Model):
if self.user_has_groups('account.group_account_manager'):
lock_date = move.company_id.fiscalyear_lock_date
if move.date <= lock_date:
- raise UserError(_("You cannot add/modify entries prior to and inclusive of the lock date %s. Check the company settings or ask someone with the 'Adviser' role" % (lock_date)))
+ raise UserError(_("You cannot add/modify entries prior to and inclusive of the lock date %s. Check the company settings or ask someone with the 'Adviser' role") % (lock_date))
return True
@api.multi
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
index 7195170a86a..5ea2b0bfd23 100644
--- a/addons/account/models/account_payment.py
+++ b/addons/account/models/account_payment.py
@@ -118,7 +118,7 @@ class account_register_payments(models.TransientModel):
if not active_model or not active_ids:
raise UserError(_("Programmation error: wizard action executed without active_model or active_ids in context."))
if active_model != 'account.invoice':
- raise UserError(_("Programmation error: the expected model for this action is 'account.invoice'. The provided one is '%d'." % active_model))
+ raise UserError(_("Programmation error: the expected model for this action is 'account.invoice'. The provided one is '%d'.") % active_model)
# Checks on received invoice records
invoices = self.env[active_model].browse(active_ids)
diff --git a/addons/account_check_printing/account_journal.py b/addons/account_check_printing/account_journal.py
index 03ad48bd8cf..7470787d322 100644
--- a/addons/account_check_printing/account_journal.py
+++ b/addons/account_check_printing/account_journal.py
@@ -23,7 +23,7 @@ class AccountJournal(models.Model):
def _set_check_next_number(self):
if self.check_next_number < self.check_sequence_id.number_next_actual:
raise ValidationError(_("The last check number was %s. In order to avoid a check being rejected "
- "by the bank, you can only use a greater number." % self.check_sequence_id.number_next_actual))
+ "by the bank, you can only use a greater number.") % self.check_sequence_id.number_next_actual)
if self.check_sequence_id:
self.check_sequence_id.sudo().number_next_actual = self.check_next_number
diff --git a/addons/account_test/report/account_test_report.py b/addons/account_test/report/account_test_report.py
index 208fec8152a..16a06622c09 100644
--- a/addons/account_test/report/account_test_report.py
+++ b/addons/account_test/report/account_test_report.py
@@ -53,7 +53,7 @@ class ReportAssertAccount(models.AbstractModel):
return ', '.join(["%s: %s" % (tup[0], tup[1]) for tup in order_columns(item, column_order)])
else:
return item
- result = [_(_format(rec)) for rec in result]
+ result = [_format(rec) for rec in result]
return result
diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py
index 581a5d8f586..5ad6f8eea42 100644
--- a/addons/anonymization/anonymization.py
+++ b/addons/anonymization/anonymization.py
@@ -72,7 +72,7 @@ class ir_model_fields_anonymization(osv.osv):
if global_state == 'anonymized':
raise UserError(_("The database is currently anonymized, you cannot create, modify or delete fields."))
elif global_state == 'unstable':
- msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
+ msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized,"
" while some fields are not anonymized. You should try to solve this problem before trying to create, write or delete fields.")
raise UserError(msg)
@@ -339,7 +339,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# remove the placeholer:
eview.remove(placeholder)
else:
- msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
+ msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized,"
" while some fields are not anonymized. You should try to solve this problem before trying to do anything else.")
raise UserError(msg)
@@ -372,7 +372,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
if state == 'anonymized':
self._raise_after_history_update(cr, uid, history_id, _('Error !'), _("The database is currently anonymized, you cannot anonymize it again."))
elif state == 'unstable':
- msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
+ msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized,"
" while some fields are not anonymized. You should try to solve this problem before trying to do anything.")
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
@@ -509,7 +509,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
if state == 'clear':
raise UserError(_("The database is not currently anonymized, you cannot reverse the anonymization."))
elif state == 'unstable':
- msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized," + \
+ msg = _("The database anonymization is currently in an unstable state. Some fields are anonymized,"
" while some fields are not anonymized. You should try to solve this problem before trying to do anything.")
raise UserError(msg)
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index b508514617f..0092754e627 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -66,7 +66,7 @@ class AuthSignupHome(openerp.addons.web.controllers.main.Home):
qcontext['error'] = _("Could not reset your password")
_logger.exception('error when resetting password')
except Exception, e:
- qcontext['error'] = _(e.message)
+ qcontext['error'] = e.message
return request.render('auth_signup.reset_password', qcontext)
diff --git a/addons/barcodes/barcodes.py b/addons/barcodes/barcodes.py
index 9c17a1d5967..c2c8f910949 100644
--- a/addons/barcodes/barcodes.py
+++ b/addons/barcodes/barcodes.py
@@ -180,7 +180,7 @@ class barcode_rule(models.Model):
@api.model
def _encoding_selection_list(self):
return [
- ('any', 'Any'),
+ ('any', _('Any')),
('ean13', 'EAN-13'),
('ean8', 'EAN-8'),
('upca', 'UPC-A'),
diff --git a/addons/barcodes/i18n/barcodes.pot b/addons/barcodes/i18n/barcodes.pot
index 4d07aa7df22..5018c7b5270 100644
--- a/addons/barcodes/i18n/barcodes.pot
+++ b/addons/barcodes/i18n/barcodes.pot
@@ -72,6 +72,12 @@ msgstr ""
msgid "An internal identification of the barcode nomenclature"
msgstr ""
+#. module: barcodes
+#: code:addons/barcodes/barcodes.py:183
+#, python-format
+msgid "Any"
+msgstr ""
+
#. module: barcodes
#: model:ir.model.fields,field_description:barcodes.field_barcode_rule_barcode_nomenclature_id
#: model:ir.ui.view,arch_db:barcodes.view_barcode_nomenclature_form
diff --git a/addons/base_iban/base_iban.py b/addons/base_iban/base_iban.py
index 8468fa12f67..0877c264333 100644
--- a/addons/base_iban/base_iban.py
+++ b/addons/base_iban/base_iban.py
@@ -32,7 +32,7 @@ def validate_iban(iban):
iban_template = _map_iban_template[country_code]
if len(iban) != len(iban_template.replace(' ', '')):
raise ValidationError(_("The IBAN does not seem to be correct. You should have entered something like this %s\n"\
- "Where B = National bank code, S = Branch code, C = Account No, k = Check digit" % iban_template))
+ "Where B = National bank code, S = Branch code, C = Account No, k = Check digit") % iban_template)
check_chars = iban[4:] + iban[:4]
digits = int(''.join(str(int(char, 36)) for char in check_chars)) # BASE 36: 0..9,A..Z -> 0..35
diff --git a/addons/base_import_module/controllers/main.py b/addons/base_import_module/controllers/main.py
index 0d2cdc1ab5b..4b51e69f096 100644
--- a/addons/base_import_module/controllers/main.py
+++ b/addons/base_import_module/controllers/main.py
@@ -21,7 +21,7 @@ class ImportModule(Controller):
if not is_admin:
raise openerp.exceptions.AccessError("Only administrators can upload a module")
- @route('/base_import_module/login', type='http', auth='none', methods=['POST'])
+ @route('/base_import_module/login', type='http', auth='none', methods=['POST'], csrf=False)
@webservice
def login(self, login, password, db=None):
if db and db != request.db:
@@ -30,7 +30,9 @@ class ImportModule(Controller):
if not uid:
return Response(response="Wrong login/password", status=401)
self.check_user(uid)
- return "ok"
+ return Response(headers={
+ 'X-CSRF-TOKEN': request.csrf_token(),
+ })
@route('/base_import_module/upload', type='http', auth='user', methods=['POST'])
@webservice
diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py
index 887c6560618..9e1dcba46e4 100644
--- a/addons/base_vat/base_vat.py
+++ b/addons/base_vat/base_vat.py
@@ -108,7 +108,7 @@ class res_partner(osv.osv):
continue
vat_country, vat_number = self._split_vat(partner.vat)
if not check_func(cr, uid, vat_country, vat_number, context=context):
- _logger.info(_("Importing VAT Number [%s] is not valid !" % vat_number))
+ _logger.info("Importing VAT Number [%s] is not valid !", vat_number)
return False
return True
diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py
index 63e0032b006..43d82efb40e 100644
--- a/addons/calendar/calendar.py
+++ b/addons/calendar/calendar.py
@@ -260,7 +260,7 @@ class calendar_attendee(osv.Model):
meeting_obj = self.pool['calendar.event']
res = self.write(cr, uid, ids, {'state': 'accepted'}, context)
for attendee in self.browse(cr, uid, ids, context=context):
- meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has accepted invitation") % (attendee.cn)),
+ meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_("%s has accepted invitation") % (attendee.cn),
subtype="calendar.subtype_invitation", context=context)
return res
@@ -275,7 +275,7 @@ class calendar_attendee(osv.Model):
meeting_obj = self.pool['calendar.event']
res = self.write(cr, uid, ids, {'state': 'declined'}, context)
for attendee in self.browse(cr, uid, ids, context=context):
- meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has declined invitation") % (attendee.cn)), subtype="calendar.subtype_invitation", context=context)
+ meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_("%s has declined invitation") % (attendee.cn), subtype="calendar.subtype_invitation", context=context)
return res
def create(self, cr, uid, vals, context=None):
diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py
index 2f2772b06c1..9662cccfe5e 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -737,11 +737,11 @@ class gamification_challenge(osv.Model):
if challenge_ended:
# open chatter message
- message_body = _("The challenge %s is finished." % challenge.name)
+ message_body = _("The challenge %s is finished.") % challenge.name
if rewarded_users:
user_names = self.pool['res.users'].name_get(cr, uid, rewarded_users, context=context)
- message_body += _(" Reward (badge %s) for every succeeding user was sent to %s." % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names])))
+ message_body += _(" Reward (badge %s) for every succeeding user was sent to %s.") % (challenge.reward_id.name, ", ".join([name for (user_id, name) in user_names]))
else:
message_body += _(" Nobody has succeeded to reach every goal, no badge is rewarded for this challenge.")
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py
index af4208809ac..fc912b5f872 100644
--- a/addons/gamification/models/goal.py
+++ b/addons/gamification/models/goal.py
@@ -130,7 +130,7 @@ class gamification_goal_definition(osv.Model):
obj.search(cr, uid, domain, context=context, count=True)
except (ValueError, SyntaxError), e:
msg = e.message or (e.msg + '\n' + e.text)
- raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s" % (definition.name, msg)))
+ raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s") % (definition.name, msg))
return True
def create(self, cr, uid, vals, context=None):
diff --git a/addons/google_account/google_account.py b/addons/google_account/google_account.py
index 53c02e08ad3..9142dc67638 100644
--- a/addons/google_account/google_account.py
+++ b/addons/google_account/google_account.py
@@ -34,8 +34,8 @@ class google_service(osv.osv_memory):
req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers)
content = urllib2.urlopen(req, timeout=TIMEOUT).read()
except urllib2.HTTPError:
- error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired"
- raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
+ error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired")
+ raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context)
content = json.loads(content)
return content.get('refresh_token')
@@ -95,8 +95,8 @@ class google_service(osv.osv_memory):
st, res, ask_time = self._do_request(cr, uid, uri, params=data, headers=headers, type='POST', preuri='', context=context)
except urllib2.HTTPError:
- error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid"
- raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
+ error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid")
+ raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context)
return res
def _refresh_google_token_json(self, cr, uid, refresh_token, service, context=None): # exchange_AUTHORIZATION vs Token (service = calendar)
@@ -125,8 +125,8 @@ class google_service(osv.osv_memory):
self.pool['res.users'].write(cur, uid, [uid], {'google_%s_rtoken' % service: False}, context=context)
error_key = json.loads(e.read()).get("error", "nc")
_logger.exception("Bad google request : %s !" % error_key)
- error_msg = "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]" % error_key
- raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
+ error_msg = _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]") % error_key
+ raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context)
return res
def _do_request(self, cr, uid, uri, params={}, headers={}, type='POST', preuri="https://www.googleapis.com", context=None):
diff --git a/addons/google_account/i18n/google_account.pot b/addons/google_account/i18n/google_account.pot
index ed9115b97e1..459efa8553a 100644
--- a/addons/google_account/i18n/google_account.pot
+++ b/addons/google_account/i18n/google_account.pot
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 9.0\n"
+"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-09-07 14:40+0000\n"
-"PO-Revision-Date: 2015-09-07 14:40+0000\n"
+"POT-Creation-Date: 2016-01-13 13:41+0000\n"
+"PO-Revision-Date: 2016-01-13 13:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -50,6 +50,24 @@ msgstr ""
msgid "Last Updated on"
msgstr ""
+#. module: google_account
+#: code:addons/google_account/google_account.py:98
+#, python-format
+msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid"
+msgstr ""
+
+#. module: google_account
+#: code:addons/google_account/google_account.py:37
+#, python-format
+msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired"
+msgstr ""
+
+#. module: google_account
+#: code:addons/google_account/google_account.py:128
+#, python-format
+msgid "Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired [%s]"
+msgstr ""
+
#. module: google_account
#: code:addons/google_account/google_account.py:173
#, python-format
diff --git a/addons/google_calendar/google_calendar.py b/addons/google_calendar/google_calendar.py
index 33acda6b82d..2d444c41b10 100644
--- a/addons/google_calendar/google_calendar.py
+++ b/addons/google_calendar/google_calendar.py
@@ -295,13 +295,13 @@ class google_calendar(osv.AbstractModel):
st, content, ask_time = self.pool['google.service']._do_request(cr, uid, url, params, headers, type='GET', context=context)
except urllib2.HTTPError, e:
if e.code == 401: # Token invalid / Acces unauthorized
- error_msg = "Your token is invalid or has been revoked !"
+ error_msg = _("Your token is invalid or has been revoked !")
registry = openerp.modules.registry.RegistryManager.get(request.session.db)
with registry.cursor() as cur:
self.pool['res.users'].write(cur, SUPERUSER_ID, [uid], {'google_calendar_token': False, 'google_calendar_token_validity': False}, context=context)
- raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
+ raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context)
raise
return (status_response(st), content['id'] or False, ask_time)
@@ -699,8 +699,8 @@ class google_calendar(osv.AbstractModel):
self.pool['res.users'].write(cur, SUPERUSER_ID, [uid], {'google_calendar_last_sync_date': False}, context=context)
error_key = json.loads(str(e))
error_key = error_key.get('error', {}).get('message', 'nc')
- error_msg = "Google is lost... the next synchro will be a full synchro. \n\n %s" % error_key
- raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
+ error_msg = _("Google is lost... the next synchro will be a full synchro. \n\n %s") % error_key
+ raise self.pool.get('res.config.settings').get_config_warning(cr, error_msg, context=context)
my_google_att_ids = att_obj.search(cr, uid, [
('partner_id', '=', myPartnerID),
diff --git a/addons/hr_expense/models/account_move_line.py b/addons/hr_expense/models/account_move_line.py
index bf408105b5a..f7e24f65277 100644
--- a/addons/hr_expense/models/account_move_line.py
+++ b/addons/hr_expense/models/account_move_line.py
@@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import api, models
-
+from openerp.tools import float_compare
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
@@ -10,7 +10,7 @@ class AccountMoveLine(models.Model):
@api.multi
def reconcile(self, writeoff_acc_id=False, writeoff_journal_id=False):
res = super(AccountMoveLine, self).reconcile(writeoff_acc_id=writeoff_acc_id, writeoff_journal_id=writeoff_journal_id)
- account_move_ids = [l.move_id.id for l in self if l.move_id.matched_percentage == 1]
+ account_move_ids = [l.move_id.id for l in self if float_compare(l.move_id.matched_percentage, 1, precision_digits=5) == 0]
if account_move_ids:
expenses = self.env['hr.expense'].search([('account_move_id', 'in', account_move_ids)])
expenses.paid_expenses()
diff --git a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
index 99621c03b3e..8d00b412eae 100644
--- a/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
+++ b/addons/hr_timesheet_sheet/i18n/hr_timesheet_sheet.pot
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 9.0\n"
+"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-09-18 08:11+0000\n"
-"PO-Revision-Date: 2015-09-18 08:11+0000\n"
+"POT-Creation-Date: 2016-01-13 10:41+0000\n"
+"PO-Revision-Date: 2016-01-13 10:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -368,11 +368,6 @@ msgstr ""
msgid "Messages"
msgstr ""
-#. module: hr_timesheet_sheet
-#: model:ir.model.fields,help:hr_timesheet_sheet.field_hr_timesheet_sheet_sheet_message_ids
-msgid "Messages and communication history"
-msgstr ""
-
#. module: hr_timesheet_sheet
#: selection:res.company,timesheet_range:0
msgid "Month"
@@ -390,6 +385,12 @@ msgstr ""
msgid "My Timesheet opens your timesheet so that you can book your activities into the system. From the same form, you can register your attendances (Sign In/Out) and describe the working hours made on the different projects. At the end of the period defined in the company, the timesheet is confirmed by the user and can be validated by his manager. If required, as defined on the project, you can generate the invoices based on the timesheet."
msgstr ""
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_my_timesheets
+#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_act_hr_timesheet_sheet_my_timesheets
+msgid "My Timesheets"
+msgstr ""
+
#. module: hr_timesheet_sheet
#: selection:hr.timesheet.report,state:0
#: selection:hr_timesheet_sheet.sheet,state:0
@@ -610,6 +611,7 @@ msgstr ""
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_form
+#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_my_timesheets
msgid "Timesheets can also be invoiced to customers, depending on the\n"
" configuration of each project's related contract."
msgstr ""
@@ -759,26 +761,27 @@ msgid "You cannot have 2 timesheets that overlap!\n"
msgstr ""
#. module: hr_timesheet_sheet
-#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:66
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:72
#, python-format
msgid "You cannot have 2 timesheets that overlap!\n"
"You should use the menu 'My Timesheet' to avoid this problem."
msgstr ""
#. module: hr_timesheet_sheet
-#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:480
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:494
#, python-format
msgid "You cannot modify an entry in a confirmed timesheet"
msgstr ""
#. module: hr_timesheet_sheet
-#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:343
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:353
#, python-format
msgid "You cannot modify an entry in a confirmed timesheet."
msgstr ""
#. module: hr_timesheet_sheet
#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_form
+#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_my_timesheets
msgid "You must record timesheets every day and confirm at the end\n"
" of the week. Once the timesheet is confirmed, it should be\n"
" validated by a manager."
@@ -796,6 +799,11 @@ msgstr ""
msgid "hr.timesheet.current.open"
msgstr ""
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_my_timesheets
+msgid "new timesheet."
+msgstr ""
+
#. module: hr_timesheet_sheet
#: model:ir.ui.view,arch_db:hr_timesheet_sheet.hr_timesheet_sheet_form
msgid "to"
diff --git a/addons/mail/i18n/mail.pot b/addons/mail/i18n/mail.pot
index fae4c77ded0..69aaafebfb2 100644
--- a/addons/mail/i18n/mail.pot
+++ b/addons/mail/i18n/mail.pot
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-12-10 13:38+0000\n"
-"PO-Revision-Date: 2015-12-10 13:38+0000\n"
+"POT-Creation-Date: 2016-01-13 14:27+0000\n"
+"PO-Revision-Date: 2016-01-13 14:27+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -41,7 +41,7 @@ msgid "\n"
" % endif\n"
"\n"
" % if not ctx.get('button_access') and not ctx.get('button_follow') and not ctx.get('button_unfollow') and ctx.get('model_name'):\n"
-"
-
+
diff --git a/addons/web_editor/static/src/js/rte.js b/addons/web_editor/static/src/js/rte.js
index 85721ba0387..becaf978d17 100644
--- a/addons/web_editor/static/src/js/rte.js
+++ b/addons/web_editor/static/src/js/rte.js
@@ -513,13 +513,21 @@ var RTE = Widget.extend({
}
if ($target.is('a')) {
+ // add contenteditable on link to improve its editing behaviour
$target.attr('contenteditable', true);
setTimeout(function () {
$editable.attr('contenteditable', false);
});
- } else if ($editable.attr('contenteditable') === 'false') {
- $target.removeAttr('contenteditable');
- $editable.attr('contenteditable', true);
+ // once clicked outside, remove contenteditable on link
+ var reactive_editable = function(e){
+ if($target.is(e.target)) {
+ return;
+ }
+ $target.removeAttr('contenteditable');
+ $editable.attr('contenteditable', true);
+ $(document).off('mousedown', reactive_editable);
+ }
+ $(document).on('mousedown', reactive_editable);
}
if (this && this.$last && (!$editable.size() || this.$last[0] != $editable[0])) {
diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js
index 01020a84c22..094d13340dc 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -764,7 +764,7 @@ eventHandler.attach = function (oLayoutInfo, options) {
.add(oLayoutInfo.handle())
.add(oLayoutInfo.popover())
.add(custom_toolbar)
- .on('click keyup', function () {
+ .on('click content_changed', function () {
$('button[data-event="undo"]', $toolbar).attr('disabled', !oLayoutInfo.editable().data('NoteHistory').hasUndo());
$('button[data-event="redo"]', $toolbar).attr('disabled', !oLayoutInfo.editable().data('NoteHistory').hasRedo());
});
diff --git a/addons/website/models/website.py b/addons/website/models/website.py
index 194fa73f9be..1e598b9a937 100644
--- a/addons/website/models/website.py
+++ b/addons/website/models/website.py
@@ -300,12 +300,12 @@ class website(osv.osv):
for page in View.browse(cr, uid, pages, context=context):
if page.page:
dep[page_key].append({
- 'text': _('Page %s seems to have a link to this page !' % page.key),
+ 'text': _('Page %s seems to have a link to this page !') % page.key,
'link': '/page/%s' % page.key
})
else:
dep[page_key].append({
- 'text': _('Template %s (id:%s) seems to have a link to this page !' % (page.key, page.id)),
+ 'text': _('Template %s (id:%s) seems to have a link to this page !') % (page.key, page.id),
'link': '#'
})
@@ -321,7 +321,7 @@ class website(osv.osv):
dep[menu_key] = []
for menu in Menu.browse(cr, uid, menus, context=context):
dep[menu_key].append({
- 'text': _('Menu %s seems to have a link to this page !' % menu.name),
+ 'text': _('Menu %s seems to have a link to this page !') % menu.name,
'link': False
})
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 6015f740301..0da262f145e 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -326,7 +326,9 @@ options.registry.marginAndResize = options.Class.extend({
$body.removeClass(cursor);
setTimeout(function () {
self.buildingBlock.editor_busy = false;
- self.$target.closest(".o_editable").trigger("content_changed");
+ if (begin !== current) {
+ self.buildingBlock.parent.rte.historyRecordUndo(self.$target, 'resize_' + XY);
+ }
},0);
self.$target.removeClass("resize_editor_busy");
};
@@ -336,8 +338,8 @@ options.registry.marginAndResize = options.Class.extend({
this.$overlay.find(".oe_handle.size .auto_size").on('click', function (event){
self.$target.css("height", "");
self.$target.css("overflow", "");
+ self.buildingBlock.parent.rte.historyRecordUndo(self.$target, 'resize_Y');
self.buildingBlock.cover_target(self.$overlay, self.$target);
- self.$target.closest(".o_editable").trigger("content_changed");
return false;
});
},
diff --git a/addons/website_blog/models/website_blog.py b/addons/website_blog/models/website_blog.py
index cb2743b9652..d3d8569a3b1 100644
--- a/addons/website_blog/models/website_blog.py
+++ b/addons/website_blog/models/website_blog.py
@@ -289,7 +289,7 @@ class Website(osv.Model):
dep[page_key] = []
for p in post_obj.browse(cr, uid, posts, context=context):
dep[page_key].append({
- 'text': _('Blog Post %s seems to have a link to this page !' % p.name),
+ 'text': _('Blog Post %s seems to have a link to this page !') % p.name,
'link': p.website_url
})
diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py
index 629cf0e125f..91569312d10 100644
--- a/addons/website_forum/models/forum.py
+++ b/addons/website_forum/models/forum.py
@@ -137,13 +137,7 @@ class Forum(models.Model):
if (self.default_post_type == 'question' and not self.allow_question) \
or (self.default_post_type == 'discussion' and not self.allow_discussion) \
or (self.default_post_type == 'link' and not self.allow_link):
- raise UserError(_('You cannot choose %s as default post since the forum does not allow it.' % self.default_post_type))
-
- @api.one
- @api.constrains('allow_link', 'allow_question', 'allow_discussion', 'default_post_type')
- def _check_default_post_type(self):
- if self.default_post_type == 'link' and not self.allow_link or self.default_post_type == 'question' and not self.allow_question or self.default_post_type == 'discussion' and not self.allow_discussion:
- raise Warning(_('Post type in "Default post" must be activated'))
+ raise UserError(_('You cannot choose %s as default post since the forum does not allow it.') % self.default_post_type)
@api.one
def _compute_count_posts_waiting_validation(self):
@@ -380,7 +374,7 @@ class Post(models.Model):
if (self.post_type == 'question' and not self.forum_id.allow_question) \
or (self.post_type == 'discussion' and not self.forum_id.allow_discussion) \
or (self.post_type == 'link' and not self.forum_id.allow_link):
- raise UserError(_('This forum does not allow %s' % self.post_type))
+ raise UserError(_('This forum does not allow %s') % self.post_type)
def _update_content(self, content, forum_id):
forum = self.env['forum.forum'].browse(forum_id)
@@ -479,26 +473,20 @@ class Post(models.Model):
base_url = self.env['ir.config_parameter'].get_param('web.base.url')
for post in self:
if post.state == 'active' and post.parent_id:
- body = _(
- '
') % \
+ (post.name, post.forum_id.name, base_url, slug(post.forum_id), slug(post))
post.message_post(subject=post.name, body=body, subtype='website_forum.mt_question_new')
elif post.state == 'pending' and not post.parent_id:
# TDE FIXME: in master, you should probably use a subtype;
# however here we remove subtype but set partner_ids
partners = post.sudo().message_partner_ids.filtered(lambda partner: partner.user_ids and partner.user_ids.karma >= post.forum_id.karma_moderate)
note_subtype = self.sudo().env.ref('mail.mt_note')
- body = _(
- '