diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 70cf415b555..835283ef71b 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -522,7 +522,7 @@ class AccountInvoice(models.Model):
@api.multi
def get_formview_id(self):
""" Update form view id of action to open the invoice """
- if self.type == 'in_invoice':
+ if self.type in ('in_invoice', 'in_refund'):
return self.env.ref('account.invoice_supplier_form').id
else:
return self.env.ref('account.invoice_form').id
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 36c91d66892..028f6b2dabd 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -830,7 +830,14 @@ class AccountMoveLine(models.Model):
#if writeoff_acc_id specified, then create write-off move with value the remaining amount from move in self
if writeoff_acc_id and writeoff_journal_id and remaining_moves:
- writeoff_to_reconcile = remaining_moves._create_writeoff({'account_id': writeoff_acc_id.id, 'journal_id': writeoff_journal_id.id})
+ all_aml_share_same_currency = all([x.currency_id == self[0].currency_id for x in self])
+ writeoff_vals = {
+ 'account_id': writeoff_acc_id.id,
+ 'journal_id': writeoff_journal_id.id
+ }
+ if not all_aml_share_same_currency:
+ writeoff_vals['amount_currency'] = False
+ writeoff_to_reconcile = remaining_moves._create_writeoff(writeoff_vals)
#add writeoff line to reconcile algo and finish the reconciliation
remaining_moves = (remaining_moves + writeoff_to_reconcile).auto_reconcile_lines()
diff --git a/addons/calendar/calendar_data.xml b/addons/calendar/calendar_data.xml
index 772f6772971..d02c1028745 100644
--- a/addons/calendar/calendar_data.xml
+++ b/addons/calendar/calendar_data.xml
@@ -118,12 +118,12 @@
- ${object.event_id.get_interval(object.event_id.start, 'dayname', tz=object.partner_id.tz)}
+ ${object.event_id.get_interval(object.event_id.start, 'dayname', tz=object.partner_id.tz if not object.event_id.allday else None)}
- ${object.event_id.get_interval(object.event_id.start,'day', tz=object.partner_id.tz)}
+ ${object.event_id.get_interval(object.event_id.start,'day', tz=object.partner_id.tz if not object.event_id.allday else None)}
-
+
diff --git a/addons/crm/base_partner_merge.py b/addons/crm/base_partner_merge.py
index 8baf69a5a7a..95ad18f044f 100644
--- a/addons/crm/base_partner_merge.py
+++ b/addons/crm/base_partner_merge.py
@@ -306,7 +306,7 @@ class MergePartnerAutomatic(osv.TransientModel):
for partner_id in partner_ids:
child_ids = child_ids.union(set(proxy.search(cr, uid, [('id', 'child_of', [partner_id])])) - set([partner_id]))
if set(partner_ids).intersection(child_ids):
- raise osv.except_osv(_('Error'), _("You cannot merge a contact with one of his parent."))
+ raise UserError(_("You cannot merge a contact with one of his parent."))
if openerp.SUPERUSER_ID != uid and len(set(partner.email for partner in proxy.browse(cr, uid, partner_ids, context=context))) > 1:
raise UserError(_("All contacts must have the same email. Only the Administrator can merge contacts with different emails."))
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 37caaa08f12..39ed64567ee 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -460,11 +460,11 @@ class crm_lead(format_address, osv.osv):
value = dict(key).get(lead[field_name], lead[field_name])
elif field.type == 'many2one':
if lead[field_name]:
- value = lead[field_name].name_get()[0][1]
+ value = lead[field_name].sudo().name_get()[0][1]
elif field.type == 'many2many':
if lead[field_name]:
for val in lead[field_name]:
- field_value = val.name_get()[0][1]
+ field_value = val.sudo().name_get()[0][1]
value += field_value + ","
else:
value = lead[field_name]
diff --git a/addons/crm_partner_assign/security/ir.model.access.csv b/addons/crm_partner_assign/security/ir.model.access.csv
index e0b29587ff4..3f39d776ddc 100644
--- a/addons/crm_partner_assign/security/ir.model.access.csv
+++ b/addons/crm_partner_assign/security/ir.model.access.csv
@@ -3,6 +3,8 @@ access_ crm_lead_report_assign,crm.lead.report.assign,model_crm_lead_report_assi
access_ crm_lead_report_assign_all,crm.lead.report.assign.all,model_crm_lead_report_assign,base.group_user,1,0,0,0
access_crm_partner_report,crm.partner.report.assign.all,model_crm_partner_report_assign,base.group_sale_salesman,1,0,0,0
access_res_partner_grade,res.partner.grade,model_res_partner_grade,base.group_sale_salesman,1,1,1,0
+access_res_partner_grade_employee,res.partner.grade,model_res_partner_grade,base.group_user,1,0,0,0
+access_res_partner_grade_portal,res.partner.grade,model_res_partner_grade,base.group_portal,1,0,0,0
access_res_partner_grade_public,res.partner.grade,model_res_partner_grade,base.group_public,1,0,0,0
access_res_partner_grade_manager,res.partner.grade.manager,model_res_partner_grade,base.group_sale_manager,1,1,1,1
access_res_partner_activation_user,res.partner.activation.user,model_res_partner_activation,base.group_user,1,0,0,0
diff --git a/addons/gamification/models/goal.py b/addons/gamification/models/goal.py
index 557a2811609..a219d7ddc01 100644
--- a/addons/gamification/models/goal.py
+++ b/addons/gamification/models/goal.py
@@ -129,18 +129,36 @@ class gamification_goal_definition(osv.Model):
raise UserError(_("The domain for the definition %s seems incorrect, please check it.\n\n%s") % (definition.name, msg))
return True
+ def _check_model_validity(self, cr, uid, ids, context=None):
+ """ make sure the selected field and model are usable"""
+ for definition in self.browse(cr, uid, ids, context=context):
+ try:
+ if not definition.model_id or not definition.field_id:
+ continue
+
+ model = self.pool[definition.model_id.model]
+ field = model._fields[definition.field_id.name]
+ if not field.store:
+ raise UserError(
+ _("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not stored") % (definition.name, definition.field_id.name))
+ except KeyError, e:
+ raise UserError(
+ _("The model configuration for the definition %s seems incorrect, please check it.\n\n%s not found") % (definition.name, e.message))
+
def create(self, cr, uid, vals, context=None):
res_id = super(gamification_goal_definition, self).create(cr, uid, vals, context=context)
if vals.get('computation_mode') in ('count', 'sum'):
self._check_domain_validity(cr, uid, [res_id], context=context)
-
+ if vals.get('field_id'):
+ self._check_model_validity(cr, uid, [res_id], context=context)
return res_id
def write(self, cr, uid, ids, vals, context=None):
res = super(gamification_goal_definition, self).write(cr, uid, ids, vals, context=context)
if vals.get('computation_mode', 'count') in ('count', 'sum') and (vals.get('domain') or vals.get('model_id')):
self._check_domain_validity(cr, uid, ids, context=context)
-
+ if vals.get('field_id') or vals.get('model_id') or vals.get('batch_mode'):
+ self._check_model_validity(cr, uid, ids, context=context)
return res
def on_change_model_id(self, cr, uid, ids, model_id, context=None):
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 91867143890..1001bb6e8e6 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -567,14 +567,14 @@ class hr_employee(osv.Model):
# Find for holidays status
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
if len(status_ids) != 1 :
- raise osv.except_osv(_('Warning!'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
+ raise UserError(_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
status_id = status_ids and status_ids[0] or False
if not status_id:
return False
if diff > 0:
leave_id = holiday_obj.create(cr, uid, {'name': _('Allocation for %s') % employee.name, 'employee_id': employee.id, 'holiday_status_id': status_id, 'type': 'add', 'holiday_type': 'employee', 'number_of_days_temp': diff}, context=context)
elif diff < 0:
- raise osv.except_osv(_('Warning!'), _('You cannot reduce validated allocation requests'))
+ raise UserError(_('You cannot reduce validated allocation requests'))
else:
return False
for sig in ('confirm', 'validate', 'second_validate'):
diff --git a/addons/hr_payroll/report/report_payslip_details.py b/addons/hr_payroll/report/report_payslip_details.py
index f5858f8e7ef..5cc1af7ba65 100644
--- a/addons/hr_payroll/report/report_payslip_details.py
+++ b/addons/hr_payroll/report/report_payslip_details.py
@@ -18,13 +18,16 @@ class payslip_details_report(report_sxw.rml_parse):
payslip_line = self.pool.get('hr.payslip.line')
rule_cate_obj = self.pool.get('hr.salary.rule.category')
- def get_recursive_parent(rule_categories):
- if not rule_categories:
- return []
- if rule_categories[0].parent_id:
- rule_categories = rule_categories[0].parent_id | rule_categories
- get_recursive_parent(rule_categories)
- return rule_categories
+ def get_recursive_parent(current_rule_category, rule_categories = None):
+ if rule_categories:
+ rule_categories = current_rule_category | rule_categories
+ else:
+ rule_categories = current_rule_category
+
+ if current_rule_category.parent_id:
+ return get_recursive_parent(current_rule_category.parent_id, rule_categories)
+ else:
+ return rule_categories
res = []
result = {}
diff --git a/addons/im_livechat/i18n/im_livechat.pot b/addons/im_livechat/i18n/im_livechat.pot
index 724c5cb037d..27b293522f4 100644
--- a/addons/im_livechat/i18n/im_livechat.pot
+++ b/addons/im_livechat/i18n/im_livechat.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-10-09 09:20+0000\n"
-"PO-Revision-Date: 2015-10-09 09:20+0000\n"
+"POT-Creation-Date: 2016-05-26 11:19+0000\n"
+"PO-Revision-Date: 2016-05-26 11:19+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,19 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
-#. module: im_livechat
-#. openerp-web
-#: code:addons/im_livechat/static/src/js/im_livechat.js:222
-#, python-format
-msgid " for the following reason: %s"
-msgstr ""
-
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.loader
-msgid "\", {modules:modules, use_cors: false});\n"
-" });"
-msgstr ""
-
#. module: im_livechat
#: model:ir.model.fields,field_description:im_livechat.field_im_livechat_report_operator_nbr_channel
msgid "# of channel"
@@ -44,20 +31,6 @@ msgstr ""
msgid "% Happy"
msgstr ""
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.support_page
-msgid "<!DOCTYPE html>"
-msgstr ""
-
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.loader
-msgid ");\n"
-" button.appendTo($('body'));\n"
-" window.livechat_button = button;\n"
-" });\n"
-" });"
-msgstr ""
-
#. module: im_livechat
#: model:ir.model.fields,help:im_livechat.field_im_livechat_channel_rule_action
msgid "* Select 'Display the button' to simply display the chat button on the pages.\n"
@@ -87,11 +60,17 @@ msgstr ""
#. module: im_livechat
#. openerp-web
-#: code:addons/im_livechat/static/src/js/im_livechat.js:26
+#: code:addons/im_livechat/static/src/js/im_livechat.js:27
#, python-format
msgid "Ask something ..."
msgstr ""
+#. module: im_livechat
+#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_form
+#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_tree
+msgid "Attendees"
+msgstr ""
+
#. module: im_livechat
#: selection:im_livechat.channel.rule,action:0
msgid "Auto popup"
@@ -176,6 +155,7 @@ msgstr ""
#. module: im_livechat
#: model:ir.model.fields,field_description:im_livechat.field_im_livechat_report_channel_technical_name
+#: model:ir.ui.view,arch_db:im_livechat.im_livechat_report_channel_view_search
msgid "Code"
msgstr ""
@@ -187,7 +167,7 @@ msgstr ""
#. module: im_livechat
#: model:ir.ui.view,arch_db:im_livechat.im_livechat_channel_view_form
-msgid "Copy and paste this code into your website, within the <head> tag:"
+msgid "Copy and paste this code into your website, within the <head> tag:"
msgstr ""
#. module: im_livechat
@@ -290,26 +270,16 @@ msgstr ""
#. module: im_livechat
#. openerp-web
-#: code:addons/im_livechat/static/src/xml/im_livechat.xml:16
+#: code:addons/im_livechat/static/src/xml/im_livechat.xml:19
#, python-format
msgid "Explain your note"
msgstr ""
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_form
-msgid "Feedback"
-msgstr ""
-
#. module: im_livechat
#: model:ir.ui.view,arch_db:im_livechat.im_livechat_channel_view_form
msgid "For website built with Odoo CMS, please install the website_livechat module. Then go to Settings > Website Settings and select the Website Live Chat Channel you want to add on your website."
msgstr ""
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_form
-msgid "General"
-msgstr ""
-
#. module: im_livechat
#: model:ir.model.fields,help:im_livechat.field_im_livechat_channel_rule_sequence
msgid "Given the order to find a matching rule. If 2 rules are matching for the given url/country, the one with the lowest sequence will be chosen."
@@ -361,9 +331,9 @@ msgstr ""
#. module: im_livechat
#. openerp-web
-#: code:addons/im_livechat/static/src/js/im_livechat.js:220
+#: code:addons/im_livechat/static/src/xml/im_livechat.xml:15
#, python-format
-msgid "I rated you with :rating_%d"
+msgid "I don't want to rate this conversation"
msgstr ""
#. module: im_livechat
@@ -449,11 +419,6 @@ msgstr ""
msgid "Livechat Support Channel Statistics allows you to easily check and analyse your company livechat session performance. Extract informations about the missed sessions, the audiance, the duration of a session, etc."
msgstr ""
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.support_page
-msgid "Livechat Support Page"
-msgstr ""
-
#. module: im_livechat
#: model:ir.model,name:im_livechat.model_im_livechat_report_channel
#: model:ir.model,name:im_livechat.model_im_livechat_report_operator
@@ -579,6 +544,11 @@ msgstr ""
msgid "Options"
msgstr ""
+#. module: im_livechat
+#: model:ir.model.fields,help:im_livechat.field_im_livechat_channel_rating_percentage_satisfaction
+msgid "Percentage of happy ratings over the past 7 days"
+msgstr ""
+
#. module: im_livechat
#: model:ir.ui.view,arch_db:im_livechat.im_livechat_channel_view_kanban
msgid "Quit"
@@ -590,6 +560,13 @@ msgstr ""
msgid "Rating"
msgstr ""
+#. module: im_livechat
+#. openerp-web
+#: code:addons/im_livechat/static/src/js/im_livechat.js:308
+#, python-format
+msgid "Rating: :rating_%d"
+msgstr ""
+
#. module: im_livechat
#: model:ir.model.fields,help:im_livechat.field_im_livechat_channel_rule_regex_url
msgid "Regular expression identifying the web page on which the rules will be applied."
@@ -623,8 +600,9 @@ msgid "Search report"
msgstr ""
#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.im_livechat_report_channel_view_search
-msgid "Session"
+#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_form
+#: model:ir.ui.view,arch_db:im_livechat.mail_channel_view_tree
+msgid "Session Date"
msgstr ""
#. module: im_livechat
@@ -777,11 +755,6 @@ msgid "You can create channels for each website on which you want\n"
" visitors to talk in real time with your operators."
msgstr ""
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.loader
-msgid "document.addEventListener(\"DOMContentLoaded\", function(event) {"
-msgstr ""
-
#. module: im_livechat
#: model:ir.ui.view,arch_db:im_livechat.im_livechat_channel_view_form
msgid "e.g. Hello, how may I help you?"
@@ -792,30 +765,6 @@ msgstr ""
msgid "e.g. YourWebsite.com"
msgstr ""
-#. module: im_livechat
-#. openerp-web
-#: code:addons/im_livechat/static/src/xml/im_livechat_backend.xml:6
-#, python-format
-msgid "livechat"
-msgstr ""
-
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.loader
-msgid "odoo.define('im_livechat.livesupport', function (require) {\n"
-" var im_livechat = require('im_livechat.im_livechat');\n"
-" var button = new im_livechat.LivechatButton(\n"
-" $('body'),\n"
-" \""
-msgstr ""
-
-#. module: im_livechat
-#: model:ir.ui.view,arch_db:im_livechat.loader
-msgid "odoo.define('web.session', function (require) {\n"
-" var Session = require('web.Session');\n"
-" var modules = odoo._modules;\n"
-" return new Session(undefined, \""
-msgstr ""
-
#. module: im_livechat
#: model:ir.ui.view,arch_db:im_livechat.im_livechat_channel_view_form
msgid "or copy this url and send it by email to your customers or suppliers:"
@@ -826,11 +775,3 @@ msgstr ""
msgid "seconds"
msgstr ""
-#. module: im_livechat
-#. openerp-web
-#: code:addons/im_livechat/static/src/xml/im_livechat_backend.xml:9
-#: code:addons/im_livechat/static/src/xml/im_livechat_backend.xml:12
-#, python-format
-msgid "true"
-msgstr ""
-
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 60bc53623fd..0a0fbbfe684 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -1598,7 +1598,7 @@ class product_template(osv.osv):
product_ctx = dict(context or {}, active_test=False)
if self.search_count(cr, uid, [('id', 'in', ids), ('available_in_pos', '=', True)], context=product_ctx):
if self.pool['pos.session'].search_count(cr, uid, [('state', '!=', 'closed')], context=context):
- raise osv.except_osv(_('Error!'),
+ raise UserError(
_('You cannot delete a product saleable in point of sale while a session is still opened.'))
return super(product_template, self).unlink(cr, uid, ids, context=context)
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 65df3dc9c94..d05d01b90e8 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -131,6 +131,8 @@ var ScreenWidget = PosBaseWidget.extend({
this.pos.barcode_reader.set_action_callback({
'cashier': _.bind(self.barcode_cashier_action, self),
'product': _.bind(self.barcode_product_action, self),
+ 'weight': _.bind(self.barcode_product_action, self),
+ 'price': _.bind(self.barcode_product_action, self),
'client' : _.bind(self.barcode_client_action, self),
'discount': _.bind(self.barcode_discount_action, self),
'error' : _.bind(self.barcode_error_action, self),
diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py
index 6cb9b5440bf..48605841fb0 100644
--- a/addons/product_visible_discount/product_visible_discount.py
+++ b/addons/product_visible_discount/product_visible_discount.py
@@ -33,14 +33,15 @@ class sale_order_line(osv.osv):
currency_id = item.pricelist_id.currency_id
product = product_obj.browse(cr, uid, product_id, context=context)
+ product_currency = (product.company_id and product.company_id.currency_id) or self.pool['res.users'].browse(cr, uid, uid).company_id.currency_id
if not currency_id:
- currency_id = product.company_id.currency_id
+ currency_id = product_currency
cur_factor = 1.0
else:
- if currency_id.id == product.company_id.currency_id.id:
+ if currency_id.id == product_currency.id:
cur_factor = 1.0
else:
- cur_factor = self.pool['res.currency']._get_conversion_rate(cr, uid, product.company_id.currency_id, currency_id, context=context)
+ cur_factor = self.pool['res.currency']._get_conversion_rate(cr, uid, product_currency, currency_id, context=context)
product_uom = context and context.get('uom') or product.uom_id.id
if uom and uom != product_uom:
diff --git a/addons/report/models/report.py b/addons/report/models/report.py
index ed93ed9344d..af1ebec359e 100644
--- a/addons/report/models/report.py
+++ b/addons/report/models/report.py
@@ -50,7 +50,7 @@ except (OSError, IOError):
else:
_logger.info('Will use the Wkhtmltopdf binary at %s' % _get_wkhtmltopdf_bin())
out, err = process.communicate()
- version = re.search('([0-9.]+)', out).group(0)
+ version = re.search('([0-9.]+)', out or "0").group(0)
if LooseVersion(version) < LooseVersion('0.12.0'):
_logger.info('Upgrade Wkhtmltopdf to (at least) 0.12.0')
wkhtmltopdf_state = 'upgrade'
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 7054ba80cd2..c9e35d0300a 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -544,17 +544,9 @@ class SaleOrderLine(models.Model):
def _compute_tax_id(self):
for line in self:
fpos = line.order_id.fiscal_position_id or line.order_id.partner_id.property_account_position_id
- if fpos:
- # The superuser is used by website_sale in order to create a sale order. We need to make
- # sure we only select the taxes related to the company of the partner. This should only
- # apply if the partner is linked to a company.
- if self.env.uid == SUPERUSER_ID and line.order_id.company_id:
- taxes = fpos.map_tax(line.product_id.taxes_id).filtered(lambda r: r.company_id == line.order_id.company_id)
- else:
- taxes = fpos.map_tax(line.product_id.taxes_id)
- line.tax_id = taxes
- else:
- line.tax_id = line.product_id.taxes_id if line.product_id.taxes_id else False
+ # If company_id is set, always filter taxes by the company
+ taxes = line.product_id.taxes_id.filtered(lambda r: not line.company_id or r.company_id == line.company_id)
+ line.tax_id = fpos.map_tax(taxes) if fpos else taxes
@api.multi
def _prepare_order_line_procurement(self, group_id=False):
diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py
index 22d2208ceee..607a99c66d7 100644
--- a/addons/stock/wizard/stock_return_picking.py
+++ b/addons/stock/wizard/stock_return_picking.py
@@ -45,7 +45,7 @@ class stock_return_picking(osv.osv_memory):
context = {}
if context and context.get('active_ids', False):
if len(context.get('active_ids')) > 1:
- raise osv.except_osv(_('Warning!'), _("You may only return one picking at a time!"))
+ raise UserError(_("You may only return one picking at a time!"))
res = super(stock_return_picking, self).default_get(cr, uid, fields, context=context)
record_id = context and context.get('active_id', False) or False
uom_obj = self.pool.get('product.uom')
diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py
index 7b4eb4f9c91..6a54df1ac6a 100644
--- a/addons/stock_account/stock_account.py
+++ b/addons/stock_account/stock_account.py
@@ -255,7 +255,7 @@ class stock_quant(osv.osv):
:param context: context dictionary that can explicitly mention the company to consider via the 'force_company' key
:returns: journal_id, source account, destination account, valuation account
- :raise: osv.except_osv() is any mandatory account or journal is not defined.
+ :raise: openerp.exceptions.UserError if any mandatory account or journal is not defined.
"""
product_obj = self.pool.get('product.template')
accounts = product_obj.browse(cr, uid, move.product_id.product_tmpl_id.id, context).get_product_accounts()
@@ -432,12 +432,14 @@ class stock_move(osv.osv):
else:
tmpl_dict[product_id] = 0
product_avail = qty_available
+ # if the incoming move is for a purchase order with foreign currency, need to call this to get the same value that the quant will use.
+ price_unit = self.pool.get('stock.move').get_price_unit(cr, uid, move, context=context)
if product_avail <= 0:
- new_std_price = move.price_unit
+ new_std_price = price_unit
else:
# Get the standard price
amount_unit = product.standard_price
- new_std_price = ((amount_unit * product_avail) + (move.price_unit * move.product_qty)) / (product_avail + move.product_qty)
+ new_std_price = ((amount_unit * product_avail) + (price_unit * move.product_qty)) / (product_avail + move.product_qty)
tmpl_dict[product_id] += move.product_qty
# Write the standard price, as SUPERUSER_ID because a warehouse manager may not have the right to write on products
ctx = dict(context or {}, force_company=move.company_id.id)
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index a31773ee121..0436b87825c 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -792,7 +792,7 @@
-
+
diff --git a/addons/web_settings_dashboard/views/dashboard_views.xml b/addons/web_settings_dashboard/views/dashboard_views.xml
index 3bf85772f4b..2a051860708 100644
--- a/addons/web_settings_dashboard/views/dashboard_views.xml
+++ b/addons/web_settings_dashboard/views/dashboard_views.xml
@@ -4,5 +4,5 @@
Dashboardweb_settings_dashboard.main
-
+
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js
index 68ffde2a860..889de308798 100644
--- a/addons/website_forum/static/src/js/website_forum.js
+++ b/addons/website_forum/static/src/js/website_forum.js
@@ -20,7 +20,7 @@ if(!$('.website_forum').length) {
ev.preventDefault();
var $warning = $('
'+
''+
- karma + _t(' karma is required to perform this action. You can earn karma by having your answers upvoted by the community.') + '
');
+ karma + ' ' + _t(' karma is required to perform this action. You can earn karma by having your answers upvoted by the community.') + '');
var vote_alert = $(ev.currentTarget).parent().find("#vote_alert");
if (vote_alert.length == 0) {
$(ev.currentTarget).parent().append($warning);
diff --git a/addons/website_mail/views/website_mail.xml b/addons/website_mail/views/website_mail.xml
index d0df8e6b5a1..b65a19b3271 100644
--- a/addons/website_mail/views/website_mail.xml
+++ b/addons/website_mail/views/website_mail.xml
@@ -84,6 +84,14 @@
+