From e6fa616198e92f111f62e05c86fd81614841c75f Mon Sep 17 00:00:00 2001 From: husen daudi Date: Mon, 6 Apr 2009 19:07:20 +0530 Subject: [PATCH 1/4] bugfixed for split finished product move bzr revid: hda@hda-20090406133720-6bim5wy5z0w3a101 --- addons/stock/wizard/wizard_track_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From d61f1bb342597f3976e4eb086ce8b9d2a3675795 Mon Sep 17 00:00:00 2001 From: husen daudi Date: Mon, 6 Apr 2009 19:10:39 +0530 Subject: [PATCH 2/4] bugfixed for board line duplication bzr revid: hda@hda-20090406134039-86fng0papc4cvpvz --- addons/board/board.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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): From 826a996c3abca2a661d32c7acd1f0d90dd9a7734 Mon Sep 17 00:00:00 2001 From: husen daudi Date: Mon, 6 Apr 2009 19:16:59 +0530 Subject: [PATCH 3/4] bugfixed for currency rounding bzr revid: hda@hda-20090406134659-fb7qeq7gsp15bj72 --- addons/account/invoice.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 = {} From 4855232a2d738a45d0086eb74e78eba8413f7ffd Mon Sep 17 00:00:00 2001 From: husen daudi Date: Mon, 6 Apr 2009 19:27:40 +0530 Subject: [PATCH 4/4] bugfixed for tax calculation in timesheet invoice creation and encoding bzr revid: hda@hda-20090406135740-qgsl2oo8qn5hro7r --- .../hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py | 3 ++- addons/mrp/mrp_view.xml | 2 +- addons/project_timesheet/project_timesheet.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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: