Merge pull request #33 from richierichrawr/master
Docstrings, typo, and return value
This commit is contained in:
@@ -40,11 +40,11 @@ Financial and accounting module that covers:
|
||||
|
||||
Creates a dashboard for accountants that includes:
|
||||
--------------------------------------------------
|
||||
* List of Customer Invoice to Approve
|
||||
* List of Customer Invoices to Approve
|
||||
* Company Analysis
|
||||
* Graph of Treasury
|
||||
|
||||
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line orgrouping is maintained through journal)
|
||||
Processes like maintaining general ledgers are done through the defined Financial Journals (entry move line or grouping is maintained through a journal)
|
||||
for a particular financial year and for preparation of vouchers there is a module named account_voucher.
|
||||
""",
|
||||
'website': 'http://www.openerp.com',
|
||||
|
||||
@@ -59,9 +59,11 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
#TODO: cleanup and comment this code... For now, it is awfulllll
|
||||
# (way too complex, and really slow)...
|
||||
def do_reconcile(self, cr, uid, credits, debits, max_amount, power, writeoff_acc_id, period_id, journal_id, context=None):
|
||||
# for one value of a credit, check all debits, and combination of them
|
||||
# depending on the power. It starts with a power of one and goes up
|
||||
# to the max power allowed
|
||||
"""
|
||||
for one value of a credit, check all debits, and combination of them
|
||||
depending on the power. It starts with a power of one and goes up
|
||||
to the max power allowed.
|
||||
"""
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
if context is None:
|
||||
context = {}
|
||||
@@ -87,11 +89,14 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
return res
|
||||
return False
|
||||
|
||||
# for a list of credit and debit and a given power, check if there
|
||||
# are matching tuples of credit and debits, check all debits, and combination of them
|
||||
# depending on the power. It starts with a power of one and goes up
|
||||
# to the max power allowed
|
||||
|
||||
def check4(list1, list2, power):
|
||||
"""
|
||||
for a list of credit and debit and a given power, check if there
|
||||
are matching tuples of credit and debits, check all debits, and combination of them
|
||||
depending on the power. It starts with a power of one and goes up
|
||||
to the max power allowed.
|
||||
"""
|
||||
def check3(value, list1, list2, list1power, power):
|
||||
for i in range(len(list1)):
|
||||
move = list1[i]
|
||||
@@ -120,6 +125,7 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
res = check4(list1, list2, p)
|
||||
if res:
|
||||
return res
|
||||
return False
|
||||
|
||||
ok = True
|
||||
reconciled = 0
|
||||
|
||||
Reference in New Issue
Block a user