account_balance_reporting : Error calculando balances

Bug #480630 reported by Eduardo Ruiz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Spanish Localization Project
Fix Released
Low
Borja López Soilán (NeoPolus)

Bug Description

Hola !

estoy probando el módulo y me he encontrado un problemilla al calcular balances. El error se produce en account_balance_report.py:
315 template_value = template_value.split(';')[0]
(AttributeError: 'bool' object has no attribute 'split')

al actualizar datos desde la plantilla cuando se trata de lineas sin valores en current_value / previous_value.

Pero le tendría que dar error a cualquiera, no?, o estoy haciendo algo mal.

Saludos,

Eduardo

Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

I don't think this one is a problem with Spanish translation

For this problem thanks to made a report in English.

Regards,

Changed in openerp-spain:
assignee: nobody → Borja López Soilán (Pexego) (borjals)
status: New → In Progress
Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Realmente era un gazapo del módulo "account_balance_reporting", no se estaba comprobando que template_value fuera un string (podía ser nulo en lugar de una cadena vacía).
Debería estar corregido en la revisión 162.

It really was a bug with the "account_balance_reporting" module, it wasn't checking if template_value was a string (it might be a null instead of an empty string).
It should be fixed in the 162 revision.

Changed in openerp-spain:
status: In Progress → Fix Committed
Revision history for this message
Eduardo Ruiz (readylan) wrote :

Hi Christophe, you're absolutely right.

There is an error processing a report in "account_balance_reporting" module.

When you press [calculate] button you get an error ( .... (AttributeError: 'bool' object has no attribute 'split') ) on this line:
-- 315 template_value = template_value.split(';')[0]
due to some template lines have no values in current_value / previous_value fields.

Regards,

Eduardo

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

Christophe, maybe this module should go in extra-addons or even addons in the future (as it may be used for any country), but it has been developed to cover the Spanish fiscal needs (yearly fiscal comparative balance reports), so currently it is inside the Spanish localization.

Changed in openerp-spain:
status: Fix Committed → Fix Released
importance: Undecided → Low
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Is this problem only in spanish accounting ?

If yes why don't you put it in l10n_es or l10n_es_reporting ?
We do the same for the french accouting and put it in l10n_fr

It's just an idea

Best regards,

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :
Download full text (3.5 KiB)

Christophe, is not so simple :)

This bug was detected on one module developed to cover the Spanish accounting needs, but that module has been developed to be reusable for another countries (so it may be moved into extra_addons or addons when it's stable enough).

As far as I know, on France you have the "Bilan" and "Compte de resultat" reports. On Spain we have some similar reports called "Balance" (balance) and "Perdidas y ganancias" (profit and losses), easy so far, now is when it becomes complicated:
- We have two main chart of accounts, and companies use one of them depending on their size ("PGCE 2008" for big companies and the simpler "PGCE PYMES 2008" for medium and small companies). Also, some industries have specific charts of accounts (though based on those two).
- There are three 'balance'-like reports depending on the size of the company (the shorter "Balance PYMES", "Balance Abreviado" and the more complex "Balance normal"). There are also three 'profit and losses'-like reports. And industries with specific charts of account have specific versions of this reports. And they are big and complex: Just as an example the "Balance normal" usually has more than 120 lines/concepts.
- There are some extra reports about the 'net flow state' and 'cash flow state' (or something like that, I really don't know if that's the best translation), again with different versions depending on the company size.

So in the end, we have a bunch of reports to make, and they might need to be modified for the final partners (if they use a specific chart of accounts).

We took a look at how those "Bilan" and "Compte de resultat" were implemented for France, and we though that it was too messy: some of the data is specified on the report itself (for example the "ACTIF"), and some of the data comes from a XML file (for example the "SOLDES INTERMEDIAIRES DE GESTION").

So in the end we created 2 modules:
  - One generic module that serves as an engine to create this kind of balance-like reports based on templates. We called this "account_balance_reporting", and (we hope) it may be generic enough to be used on other countries like France :)
  - One module with the templates for the Spanish reports, called l10n_ES_account_balance_report.

The "account_balance_reporting" is still too fresh (still a beta, you might think), but I think is far easier to create reports this way. It's features:
 - Templates may be created or edited from OpenERP by the final user.
 - Line values may be calculated from the account chart (sum or difference of the balance of some accounts), or calculated from another lines (sum of other concepts, sum of its childs...)
 - Report data is calculated on OpenERP, and stored for future reference.
 - You can select which fiscal years to compare or even which periods.
 - The user might 'retouch' the data after it has been calculated. This is needed for Spanish reports as the user may add references to notes on the lines. ...though it also gives the user the opportunity to 'fix' small mistakes ;).
 - You might have more that one printing report, and you can select witch one you want to use. So far two generic RML reports are provided: one that pr...

Read more...

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.