Merge lp:~jfb-tempo-consulting/unifield-wm/us-124 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 2410
Proposed branch: lp:~jfb-tempo-consulting/unifield-wm/us-124
Merge into: lp:unifield-wm
Diff against target: 27 lines (+5/-1)
2 files modified
account_override/account.py (+4/-0)
msf_doc_import/account.py (+1/-1)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-wm/us-124
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+252729@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_override/account.py'
2--- account_override/account.py 2015-02-19 14:55:53 +0000
3+++ account_override/account.py 2015-03-12 11:12:42 +0000
4@@ -775,6 +775,10 @@
5 self.unlink(cr, uid, to_delete, context, check=False)
6 return True
7
8+ def get_valid_but_unbalanced(self, cr, uid, context=None):
9+ cr.execute("select move_id, sum(debit-credit) from account_move_line where state='valid' group by move_id having abs(sum(debit-credit)) > 0.00001")
10+ return [x[0] for x in cr.fetchall()]
11+
12 account_move()
13
14 class account_move_reconcile(osv.osv):
15
16=== modified file 'msf_doc_import/account.py'
17--- msf_doc_import/account.py 2014-12-12 08:34:58 +0000
18+++ msf_doc_import/account.py 2015-03-12 11:12:42 +0000
19@@ -452,7 +452,7 @@
20 # Check if all is ok for the file
21 ## The lines should be balanced for each currency
22 for c in money:
23- if (money[c]['debit'] - money[c]['credit']) >= 10**-2:
24+ if abs(money[c]['debit'] - money[c]['credit']) >= 10**-2:
25 raise osv.except_osv(_('Error'), _('Currency %s is not balanced: %s') % (money[c]['name'], (money[c]['debit'] - money[c]['credit']),))
26 # Update wizard
27 self.write(cr, uid, ids, {'message': _('Check complete. Reading potential errors or write needed changes.'), 'progression': 100.0})

Subscribers

People subscribed via source and target branches