Jagdish Panchal (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-912623-jap into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #912623 in OpenERP Addons: "[account] Missing date on fiscalyear clousure"
https://bugs.launchpad.net/openobject-addons/+bug/912623
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-912623-jap/+merge/88317
Hello,
account: add Missing date on fiscalyear clousure wizard
account.fiscalyear.close" --fixes=lp:912623
Thanks
JAP
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-912623-jap/+merge/88317
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-912623-jap.
=== modified file 'account/wizard/account_fiscalyear_close.py'
--- account/wizard/account_fiscalyear_close.py 2011-11-09 18:12:56 +0000
+++ account/wizard/account_fiscalyear_close.py 2012-01-12 09:12:24 +0000
@@ -105,6 +105,7 @@
'name': '/',
'ref': '',
'period_id': period.id,
+ 'date': period.date_start,
'journal_id': new_journal.id,
}
move_id = obj_acc_move.create(cr, uid, vals, context=context)
@@ -118,7 +119,6 @@
AND a.type != 'view'
AND t.close_method = %s''', ('unreconciled', ))
account_ids = map(lambda x: x[0], cr.fetchall())
-
if account_ids:
cr.execute('''
INSERT INTO account_move_line (
@@ -130,11 +130,11 @@
(SELECT name, create_uid, create_date, write_uid, write_date,
statement_id, %s,currency_id, date_maturity, partner_id,
blocked, credit, 'draft', debit, ref, account_id,
- %s, date, %s, amount_currency, quantity, product_id, company_id
+ %s, (%s) AS date, %s, amount_currency, quantity, product_id, company_id
FROM account_move_line
WHERE account_id IN %s
AND ''' + query_line + '''
- AND reconcile_id IS NULL)''', (new_journal.id, period.id, move_id, tuple(account_ids),))
+ AND reconcile_id IS NULL)''', (new_journal.id, period.id, period.date_start, move_id, tuple(account_ids),))
#We have also to consider all move_lines that were reconciled
#on another fiscal year, and report them too
@@ -149,7 +149,7 @@
b.name, b.create_uid, b.create_date, b.write_uid, b.write_date,
b.statement_id, %s, b.currency_id, b.date_maturity,
b.partner_id, b.blocked, b.credit, 'draft', b.debit,
- b.ref, b.account_id, %s, b.date, %s, b.amount_currency,
+ b.ref, b.account_id, %s, (%s) AS date, %s, b.amount_currency,
b.quantity, b.product_id, b.company_id
FROM account_move_line b
WHERE b.account_id IN %s
@@ -157,7 +157,7 @@
AND b.period_id IN ('''+fy_period_set+''')
AND b.reconcile_id IN (SELECT DISTINCT(reconcile_id)
FROM account_move_line a
- WHERE a.period_id IN ('''+fy2_period_set+''')))''', (new_journal.id, period.id, move_id, tuple(account_ids),))
+ WHERE a.period_id IN ('''+fy2_period_set+''')))''', (new_journal.id, period.id, period.date_start, move_id, tuple(account_ids),))
#2. report of the accounts with defferal method == 'detail'
cr.execute('''
@@ -180,11 +180,11 @@
(SELECT name, create_uid, create_date, write_uid, write_date,
statement_id, %s,currency_id, date_maturity, partner_id,
blocked, credit, 'draft', debit, ref, account_id,
- %s, date, %s, amount_currency, quantity, product_id, company_id
+ %s, (%s) AS date, %s, amount_currency, quantity, product_id, company_id
FROM account_move_line
WHERE account_id IN %s
AND ''' + query_line + ''')
- ''', (new_journal.id, period.id, move_id, tuple(account_ids),))
+ ''', (new_journal.id, period.id, period.date_start, move_id, tuple(account_ids),))
#3. report of the accounts with defferal method == 'balance'
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp