From bc9bab7db406b0ed3c1b6fabf13c33c7b3929ccf Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Thu, 2 Dec 2010 18:32:17 +0530 Subject: [PATCH 1/5] [IMP] account_voucher: misc changes and moveline with same amount with higer priority bzr revid: psi@tinyerp.co.in-20101202130217-siz1ozkcq5har3mv --- addons/account/account_invoice_view.xml | 2 +- addons/account_voucher/account_voucher.py | 17 +++++-- .../account_voucher_report.xml | 4 +- .../report/account_voucher_print.rml | 51 ------------------- .../voucher_payment_receipt_view.xml | 2 +- 5 files changed, 18 insertions(+), 58 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index e5427a93361..9d10107c5c9 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -497,7 +497,7 @@ [('type','=','in_refund')] {'type':'in_refund', 'journal_type': 'purchase_refund'} - A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you. + A supplier refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you. diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index f902810ac31..9d06d181ef2 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -418,6 +418,18 @@ class account_voucher(osv.osv): ids.reverse() moves = move_line_pool.browse(cr, uid, ids) + priority_moves = [] + for line in moves: + original_amount = line.credit or line.debit or 0.0 + if original_amount == price: + priority_moves.append(line) + + if priority_moves: + for line in moves: + if line not in priority_moves: + priority_moves.append(line) + moves = priority_moves + company_currency = journal.company_id.currency_id.id if company_currency != currency_id and ttype == 'payment': total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit) @@ -438,13 +450,13 @@ class account_voucher(osv.osv): if line.debit and line.reconcile_partial_id and ttype == 'payment': continue - orignal_amount = line.credit or line.debit or 0.0 + original_amount = line.credit or line.debit or 0.0 rs = { 'name':line.move_id.name, 'type': line.credit and 'dr' or 'cr', 'move_line_id':line.id, 'account_id':line.account_id.id, - 'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, orignal_amount), + 'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, original_amount), 'date_original':line.date, 'date_due':line.date_maturity, 'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled) @@ -468,7 +480,6 @@ class account_voucher(osv.osv): default['value']['pre_line'] = 1 elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: default['value']['pre_line'] = 1 - return default def onchange_date(self, cr, user, ids, date, context={}): diff --git a/addons/account_voucher/account_voucher_report.xml b/addons/account_voucher/account_voucher_report.xml index 785fd91df73..8af204efbbe 100644 --- a/addons/account_voucher/account_voucher_report.xml +++ b/addons/account_voucher/account_voucher_report.xml @@ -1,7 +1,7 @@ - + menu="True"/> --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Receiver's Signature - - - - - - - - - - - - - Authorised Signatory - - - - - - diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 83b6243a627..0ed2bac22a5 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -224,7 +224,7 @@ - Vendor Payment + Supplier Payment account.voucher form [('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')] From d5910dcfc98ecdfd202656c7715d13d72c1ca507 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Mon, 6 Dec 2010 12:43:42 +0530 Subject: [PATCH 2/5] [IMP] account: Add menu partners bzr revid: psi@tinyerp.co.in-20101206071342-mxfvdqh4ka1kgkt4 --- addons/account/account_menuitem.xml | 17 +++++++++-------- addons/account/account_view.xml | 14 ++++++++++++++ addons/account/board_account_view.xml | 2 +- addons/account_budget/account_budget_view.xml | 2 +- addons/account_payment/account_payment_view.xml | 2 +- .../voucher_payment_receipt_view.xml | 8 ++++---- .../voucher_sales_purchase_view.xml | 4 +++- 7 files changed, 33 insertions(+), 16 deletions(-) diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index 4094b453ab7..05795c2f380 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -4,22 +4,23 @@ - - - + + + - + - - + + - + @@ -27,7 +28,7 @@ - + diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index f2b4da6ea23..f777f4aa448 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2745,5 +2745,19 @@ action = self.pool.get('res.config').next(cr, uid, [], context) + + Partners + ir.actions.act_window + res.partner + form + + + + + diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index bcedc3fa491..93bcc7724be 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -68,7 +68,7 @@ - + diff --git a/addons/account_budget/account_budget_view.xml b/addons/account_budget/account_budget_view.xml index 3915463d8a2..6cdadda2338 100644 --- a/addons/account_budget/account_budget_view.xml +++ b/addons/account_budget/account_budget_view.xml @@ -45,7 +45,7 @@ - + diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml index d0543d72242..8966a6c88ac 100644 --- a/addons/account_payment/account_payment_view.xml +++ b/addons/account_payment/account_payment_view.xml @@ -39,7 +39,7 @@ - + payment.mode.search diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml index 439e81988b8..3a0dbf40f4d 100644 --- a/addons/account_voucher/voucher_payment_receipt_view.xml +++ b/addons/account_voucher/voucher_payment_receipt_view.xml @@ -88,7 +88,7 @@
- + - + - + - +