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
=== 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-03 12:59:19 +0000
@@ -1421,7 +1421,11 @@
1421 bank_st_line_obj = self.pool.get('account.bank.statement.line')1421 bank_st_line_obj = self.pool.get('account.bank.statement.line')
1422 st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context)1422 st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context)
1423 if st_line.voucher_id:1423 if st_line.voucher_id:
1424 voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)1424 voucher_obj.write(cr, uid, [st_line.voucher_id.id],
1425 {'number': next_number,
1426 'date': st_line.date,
1427 'period_id': st_line.statement_id.period_id.id},
1428 context=context)
1425 if st_line.voucher_id.state == 'cancel':1429 if st_line.voucher_id.state == 'cancel':
1426 voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context)1430 voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context)
1427 wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)1431 wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
14281432
=== modified file 'account_voucher/wizard/account_statement_from_invoice.py'
--- account_voucher/wizard/account_statement_from_invoice.py 2012-01-31 13:36:57 +0000
+++ account_voucher/wizard/account_statement_from_invoice.py 2012-05-03 12:59:19 +0000
@@ -112,7 +112,7 @@
112 'statement_id': statement_id,112 'statement_id': statement_id,
113 'ref': line.ref,113 'ref': line.ref,
114 'voucher_id': voucher_id,114 'voucher_id': voucher_id,
115 'date': time.strftime('%Y-%m-%d'), #time.strftime('%Y-%m-%d'), #line.date_maturity or,115 'date': statement.date,
116 }, context=context)116 }, context=context)
117 return {'type': 'ir.actions.act_window_close'}117 return {'type': 'ir.actions.act_window_close'}
118118