From 6370744fe614c84dc17eda13e80342a799b85bdf Mon Sep 17 00:00:00 2001 From: husen daudi Date: Wed, 17 Jun 2009 19:43:23 +0530 Subject: [PATCH 1/2] [FIX] Module: scrum,stock create task wizard in scrum and unreceived product wizard create new entry in stock bzr revid: hda@hda-20090617141323-ee4lm48j4fas5d40 --- addons/scrum/scrum_view.xml | 2 +- addons/scrum/wizard/backlog_to_task.py | 3 ++- addons/stock/stock.py | 16 ++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/addons/scrum/scrum_view.xml b/addons/scrum/scrum_view.xml index 116dd7bed13..9133f40d242 100644 --- a/addons/scrum/scrum_view.xml +++ b/addons/scrum/scrum_view.xml @@ -316,7 +316,7 @@ View sprint Tasks form tree,form - [('product_backlog_id', '=', 'S('+str(active_id)+')')] + [('product_backlog_id', '=', active_id)] diff --git a/addons/scrum/wizard/backlog_to_task.py b/addons/scrum/wizard/backlog_to_task.py index 4f578494428..4701b95ce29 100644 --- a/addons/scrum/wizard/backlog_to_task.py +++ b/addons/scrum/wizard/backlog_to_task.py @@ -46,7 +46,8 @@ def _do_create(self, cr, uid, data, context): 'description': backlog.note, 'project_id': backlog.project_id.id, 'user_id': (backlog.user_id and backlog.user_id.id) or uid, - 'priority': backlog.priority + 'priority': backlog.priority, + 'planned_hours': backlog.planned_hours })) value = { diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e32bdcf3c07..3d6e9c46d68 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1405,12 +1405,16 @@ class stock_picking_move_wizard(osv.osv_memory): for act in self.read(cr,uid,ids): move_lines=move_obj.browse(cr,uid,act['move_ids']) for line in move_lines: - picking_obj.write(cr,uid,[line.picking_id.id],{'move_lines':[(1,line.id,{'picking_id':act['picking_id']})]}) - picking_obj.write(cr,uid,[act['picking_id']],{'move_lines':[(1,line.id,{'picking_id':act['picking_id']})]}) - cr.commit() - old_picking=picking_obj.read(cr,uid,[line.picking_id.id])[0] - if not len(old_picking['move_lines']): - picking_obj.write(cr,uid,[old_picking['id']],{'state':'done'}) + if line.picking_id: + picking_obj.write(cr,uid,[line.picking_id.id],{'move_lines':[(1,line.id,{'picking_id':act['picking_id']})]}) + picking_obj.write(cr,uid,[act['picking_id']],{'move_lines':[(1,line.id,{'picking_id':act['picking_id']})]}) + cr.commit() + old_picking=picking_obj.read(cr,uid,[line.picking_id.id])[0] + if not len(old_picking['move_lines']): + picking_obj.write(cr,uid,[old_picking['id']],{'state':'done'}) + else: + raise osv.except_osv(_('UserError'), + _('You can not create new moves.')) return {'type':'ir.actions.act_window_close' } stock_picking_move_wizard() From 220631cc0ea982816a21f3bdad408a85b5a340c5 Mon Sep 17 00:00:00 2001 From: "VRA(Open ERP)" <> Date: Wed, 17 Jun 2009 19:49:46 +0530 Subject: [PATCH 2/2] [FIX] account_payment : report corrected lp bug: https://launchpad.net/bugs/388347 fixed bzr revid: jvo@tinyerp.com-20090617141946-iz6sn9l6cejxtxj2 --- addons/account_payment/report/order.rml | 99 +++++++++++++------------ 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 69c4b21c5d6..04ea4e608ec 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -23,7 +23,7 @@ - + @@ -35,29 +35,27 @@ - - - - + + - - - - - - - - + + + + + + + + - + - - + + @@ -85,12 +83,12 @@ - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or '' ]] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or '' ]] + [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']] @@ -112,46 +110,51 @@ - Partner + Partner - Bank account + Bank account - Reference + Reference - Date + Date - Amount + Amount - - - - [[repeatIn(o.line_ids, 'line') ]] - [[ line.partner_id and line.partner_id.name or '' ]] - - - [[ line.bank_id and line.bank_id.name ]] - - - [[ line.name ]] - - - [[ line.date ]] - - - [[ formatLang(line.amount_currency) ]] [[ line.currency.name ]] - - - - +
+ [[repeatIn(o.line_ids, 'line') ]] + + + + [[ line.partner_id and line.partner_id.name or '' ]] + + + [[ line.bank_id and line.bank_id.name ]] + + + [[ line.name ]] + + + [[ line.date ]] + + + [[ formatLang(line.amount_currency) ]] [[ line.currency.name ]] + + + + + + +
+