Tryton - Issues

 

Issue8516

Title Income statement is empty when using the spanish chart of accounts
Priority bug Status resolved
Superseder Nosy List ced, pokoli, reviewbot, roundup-bot
Type behavior Components account, account_es
Assigned To pokoli Keywords review
Reviews 261871002,263921002
View: 261871002, 263921002

Created on 2019-07-22.14:42:07 by pokoli, last changed by roundup-bot.

Messages
New changeset 37a2d33796cd by Sergi Almacellas Abellana in branch 'default':
Include type with None statment on Income Statment report
https://hg.tryton.org/tryton-env/rev/37a2d33796cd
New changeset 3ac457b397a3 by Sergi Almacellas Abellana in branch 'default':
Include Income Statement as part of Balance Sheet
https://hg.tryton.org/modules/account_es/rev/3ac457b397a3
New changeset cd3df93bd4b8 by Sergi Almacellas Abellana in branch 'default':
Include type with None statment on Income Statment report
https://hg.tryton.org/modules/account/rev/cd3df93bd4b8
msg50827 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-24.09:23:10
So we also need review263921002 to implement msg50824
msg50824 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-23.22:00:56
Put the income statement inside the balance is a good practice.
But I think as there are no constraint for that, we still should improve the domain of Income statement to work with parent with NULL statement value.
review261871002 updated at https://codereview.tryton.org/261871002/#ps253871002
msg50805 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-23.10:07:26
You are completly right. I've updated the review changing all the xml IDS and now there is no need for migration.
msg50781 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-22.18:05:06
On 2019-07-22 18:02, Sergi Almacellas Abellana wrote:
> > So you must change the XML ids.
> 
> An what will be the benefit? 

No migration needed.

> The data for the type templates will be ok but as the update chart does not manage the parent update all the values of the account.type will be still wrong and the issue won't be fixed.

I do not understand. If you have new record that will have correct
values.
msg50780 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-22.18:02:29
> So you must change the XML ids.

An what will be the benefit? 

The data for the type templates will be ok but as the update chart does not manage the parent update all the values of the account.type will be still wrong and the issue won't be fixed.
msg50779 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-22.17:33:47
So you must change the XML ids.
msg50778 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-22.17:29:19
> Why does it need a migration script? The XML should manage the update.

Because the update chart does not manage parent update: https://bugs.tryton.org/issue5023
msg50772 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-22.16:42:13
Why does it need a migration script? The XML should manage the update.
review261871002 updated at https://codereview.tryton.org/261871002/#ps273631002
msg50770 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-22.16:28:50
Ok, so I uploaded review261871002 which includes Income Statement inside Balance sheet. 

For existing databases the following sql queries should be executed to update:

update account_account_type_template set parent = (select db_id from ir_model_data np where module = 'account_es' and fs_id = 'es_balance_resultado_del_ejercicio_normal') where parent in (select db_id from ir_model_data where module = 'account_es' and fs_id = 'es_pyg_resultado_ejercicio_normal');
update account_account_type_template set parent = (select db_id from ir_model_data np where module = 'account_es' and fs_id = 'es_balance_resultado_del_ejercicio_pyme') where parent in (select db_id from ir_model_data where module = 'account_es' and fs_id = 'es_pyg_resultado_ejercicio_pyme');
update account_account_type as t set parent = p.id                             
from account_account_type_template tt, account_account_type_template pt, account_account_type p
where pt.id  = tt.parent and t.template = tt.id and p.template = pt.id; 

I will include them on migration page.
msg50769 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-22.15:16:12
For me, it is not normal that the income statement is not inside the balance sheet because this gives an incomplete balance sheet until the closing.
msg50768 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-07-22.14:42:06
When using the account_es module on latest trunk the Income Statement report does not show any information. 

That's because the domain includes only types of 'income' statement, that do not have any parent or it's parent is of type 'income'. 

The spanish chart of account includes a parent type which has no type, which causes no type to be shown on the income statement.
History
Date User Action Args
2019-07-26 09:50:34roundup-botsetmessages: + msg50909
2019-07-26 09:50:27roundup-botsetmessages: + msg50908
2019-07-26 09:50:22roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg50907
2019-07-24 09:23:11pokolisetreviews: 261871002 -> 261871002,263921002
component: + account
messages: + msg50827
2019-07-23 22:00:56cedsetmessages: + msg50824
2019-07-23 10:29:37reviewbotsetmessages: + msg50808
2019-07-23 10:07:26pokolisetmessages: + msg50805
2019-07-22 18:05:06cedsetmessages: + msg50781
2019-07-22 18:02:30pokolisetmessages: + msg50780
2019-07-22 17:33:48cedsetmessages: + msg50779

Showing 10 items. Show all history (warning: this could be VERY long)