diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py
index 2385ce47d3b..17978442c9f 100644
--- a/addons/auth_signup/res_users.py
+++ b/addons/auth_signup/res_users.py
@@ -299,3 +299,9 @@ class res_users(osv.Model):
except MailDeliveryException:
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
return user_id
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if not default or not default.get('email'):
+ # avoid sending email to the user we are duplicating
+ context = dict(context or {}, reset_password=False)
+ return super(res_users, self).copy(cr, uid, id, default=default, context=context)
diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py
index c68f163742e..223ead5698e 100644
--- a/addons/hr_payroll/hr_payroll.py
+++ b/addons/hr_payroll/hr_payroll.py
@@ -962,7 +962,7 @@ class hr_employee(osv.osv):
current_date = datetime.now().strftime('%Y-%m-%d')
for employee in self.browse(cr, uid, ids, context=context):
if not employee.contract_ids:
- res[employee.id] = {'basic': 0.0}
+ res[employee.id] = 0.0
continue
cr.execute( 'SELECT SUM(wage) '\
'FROM hr_contract '\
@@ -971,7 +971,7 @@ class hr_employee(osv.osv):
'AND (date_end > %s OR date_end is NULL)',
(employee.id, current_date, current_date))
result = dict(cr.dictfetchone())
- res[employee.id] = {'basic': result['sum']}
+ res[employee.id] = result['sum']
return res
_columns = {
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 698940f2641..878ef9bfb24 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -545,7 +545,7 @@ openerp.mail = function (session) {
};
self.do_action(action, {
- 'on_close': function(){ self.is_log && self.parent_thread.message_fetch() }
+ 'on_close': function(){ !self.parent_thread.options.view_inbox && self.parent_thread.message_fetch() }
});
self.on_cancel();
});
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index c127f414422..d9eae3bc815 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -308,7 +308,7 @@ class mrp_production(osv.osv):
if l.state in ('done','cancel','draft'):
continue
todo += l.move_dest_id_lines
- if l.production_id and (l.production_id.date_finished > dt):
+ if l.production_id and (l.production_id.date_finished > dt.strftime('%Y-%m-%d %H:%M:%S')):
if l.production_id.state not in ('done','cancel'):
for wc in l.production_id.workcenter_lines:
i = self.pool.get('resource.calendar').interval_min_get(
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index 3a14f7b6274..d7766ca8aab 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -39,7 +39,10 @@
-
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 49ee9cf3c61..6c9d586d9de 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2313,7 +2313,7 @@ class stock_move(osv.osv):
if move.location_dest_id.usage != 'internal' and move.product_id.cost_method == 'average':
reference_amount = qty * move.product_id.standard_price
elif move.product_id.cost_method == 'average' and move.price_unit:
- reference_amount = qty * move.price_unit
+ reference_amount = move.product_qty * move.price_unit
reference_currency_id = move.price_currency_id.id or reference_currency_id
# Otherwise we default to the company's valuation price type, considering that the values of the
diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py
index 4ce76fabd45..18b9ccd0b2e 100644
--- a/openerp/tools/translate.py
+++ b/openerp/tools/translate.py
@@ -939,10 +939,13 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
# Normally the path looks like /path/to/xxx/i18n/lang.po
# and we try to find the corresponding
# /path/to/xxx/i18n/xxx.pot file.
+ # (Sometimes we have 'i18n_extra' instead of just 'i18n')
head, _ = os.path.split(fileobj.name)
- head2, _ = os.path.split(head)
- head3, tail3 = os.path.split(head2)
- pot_handle = misc.file_open(os.path.join(head3, tail3, 'i18n', tail3 + '.pot'))
+ head2, i18n_dir = os.path.split(head)
+ head3, module_dir = os.path.split(head2)
+ pot_path = os.path.join(
+ head3, module_dir, i18n_dir, module_dir + '.pot')
+ pot_handle = misc.file_open(pot_path)
pot_reader = TinyPoFile(pot_handle)
except:
pass