Trial Balance/General Ledger Missing account or period_ids

Bug #929185 reported by Thomas Winteler (Win-Soft)
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Camptocamp Financial Addons
Fix Released
Low
Guewen Baconnier @ Camptocamp

Bug Description

hey

today i "bzr pulled" the financial addons from c2c... now if i want create a "General Ledger" or a "Trial Balance" i get:

(<type 'exceptions.Exception'>, Exception('Missing account or period_ids',), <traceback object at 0x2140b90>)

Whole server output:
[2012-02-08 23:52:24,908][apz_20120201] ERROR:web-services:[01]: Exception: Missing account or period_ids
[2012-02-08 23:52:24,908][apz_20120201] ERROR:web-services:[02]: Traceback (most recent call last):
[2012-02-08 23:52:24,908][apz_20120201] ERROR:web-services:[03]: File "/home/thomi/Daten/openerp-dev/development/server/bin/service/web_services.py", line 724, in go
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[04]: (result, format) = obj.create(cr, uid, ids, datas, context)
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[05]: File "/home/thomi/Daten/openerp-dev/development/server/bin/addons/report_webkit/webkit_report.py", line 372, in create
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[06]: result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[07]: File "/home/thomi/Daten/openerp-dev/development/server/bin/report/report_sxw.py", line 481, in create_source_pdf
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[08]: return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
[2012-02-08 23:52:24,909][apz_20120201] ERROR:web-services:[09]: File "/home/thomi/Daten/Organisation/Kunden/A/APZ Direct AG/Informationen/Projekte/OpenERP/AgileBG SVN/svn/account_financial_report_webkit/report/webkit_parser_header_fix.py", line 156, in create_single_pdf
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[10]: self.parser_instance.set_context(objs, data, ids, report_xml.report_type)
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[11]: File "/home/thomi/Daten/Organisation/Kunden/A/APZ Direct AG/Informationen/Projekte/OpenERP/AgileBG SVN/svn/account_financial_report_webkit/report/account_report_general_ledger.py", line 106, in set_context
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[12]: init_balance_memoizer = self._compute_initial_balances(accounts, start, fiscalyear)
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[13]: File "/home/thomi/Daten/Organisation/Kunden/A/APZ Direct AG/Informationen/Projekte/OpenERP/AgileBG SVN/svn/account_financial_report_webkit/report/common_report_header_webkit.py", line 379, in _compute_initial_balances
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[14]: res[acc.id] = self._compute_init_balance(acc.id, bs_period_ids)
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[15]: File "/home/thomi/Daten/Organisation/Kunden/A/APZ Direct AG/Informationen/Projekte/OpenERP/AgileBG SVN/svn/account_financial_report_webkit/report/common_report_header_webkit.py", line 325, in _compute_init_balance
[2012-02-08 23:52:24,910][apz_20120201] ERROR:web-services:[16]: raise Exception('Missing account or period_ids')
[2012-02-08 23:52:24,911][apz_20120201] ERROR:web-services:[17]: Exception: Missing account or period_ids

Before this "bzr pull" the report have worked fine...

thanks for feedback and fixing.

thomi

Related branches

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

We do not have such problem like this on any on our installation.

Maybe you have some special configuration which may lead to this issue ? Do you have some ideas which can help us to find the conditions to reproduce it ?
Do you have an opening period on the first january (with special flag) ? Other periods which are flagged as "special" ?

Thanks
Guewen

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :
Download full text (6.4 KiB)

Hey Guewen

Tried today to find out, what is special in my customers database. Btw. i'm working with Agile BG on that customer... think you know that guys...

I tried to get some more information with GTK client and the switch "-l debug_rpc_answer"..

I get this output:
DEBUG_RPC:rpc.request:('execute', 'apz_20120201', 24, '*', ('account.report.general.ledger.webkit', 'create', {'centralize': 1, 'chart_account_id': 659, 'journal_ids': [(6, 0, [58, 37, 35, 59, 73, 34, 36])], 'filter': 'filter_no', 'fiscalyear_id': 2, 'account_ids': [(6, 0, [])], 'amount_currency': 0, 'display_account': 'bal_mix', 'target_move': 'posted'}, {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'department_id': False, 'active_ids': [196], 'section_id': False, 'active_id': 196}))
DEBUG_RPC_ANSWER:rpc.result:5
DEBUG_RPC:rpc.request:('execute', 'apz_20120201', 24, '*', ('account.report.general.ledger.webkit', 'read', [5], ['centralize', 'chart_account_id', 'date_from', 'period_to', 'journal_ids', 'filter', 'period_from', 'fiscalyear_id', 'account_ids', 'date_to', 'amount_currency', 'display_account', 'target_move', '__last_update'], {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'section_id': False, 'active_id': 196, 'bin_size': True, 'active_ids': [196], 'department_id': False}))
DEBUG_RPC_ANSWER:rpc.result:[{'centralize': 1, 'chart_account_id': 659, '__last_update': False, 'date_from': False, 'period_to': False, 'journal_ids': [58, 37, 35, 59, 73, 34, 36], 'id': 5, 'filter': 'filter_no', 'period_from': False, 'fiscalyear_id': 2, 'account_ids': [], 'date_to': False, 'amount_currency': 0, 'display_account': 'bal_mix', 'target_move': 'posted'}]
DEBUG_RPC:rpc.request:('execute', 'apz_20120201', 24, '*', ('account.fiscalyear', 'name_get', [2], {'lang': u'en_US', 'tz': False, 'section_id': False, 'department_id': False}))
DEBUG_RPC_ANSWER:rpc.result:[(2, u'2011-MGK')]
DEBUG_RPC:rpc.request:('execute', 'apz_20120201', 24, '*', ('account.report.general.ledger.webkit', 'check_report', [5], {'lang': u'en_US', 'tz': False, 'active_model': 'ir.ui.menu', 'department_id': False, 'active_ids': [196], 'section_id': False, 'active_id': 196}))
DEBUG_RPC_ANSWER:rpc.result:{'type': 'ir.actions.report.xml', 'datas': {'model': 'ir.ui.menu', 'ids': [196], 'form': {'centralize': 1, 'chart_account_id': 659, 'date_from': False, 'period_to': False, 'journal_ids': [58, 37, 35, 59, 73, 34, 36], 'used_context': {'chart_account_id': 659, 'journal_ids': [58, 37, 35, 59, 73, 34, 36], 'fiscalyear': 2}, 'filter': 'filter_no', 'period_from': False, 'fiscalyear_id': 2, 'periods': [], 'date_to': False, 'id': 5, 'amount_currency': 0, 'display_account': 'bal_mix', 'target_move': 'posted', 'account_ids': []}}, 'report_name': 'account.account_report_general_ledger_webkit'}
DEBUG_RPC:rpc.request:('report', 'apz_20120201', 24, '*', ('account.account_report_general_ledger_webkit', [196], {'model': 'ir.ui.menu', 'form': {'centralize': 1, 'chart_account_id': 659, 'date_from': False, 'period_to': False, 'journal_ids': [58, 37, 35, 59, 73, 34, 36], 'used_context': {'chart_account_id': 659, 'journal_ids': [58, 37, 35, 59, 73, 34, 36], 'fiscalyear': 2}, 'filter': 'filter_no', 'period_from': ...

Read more...

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

ok... have more information

if i use current year as "Fiscal Year" it works, even with not filters or date/period filters.

if i use past year 2011 with:
- no filters, i get above error..
- period filter, i get above error

but if i use past year and date filter, the report output works...

i tested this same behavior on my own company database....

thanks for response
thomi

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi Thomas,

Thanks for your precisions, so I was able to find the issue.

The Opening Period is mandatory to run our reports as they use it to read the opening entries.
That's a pre-requesite explained in the module description.

You must create a period on the 01.01 with the flag "Opening Period".

On our side, we'll shortly add a better error message when the Opening Period is missing.

Please inform me if this works.

Guewen

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

"if i use current year as "Fiscal Year" it works, even with not filters or date/period filters."

I presume that you have an opening period this current year ?

"but if i use past year and date filter, the report output works..."

Yeah that's because the opening balances are not computed with the filter by dates.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey Guewen

There are no periods marked as "Opening/Closing Period" even for 2011 nor for 2012...

In each year there are 4 periods, in month:
01-03
04-06
07-09
10-12

... does it mean, i need to create a 5. period for the opening period with a date range of 1.1.2011 to 1.1.2011?
And what about a closing period, do i need create a 6. period for that with date range 31.12.2011 to 31.12.2011?

Before i create those extra periods, i tried to just mark the first period (01-03) as opening period and created the trial balance for 2011 w/o filters.. and it worked.. i get now a initial balance and the "Periods Filters" information shows just 04/2011 to 10/2011, w/o 01/2011...

If i really need the extra opening period, do i also need to transfer those opening baances in 2011 into that new period? We and customer startet at 1.1.2011 with OpenERP.. and the opening balance from 2010 is no in the period 01-03/2011...

Btw. are you c2c dev's anywhere online on IRC? Why not in #openobject to help?

thanks for response..
thomi

Revision history for this message
Frederic Clementi - Camptocamp (frederic-clementi) wrote :

Hello,

you only need to create 1 opening period per FY. No closing period.

In the opening journal + opening period you must have only 1 entry with your opening amounts.

However, reports will work even if you do not create the opening entry ; initial balance will be calculated in this case.

Frederic

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey Frederic

Ok i see... we need a special opening period to compute balance, if in that period entries are or not...

I created this extra opening period:

Name/Code: INIT/2011
Start: 01.01.2011
End: 01.01.2011
Mark as opening/closing period

To prevent users to select this period in any other modul (invoices, journal entries) i closed that special period.

Reports with no filters are working now...

On the report the initial balance is 0, cause the initial entries are in the period 01-03/2011 and not in INIT/2011... and changing the opening entries need to delete them and re enter them, cause we can't just change the period. If i change the period in the opening balance journal entries i get:
Error occurred while validating the field(s) line_id: You cannot create entries on different periods/journals in the same move

Btw. where can we translate those financial reports into german?

Thanks a lot
thomi

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi Thomas.

Great to see you achieved to print the reports.

You can move your opening entries from your period 01-03 to the opening period with a simple sql query if you have a means to differentiate them (an opening journal as instance):
UPDATE account_move_line SET period_id = [YOUR OPENING PERIOD ID] WHERE period_id = [YOUR 01-03 PERIOD ID] and journal_id = [YOUR OPENING JOURNAL];

For the translation, you can use the bazaar branch lp:c2c-financial-addons/6.0 and propose us a merge proposal if you are comfortable with this procedure.

Otherwise you can use this file http://bazaar.launchpad.net/~c2c/c2c-financial-addons/6.0/view/head:/account_financial_report_webkit/i18n/account_financial_report_webkit.pot and rename it to de.po

And send us (by PM or on guewen.baconnier [here the at] camptocamp.com) the file once translated, we'll be pleased to merge it in the branch.

Best Regards
Guewen

Changed in c2c-financial-addons:
importance: Undecided → Low
status: New → Confirmed
Changed in c2c-financial-addons:
assignee: nobody → Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
Changed in c2c-financial-addons:
status: Confirmed → In Progress
Changed in c2c-financial-addons:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.