Merge lp:~openerp-dev/openobject-addons/6.1-opw-574995-gpa into lp:openobject-addons/6.1

Proposed by gpa(OpenERP)
Status: Approved
Approved by: Vinay Rana (OpenERP)
Approved revision: 6807
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-574995-gpa
Merge into: lp:openobject-addons/6.1
Diff against target: 32 lines (+4/-3)
1 file modified
account_voucher/account_voucher.py (+4/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-574995-gpa
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+106778@code.launchpad.net

Description of the change

Hello sir,

The "Pay bill" button on supplier receipt view is still visible after the payment has been completed or reconciled.

Step to reproduce:

1.Goto "Accounting/Suppliers/Purchase Receipt" make an entry on purchase receipt
2.Validate entry
3.Now click on Pay Bill button and pay the receipt

The "Pay bill" button on supplier receipt view is still visible after the payment has been completed or reconciled.
Please view video attached for example.
Thank you

To post a comment you must log in.
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

The propose patch will fix the issue.

review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Already Fixed on Trunk in a different way (means that it was already fixed and merged in Trunk). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6807. By gpa(OpenERP)

[FIX] account_voucher The Pay bill button on supplier receipt view is still visible after the payment has been completed or reconciled. : case 574995

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2012-03-30 11:07:16 +0000
+++ account_voucher/account_voucher.py 2012-05-22 10:34:24 +0000
@@ -46,8 +46,9 @@
46 def _check_paid(self, cr, uid, ids, name, args, context=None):46 def _check_paid(self, cr, uid, ids, name, args, context=None):
47 res = {}47 res = {}
48 for voucher in self.browse(cr, uid, ids, context=context):48 for voucher in self.browse(cr, uid, ids, context=context):
49 ok = True49 ok = False
50 for line in voucher.move_ids:50 for line in voucher.move_ids:
51 ok = True
51 if (line.account_id.type, 'in', ('receivable', 'payable')) and not line.reconcile_id:52 if (line.account_id.type, 'in', ('receivable', 'payable')) and not line.reconcile_id:
52 ok = False53 ok = False
53 res[voucher.id] = ok54 res[voucher.id] = ok
@@ -1068,7 +1069,7 @@
1068 voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id1069 voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id
1069 # We want to set it on the account move line as soon as the original line had a foreign currency1070 # We want to set it on the account move line as soon as the original line had a foreign currency
1070 if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:1071 if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
1071 # we compute the amount in that foreign currency. 1072 # we compute the amount in that foreign currency.
1072 if line.move_line_id.currency_id.id == current_currency:1073 if line.move_line_id.currency_id.id == current_currency:
1073 # if the voucher and the voucher line share the same currency, there is no computation to do1074 # if the voucher and the voucher line share the same currency, there is no computation to do
1074 sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 11075 sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
@@ -1287,7 +1288,7 @@
12871288
1288 def _currency_id(self, cr, uid, ids, name, args, context=None):1289 def _currency_id(self, cr, uid, ids, name, args, context=None):
1289 '''1290 '''
1290 This function returns the currency id of a voucher line. It's either the currency of the 1291 This function returns the currency id of a voucher line. It's either the currency of the
1291 associated move line (if any) or the currency of the voucher or the company currency.1292 associated move line (if any) or the currency of the voucher or the company currency.
1292 '''1293 '''
1293 res = {}1294 res = {}