[6.0 trunk] with Swiss localisation (l10n_ch) - BS and P&L reports empty

Bug #707314 reported by Bogdan Stanciu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
Unassigned

Bug Description

Hi there!

when using latest rev w/ Swiss localisation, the BS and P&L reports (FInance/Reporting/Legal Reports) print pdfs with no data. Of course, some test data exist in the system...

Please investigate.

Thank you
Bogdan

Related branches

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :
Revision history for this message
Bogdan Stanciu (bstanciu) wrote :
Revision history for this message
Bogdan Stanciu (bstanciu) wrote :
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Please can you assign me this bug I will propose a merge proposal on friday. I think there is an error an the account type definitions.

Regards

Nicolas

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Hello,

I have found the source of the bug, the bug does not come from l10n_ch but for the reports. The reports have harcoded type but does not uses internal types but user_type of the account that can be manually overridden.

 types = [
            'expense',
            'income'
                ]

for typ in types:
            accounts_temp = []
            for account in accounts:
                if (account.user_type.report_type) and (account.user_type.report_type == typ):

The report should use internal types and not user type. This is clear we have defined and attributed account to swiss account user type.

xrg and qdp should review this bug.

Regards

Nicolas

Changed in openobject-addons:
status: In Progress → Invalid
Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 707314] Re: [6.0 trunk] with Swiss localisation (l10n_ch) - BS and P&L reports empty

On 25. 01. 11 15:27, Nicolas Bessi - Camptocamp wrote:
> Please can you assign me this bug I will propose a merge proposal on
> friday. I think there is an error an the account type definitions.
>
> Regards
>
> Nicolas
>
Hello Nicolas,

I am not completely sure what you meant in your message, but:

I think the issue is about the data which go into account.account.type
table (report_type field) which is set to none instead of asset, liab, etc.
(coming from l10n_ch/sterchi_chart/account.xml)

Now i have numbers in the BS (I mean once I updated the table)

Is there any risk that I affect any other localisation process, by
adding the missing info?

Any advice is welcome!

Best regards,
Bogdan

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 25. 01. 11 15:39, Nicolas Bessi - Camptocamp wrote:
> Hello,
>
> I have found the source of the bug, the bug does not come from l10n_ch
> but for the reports. The reports have harcoded type but does not uses
> internal types but user_type of the account that can be manually
> overridden.
>
> types = [
> 'expense',
> 'income'
> ]
>
> for typ in types:
> accounts_temp = []
> for account in accounts:
> if (account.user_type.report_type) and (account.user_type.report_type == typ):
>
> The report should use internal types and not user type. This is clear we
> have defined and attributed account to swiss account user type.
>
> xrg and qdp should review this bug.
>
> Regards
>
> Nicolas
>
>
> ** Changed in: openobject-addons
> Status: In Progress => Invalid
>
As far as I understand the doc, we should use 'Account Type' (user_type)
for reporting. The 'Internal Type' (type) field is used in some
mysterious ways:-)
and the report does work (not yet sure if correctly) once I updated the
user_type field with some asset/liability info, as some other COA.

Now if the Swiss COA was built with some other logic, it will be a bit
difficult to get the right numbers..

I hope this helps a bit...

regards,
Bogdan

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → Nicolas Bessi - Camptocamp (nbessi-c2c)
Changed in openobject-addons:
status: Invalid → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

hello,

Thanks for your comment, I had a bad understanding of the bug meaculpa (too many thing to do, not enough time).

I will provide a patch of the XML on friday.
        <record model="account.account.type" id="account_type_fixed_asset">
            <field name="name">Bilan : Immo corporelles mobilieres</field>
            <field name="code">fixed_asset</field>
            <field name="close_method">balance</field>
        </record>

report_type is not set. Sadly I was tricked by the default value in the field so XML parsing does not raise any error.

Regards

Nicolas

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 26. 01. 11 09:13, Nicolas Bessi - Camptocamp wrote:
> hello,
>
> Thanks for your comment, I had a bad understanding of the bug meaculpa
> (too many thing to do, not enough time).
>
> I will provide a patch of the XML on friday.
> <record model="account.account.type" id="account_type_fixed_asset">
> <field name="name">Bilan : Immo corporelles mobilieres</field>
> <field name="code">fixed_asset</field>
> <field name="close_method">balance</field>
> </record>
>
> report_type is not set. Sadly I was tricked by the default value in the
> field so XML parsing does not raise any error.
>
> Regards
>
> Nicolas
>
Nicolas,

Please have a look to the diff, I needed the change sooner than on
Friday, so I did it myself. I hope it is correct.

Best regards,
Bogdan

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Hello,

I will not have to review before friday, but patch seems OK I have asked Luc (Finance expert team) to validate link between type and account.type. It will not impact future update as the xml is inside noupdate = 1.

Nicolas.

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :
Changed in openobject-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.