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
1=== modified file 'account_voucher/account_voucher.py'
2--- account_voucher/account_voucher.py 2012-03-30 11:07:16 +0000
3+++ account_voucher/account_voucher.py 2012-05-22 10:34:24 +0000
4@@ -46,8 +46,9 @@
5 def _check_paid(self, cr, uid, ids, name, args, context=None):
6 res = {}
7 for voucher in self.browse(cr, uid, ids, context=context):
8- ok = True
9+ ok = False
10 for line in voucher.move_ids:
11+ ok = True
12 if (line.account_id.type, 'in', ('receivable', 'payable')) and not line.reconcile_id:
13 ok = False
14 res[voucher.id] = ok
15@@ -1068,7 +1069,7 @@
16 voucher_currency = voucher_brw.currency_id and voucher_brw.currency_id.id or voucher_brw.journal_id.company_id.currency_id.id
17 # We want to set it on the account move line as soon as the original line had a foreign currency
18 if line.move_line_id.currency_id and line.move_line_id.currency_id.id != company_currency:
19- # we compute the amount in that foreign currency.
20+ # we compute the amount in that foreign currency.
21 if line.move_line_id.currency_id.id == current_currency:
22 # if the voucher and the voucher line share the same currency, there is no computation to do
23 sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
24@@ -1287,7 +1288,7 @@
25
26 def _currency_id(self, cr, uid, ids, name, args, context=None):
27 '''
28- This function returns the currency id of a voucher line. It's either the currency of the
29+ This function returns the currency id of a voucher line. It's either the currency of the
30 associated move line (if any) or the currency of the voucher or the company currency.
31 '''
32 res = {}