Merge lp:~therp-nl/banking-addons/ab61-lp1090733-vouchers_wrong_date into lp:banking-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 144
Proposed branch: lp:~therp-nl/banking-addons/ab61-lp1090733-vouchers_wrong_date
Merge into: lp:banking-addons/6.1
Diff against target: 33 lines (+7/-3)
1 file modified
account_banking/account_banking.py (+7/-3)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ab61-lp1090733-vouchers_wrong_date
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+140070@code.launchpad.net

Description of the change

This is a backport of https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574251-rha/+merge/104383 to the modified version of this method that exists in account_banking

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Looks fine to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/account_banking.py'
2--- account_banking/account_banking.py 2012-05-02 15:09:49 +0000
3+++ account_banking/account_banking.py 2012-12-15 15:23:19 +0000
4@@ -410,13 +410,19 @@
5 'account.bank.statement.line')
6 st_line = account_bank_statement_line_obj.browse(
7 cr, uid, st_line_id, context=context)
8+ period_id = self._get_period(
9+ cr, uid, st_line.date, context=context) # AB
10 # Start account voucher
11 # Post the voucher and update links between statement and moves
12 if st_line.voucher_id:
13 voucher_pool = self.pool.get('account.voucher')
14 wf_service = netsvc.LocalService("workflow")
15 voucher_pool.write(
16- cr, uid, [st_line.voucher_id.id], {'number': st_line_number}, context=context)
17+ cr, uid, [st_line.voucher_id.id], {
18+ 'number': st_line_number,
19+ 'date': st_line.date,
20+ 'period_id': period_id, # AB
21+ }, context=context)
22 if st_line.voucher_id.state == 'cancel':
23 voucher_pool.action_cancel_draft(
24 cr, uid, [st_line.voucher_id.id], context=context)
25@@ -443,8 +449,6 @@
26 context.update({'date': st_line.date})
27 ctxt = context.copy() # AB
28 ctxt['company_id'] = st_line.company_id.id # AB
29- period_id = self._get_period(
30- cr, uid, st_line.date, context=ctxt) # AB
31
32 move_id = account_move_obj.create(cr, uid, {
33 'journal_id': st.journal_id.id,

Subscribers

People subscribed via source and target branches