Merge lp:~openerp-dev/openobject-addons/6.1-opw-574251-rha into lp:openobject-addons/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 6966
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-574251-rha
Merge into: lp:openobject-addons/6.1
Diff against target: 28 lines (+6/-2)
2 files modified
account_voucher/account_voucher.py (+5/-1)
account_voucher/wizard/account_statement_from_invoice.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-574251-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+104383@code.launchpad.net

Description of the change

Hello,

Force date and period update on voucher while confirming bank statement.
Forward port from 6.0 rev 5136.

Also fix bank statement lines' date creation using bank statement date while importing invoices, previously statement lines were having current date.

Please check this fix.

Regards,
Rifakat Haradwala

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

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-03 12:59:19 +0000
4@@ -1421,7 +1421,11 @@
5 bank_st_line_obj = self.pool.get('account.bank.statement.line')
6 st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context)
7 if st_line.voucher_id:
8- voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
9+ voucher_obj.write(cr, uid, [st_line.voucher_id.id],
10+ {'number': next_number,
11+ 'date': st_line.date,
12+ 'period_id': st_line.statement_id.period_id.id},
13+ context=context)
14 if st_line.voucher_id.state == 'cancel':
15 voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context)
16 wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
17
18=== modified file 'account_voucher/wizard/account_statement_from_invoice.py'
19--- account_voucher/wizard/account_statement_from_invoice.py 2012-01-31 13:36:57 +0000
20+++ account_voucher/wizard/account_statement_from_invoice.py 2012-05-03 12:59:19 +0000
21@@ -112,7 +112,7 @@
22 'statement_id': statement_id,
23 'ref': line.ref,
24 'voucher_id': voucher_id,
25- 'date': time.strftime('%Y-%m-%d'), #time.strftime('%Y-%m-%d'), #line.date_maturity or,
26+ 'date': statement.date,
27 }, context=context)
28 return {'type': 'ir.actions.act_window_close'}
29