From 6370744fe614c84dc17eda13e80342a799b85bdf Mon Sep 17 00:00:00 2001 From: husen daudi Date: Wed, 17 Jun 2009 19:43:23 +0530 Subject: [PATCH 1/5] [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 3d88cb1d65af3a13d0ca60ce9b4bb88ed77ec089 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Wed, 17 Jun 2009 16:19:14 +0200 Subject: [PATCH 2/5] [IMP] point_of_sale: receipt report: better date formatting bzr revid: olt@tinyerp.com-20090617141914-q45nj9rw1jf3zs34 --- addons/point_of_sale/report/pos_receipt.py | 7 +++++++ addons/point_of_sale/report/pos_receipt.rml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/report/pos_receipt.py b/addons/point_of_sale/report/pos_receipt.py index 687519d2457..69f4bd706c2 100644 --- a/addons/point_of_sale/report/pos_receipt.py +++ b/addons/point_of_sale/report/pos_receipt.py @@ -22,6 +22,7 @@ import time from report import report_sxw +from mx.DateTime.ISO import ParseAny import pooler @@ -35,11 +36,17 @@ class order(report_sxw.rml_parse): self.localcontext.update({ 'time': time, + 'dformat': '%Y/%m/%d %H:%M:%S', 'disc': self.discount, 'net': self.netamount, + 'formatdate': self.formatdate, 'address': partner.address and partner.address[0] or False, }) + def formatdate(self, datestr): + dateobj = ParseAny(datestr) + return dateobj.strftime(self.localcontext['dformat']) + def netamount(self, order_line_id): sql = 'select (qty*price_unit) as net_price from pos_order_line where id = %s' self.cr.execute(sql, (order_line_id,)) diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml index 75b5ce3f01e..067d775db2f 100644 --- a/addons/point_of_sale/report/pos_receipt.rml +++ b/addons/point_of_sale/report/pos_receipt.rml @@ -83,8 +83,8 @@ Tel : [[ address and address.phone ]] E-mail : [[ address and address.email ]] Salesman : [[ o.salesman_id.name ]] - Sale Date : [[ o.date_order ]] - Receipt Printing Date : [[ time.strftime('%d/%m/%Y %H:%M') ]] + Sale Date : [[ formatdate(o.date_order) ]] + Receipt Printing Date : [[ time.strftime(dformat) ]] From 220631cc0ea982816a21f3bdad408a85b5a340c5 Mon Sep 17 00:00:00 2001 From: "VRA(Open ERP)" <> Date: Wed, 17 Jun 2009 19:49:46 +0530 Subject: [PATCH 3/5] [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 ]] + + + + + + +
+ From d206309d75454da7585deace4d09cbbc92a2b03a Mon Sep 17 00:00:00 2001 From: "VRA , GPA" <> Date: Wed, 17 Jun 2009 20:16:17 +0530 Subject: [PATCH 4/5] [FIX] Purchase: Corrected report and translation lp bug: https://launchpad.net/bugs/386297 fixed bzr revid: jvo@tinyerp.com-20090617144617-thmku0rh6thj3fkr --- addons/purchase/i18n/fr_FR.po | 10 ++++++++++ addons/purchase/report/order.rml | 31 +++++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/addons/purchase/i18n/fr_FR.po b/addons/purchase/i18n/fr_FR.po index a60da7b5711..a04200ef469 100644 --- a/addons/purchase/i18n/fr_FR.po +++ b/addons/purchase/i18n/fr_FR.po @@ -41,6 +41,16 @@ msgstr "Du Colisage" msgid "Validated By" msgstr "Validée par" +#. module: purchase +#: rml:purchase.order:0 +msgid "Request for Quotation N°" +msgstr "Demande de Devis N °" + +#. module: purchase +#: rml:purchase.order:0 +msgid "Purchase Order Confirmation N°" +msgstr "Confirmation de la commande d'achat N °" + #. module: purchase #: constraint:ir.actions.act_window:0 msgid "Invalid model name in the action definition." diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml index d945dc1802f..a9713776b4f 100644 --- a/addons/purchase/report/order.rml +++ b/addons/purchase/report/order.rml @@ -98,6 +98,8 @@ + + @@ -153,13 +155,13 @@ [[ repeatIn(o.dest_address_id and [o.dest_address_id] or [],'addr') ]] Shipping address : - [[ addr.partner_id.name ]] - [[ addr.title or '' ]] [[ addr.name ]] - [[ addr.street ]] - [[ addr.street2 or '' ]] - [[ addr.zip or '' ]] [[ addr.city or '' ]] - [[ addr.state_id and addr.state_id.name or '' ]] - [[ addr.country_id and addr.country_id.name or '' ]] + [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] + [[ addr.title or '' ]] [[ addr.name ]] + [[ addr.street ]] + [[ addr.street2 or '' ]] + [[ addr.zip or '' ]] [[ addr.city or '' ]] + [[ addr.state_id and addr.state_id.name or '' ]] + [[ addr.country_id and addr.country_id.name or '' ]] @@ -180,12 +182,12 @@ [[ o.partner_address_id.zip or '' ]] [[ o.partner_address_id.city or '' ]] [[ o.partner_address_id.state_id and o.partner_address_id.state_id.name or '' ]] [[ o.partner_address_id.country_id and o.partner_address_id.country_id.name or '' ]] - + - Tél. : [[ o.partner_address_id.phone or '' ]] - Fax : [[ o.partner_address_id.fax or '' ]] - TVA : [[ o.partner_id.vat or '' ]] + Tél. : [[ o.partner_address_id.phone or '' ]] + Fax : [[ o.partner_address_id.fax or '' ]] + TVA : [[ o.partner_id.vat or '' ]] @@ -198,7 +200,8 @@ - [[ (o.state=='draft' or removeParentNode('font')) and 'Request for Quotation' ]] [[ (o.state<>'draft' or removeParentNode('font')) and 'Purchase Order Confirmation' ]] N° [[ o.name ]] + [[ o.state=='draft' and removeParentNode('para') ]] Purchase Order Confirmation N° [[ o.name ]] + [[ o.state<>'draft' and removeParentNode('para') ]] Request for Quotation N° [[ o.name ]] @@ -237,7 +240,7 @@ - + Description @@ -261,7 +264,7 @@
[[repeatIn(o.order_line,'line')]] - + [[ line.name ]] From 6802a118174f889e56591f2ceb3b7e1ef8725039 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 17 Jun 2009 20:42:55 +0530 Subject: [PATCH 5/5] [FIX] Report_task : Corrected malfunctioned .po files lp bug: https://launchpad.net/bugs/388438 fixed bzr revid: jvo@tinyerp.com-20090617151255-xqxb1mq821dgzeqv --- addons/report_task/i18n/de_DE.po | 10 +++++++++- addons/report_task/i18n/fr_FR.po | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/addons/report_task/i18n/de_DE.po b/addons/report_task/i18n/de_DE.po index 90a78633d48..80aa37c3abd 100644 --- a/addons/report_task/i18n/de_DE.po +++ b/addons/report_task/i18n/de_DE.po @@ -161,4 +161,12 @@ msgstr "Fehlerhafter xml Code für diese Ansicht!" #. module: report_task #: field:report.closed.task,delay_hours:0 -ms \ No newline at end of file +msgid "Delay Hours" +msgstr "" + +#. module: report_task +#: field:report.closed.task,project_id:0 +msgid "Project" +msgstr "" + +#. module: repo \ No newline at end of file diff --git a/addons/report_task/i18n/fr_FR.po b/addons/report_task/i18n/fr_FR.po index 1aeb2b71c5a..6caaac91dc9 100644 --- a/addons/report_task/i18n/fr_FR.po +++ b/addons/report_task/i18n/fr_FR.po @@ -160,4 +160,13 @@ msgid "Invalid XML for View Architecture!" msgstr "XML non valide pour l'architecture de la vue" #. module: report_task -#: field:report.closed.task,delay_hours \ No newline at end of file +#: field:report.closed.task,delay_hours:0 +msgid "Delay Hours" +msgstr "" + +#. module: report_task +#: field:report.closed.task,project_id:0 +msgid "Project" +msgstr "" + +#. module: repo \ No newline at end of file