diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 5c977ed9500..0bd58afe90a 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -912,11 +912,17 @@ account_invoice()
class account_invoice_line(osv.osv):
def _amount_line(self, cr, uid, ids, prop, unknow_none,unknow_dict):
- res = {}
- for line in self.browse(cr, uid, ids):
- res[line.id] = round(line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0),2)
- return res
-
+ res = {}
+ cur_obj=self.pool.get('res.currency')
+ for line in self.browse(cr, uid, ids):
+ if line.invoice_id:
+ res[line.id] = line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0)
+ cur = line.invoice_id.currency_id
+ res[line.id] = cur_obj.round(cr, uid, cur, res[line.id])
+ else:
+ res[line.id] = round(line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0),2)
+ return res
+
def _price_unit_default(self, cr, uid, context=None):
if context is None:
context = {}
diff --git a/addons/board/board.py b/addons/board/board.py
index e9286b0d508..0bf3fe32b16 100644
--- a/addons/board/board.py
+++ b/addons/board/board.py
@@ -81,8 +81,7 @@ class board_board(osv.osv):
'type': 'form',
'arch': self.create_view(cr, user, id, context),
})
- vals['view_id'] = view_id
- super(board_board, self).write(cr, user, [id], vals, context)
+ super(board_board, self).write(cr, user, [id], {'view_id': view_id}, context)
return id
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False):
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index 3efa8accb7e..1f6d8addc97 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -158,7 +158,8 @@ class invoice_create(wizard.interface):
pool.get('account.invoice.line').create(cr, uid, curr_line)
strids = ','.join(map(str, data['ids']))
cr.execute("update account_analytic_line set invoice_id=%%s WHERE account_id = %%s and id IN (%s)" % strids, (last_invoice,account.id,))
-
+ pool.get('account.invoice').button_reset_taxes(cr, uid, [last_invoice], context)
+
return {
'domain': "[('id','in', ["+','.join(map(str,invoices))+"])]",
'name': _('Invoices'),
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 22895032c34..c2f8d94eaac 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -712,7 +712,7 @@
-
+
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index 7d91c654f1e..0c08639ccad 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -78,7 +78,7 @@ class project_work(osv.osv):
if line_id:
obj = self.pool.get('hr.analytic.timesheet')
if 'name' in vals:
- vals_line['name'] = '%s: %s' % (task.name, vals['name'] or '/')
+ vals_line['name'] = '%s: %s' % (tools.ustr(task.name), tools.ustr(vals['name']) or '/')
if 'user_id' in vals:
vals_line['user_id'] = vals['user_id']
if 'date' in vals:
diff --git a/addons/stock/wizard/wizard_track_line.py b/addons/stock/wizard/wizard_track_line.py
index 64a52016537..009282450bb 100644
--- a/addons/stock/wizard/wizard_track_line.py
+++ b/addons/stock/wizard/wizard_track_line.py
@@ -97,7 +97,7 @@ def _track_lines(self, cr, uid, data, context):
new_move.append(current_move)
else:
current_move = move.id
- new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx})
+ new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}, {'product_id': move.product_id.id})
update_val['prodlot_id'] = new_prodlot
move_obj.write(cr, uid, [current_move], update_val)