Merge lp:~openbig/bigconsulting/endbalance_changes into lp:bigconsulting

Proposed by gpa(OpenERP)
Status: Superseded
Proposed branch: lp:~openbig/bigconsulting/endbalance_changes
Merge into: lp:bigconsulting
Diff against target: 34 lines (+10/-1)
1 file modified
account_invoice_cash_discount/account_invoice_cash_discount.py (+10/-1)
To merge this branch: bzr merge lp:~openbig/bigconsulting/endbalance_changes
Reviewer Review Type Date Requested Status
openbig Pending
Review via email: mp+32068@code.launchpad.net

This proposal has been superseded by a proposal from 2010-08-09.

Description of the change

Changes in the end balance value

To post a comment you must log in.
67. By gpa(OpenERP)

added a new field new_value_balance

68. By gpa(OpenERP)

remove default for the account

69. By gpa(OpenERP)

remove default for the account

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_invoice_cash_discount/account_invoice_cash_discount.py'
2--- account_invoice_cash_discount/account_invoice_cash_discount.py 2010-08-06 12:28:07 +0000
3+++ account_invoice_cash_discount/account_invoice_cash_discount.py 2010-08-09 07:54:44 +0000
4@@ -565,6 +565,7 @@
5 # for bank.statement.lines
6 # In line we get reconcile_id on bank.ste.rec.
7 # in bank stat.rec we get line_new_ids on bank.stat.rec.line
8+ new_end_value = 0.0
9 for move in st.line_ids:
10 context.update({'date':move.date})
11 move_id = account_move_obj.create(cr, uid, {
12@@ -773,6 +774,9 @@
13 'amount_currency': amount_currency,
14 'currency_id': currency_id,
15 }, context=context)
16+
17+ new_end_value += amount+st_tax_amount-newline_sum
18+
19 account_move_line_obj.create(cr, uid, {
20 'name': move.name,
21 'date': move.date,
22@@ -820,7 +824,12 @@
23 if st.journal_id.entry_posted:
24 account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
25 done.append(st.id)
26- self.write(cr, uid, done, {'state':'confirm'}, context=context)
27+
28+ #### to write the balace value in the ending balance
29+ balance_end_value = 0.0
30+ balance_start_value = self.browse(cr, uid, st.id, context=context).balance_start
31+ balance_end_value = balance_start_value + new_end_value
32+ self.write(cr, uid, done, {'state':'confirm','balance_end_real':balance_end_value}, context=context)
33
34 return True
35

Subscribers

People subscribed via source and target branches