diff --git a/addons/account_payment/payment.py b/addons/account_payment/payment.py index f430e2a8ec9..9d5b3682f74 100644 --- a/addons/account_payment/payment.py +++ b/addons/account_payment/payment.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -400,7 +400,7 @@ class payment_line(osv.osv): method=True, type='date',help="Invoice Effective Date"), # 'reference': fields.function(select_by_name, string="Ref", method=True, # type='char'), - 'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='char', string='Maturity Date'), + 'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Maturity Date'), 'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref'), 'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text",help='Address of the Main Partner'), 'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text",help='Address of the Ordering Customer.'), diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index ba78a9a3a65..80c3a3382a9 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -17,47 +17,17 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - + @@ -77,7 +47,6 @@ - [[ repeatIn(objects, 'o') ]] @@ -115,7 +84,7 @@ - + Partner @@ -134,7 +103,7 @@ - + [[repeatIn(o.line_ids, 'line') ]] @@ -144,13 +113,13 @@ [[ line.bank_id and line.bank_id.name ]] - [[ line.reference ]] + [[ line.name ]] - [[ formatLang(line.value_date, date=True) ]] + [[ line.date ]] - [[ formatLang(line.to_pay_currency) ]] [[ line.currency.name ]] + [[ formatLang(line.amount_currency) ]] [[ line.currency.name ]] diff --git a/addons/account_payment/wizard/wizard_payment_order.py b/addons/account_payment/wizard/wizard_payment_order.py index 758f2cbe30f..24c490fa818 100644 --- a/addons/account_payment/wizard/wizard_payment_order.py +++ b/addons/account_payment/wizard/wizard_payment_order.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -42,7 +42,7 @@ arch_duedate=''' def search_entries(self, cr, uid, data, context): search_due_date=data['form']['duedate'] - + pool = pooler.get_pool(cr.dbname) order_obj = pool.get('payment.order') line_obj = pool.get('account.move.line') @@ -54,14 +54,9 @@ def search_entries(self, cr, uid, data, context): ctx = '''context="{'journal_id': %d}"''' % payment.mode.journal.id # Search for move line to pay: - line_ids = line_obj.search(cr, uid, [ - ('reconcile_id', '=', False), - ('account_id.type', '=', 'payable'), - ('amount_to_pay', '>', 0), - ('date_maturity','<=',search_due_date) - ], context=context) - - + domain = [('reconcile_id', '=', False),('account_id.type', '=', 'payable'),('amount_to_pay', '>', 0)] + domain = domain + ['|',('date_maturity','<',search_due_date),('date_maturity','=',False)] + line_ids = line_obj.search(cr, uid, domain, context=context) FORM.string = '''