c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #24248
[Bug 783123] [NEW] account chart - start and end period reversed
Public bug reported:
after selectiong the fiscal year the start/end periods show up in the
wrong fields
obviously the UNION statement in
account/wizard/account_chart.py
does not guarantee a correct result, even the period id's are ascending
IMHO these statements must be separated
cr.execute('''
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.date_start < NOW()
ORDER BY p.date_stop DESC
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/783123
Title:
account chart - start and end period reversed
Status in OpenERP Modules (addons):
New
Bug description:
after selectiong the fiscal year the start/end periods show up in the
wrong fields
obviously the UNION statement in
account/wizard/account_chart.py
does not guarantee a correct result, even the period id's are ascending
IMHO these statements must be separated
cr.execute('''
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
WHERE f.id = %s
AND p.date_start < NOW()
ORDER BY p.date_stop DESC
LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
Follow ups
-
[Bug 783123] Re: account chart Fiscal Year Onchange - start and end period is not working for future fiscal year.
From: Mustufa Rangwala (Open ERP), 2011-06-08
-
[Bug 783123] Re: account chart Fiscal Year Onchange - start and end period is not working for future fiscal year.
From: Meera Trambadia (OpenERP), 2011-05-25
-
[Bug 783123] Re: account chart Fiscal Year Onchange - start and end period is not working for future fiscal year.
From: Launchpad Bug Tracker, 2011-05-23
-
[Bug 783123] Re: account chart Fiscal Year Onchange - start and end period is not working for future fiscal year.
From: Meera Trambadia (OpenERP), 2011-05-23
-
[Bug 783123] Re: account chart Fiscal Year Onchange - start and end period is not working for future fiscal year.
From: Vinay Rana (openerp), 2011-05-19
-
[Bug 783123] Re: account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-17
-
[Bug 783123] Re: account chart - start and end period reversed
From: Edwin Dsouza(OpenERP), 2011-05-17
-
[Bug 783123] Re: account chart - start and end period reversed
From: Edwin Dsouza(OpenERP), 2011-05-17
-
[Bug 783123] Re: account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-15
-
[Bug 783123] Re: account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-15
-
[Bug 783123] Re: account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-15
-
[Bug 783123] Re: account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-15
-
[Bug 783123] [NEW] account chart - start and end period reversed
From: Ferdinand @ Camptocamp, 2011-05-15
References