Tryton - Issues

 

Issue6747

Title The period context from income statement is not propagated to accounts and move lines
Priority feature Status testing
Superseder The period context from income statement is not propagated to accounts and move lines
View: 6747
Nosy List ced, pokoli, reviewbot, roundup-bot, udono
Type behavior Components account
Assigned To pokoli Keywords review
Reviews 36631002,43961002
View: 36631002, 43961002

Created on 2017-09-05.11:05:55 by udono, last changed by reviewbot.

Messages
review43961002 updated at https://codereview.tryton.org/43961002/#ps140006
review43961002 updated at https://codereview.tryton.org/43961002/#ps120001
review43961002 updated at https://codereview.tryton.org/43961002/#ps80001
msg38344 (view) Author: [hidden] (udono) Date: 2018-02-13.14:15:29
It seems the problem on the balance sheet are context in-sensitive
defaults in http://hg.tryton.org/modules/account/file/tip/account.py#l1415
msg38342 (view) Author: [hidden] (udono) Date: 2018-02-13.13:35:51
> Balance Sheet
> -------------
> The Balance Sheet does not propagate values to the context form of
> accounts and move lines. It is always filled with the default today date.
> Additionally there is a 'compare' 

'comparison'

> Boolean on the context form, which has no functionality here.
msg38341 (view) Author: [hidden] (udono) Date: 2018-02-13.13:27:49
I tested review43961002 and review39131002 (from issue7117), here are my
results:

Balance Sheet
-------------
The Balance Sheet does not propagate values to the context form of
accounts and move lines. It is always filled with the default today date.
Additionally there is a 'compare' Boolean on the context form, which has no
functionality here.


Income Statement
----------------
The resulting accounts and moves from income statement looks good and
functioning.
All values are propagated from the income statement to the context form of the
accounts.
There is no 'compare' Boolean on the context form.
review43961002 updated at https://codereview.tryton.org/43961002/#ps60001
msg38232 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-02-06.13:16:58
I've created issue7117 which adds the context_model on the client and it's required to test the last version of the review.
msg38216 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-06.00:11:19
I can not find any better solution than a wizard but the selection of which action to trigger should depend on the context and not on the active_ids. I think this will require that the client will set also the context model in the action data.
Also the account chart should have a context model.
msg38212 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-02-05.14:23:25
The main issue here is that from the action it's not possible to select which tree_action should be executed (and that's why the wizard is need). 

One idea will be to add a domain on the action keywords, to restrict on which values the keyword is available. Like we do for view inheritance. 

Thoughts?
msg38199 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-05.10:59:36
I think a better solution should be found.
review43961002 updated at https://codereview.tryton.org/43961002/#ps40001
msg38197 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-02-05.10:48:05
Ok, I see your point. I've updated the review re-adding the wizard to decide which model to open while keeping the context values and include the type rec_name as action title.
msg38185 (view) Author: [hidden] (udono) Date: 2018-02-03.10:03:33
Income Statement and Balance Sheet are both account.type reports.
While  general ledger accounts (Sergis path) seems the appropriate
report for income statements, the account report seems the appropriate
report for balance sheet (status quo).

With Sergis patch the accounts in the balance sheet are empty.

IMHO we need to separate the reports for balance sheet and income 
statement. I see no other way then using a wizard which decides to use
general ledger accounts for income statement and account for balance sheet.
msg38184 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-02.22:14:12
Please be precise about what is broken?
msg38183 (view) Author: [hidden] (udono) Date: 2018-02-02.20:49:38
review43961002 works fine with the income statement and solves this issue.

But as a side effect it breaks the functionality of the balance sheet, which was correct before.
review43961002 updated at https://codereview.tryton.org/43961002/#ps20001
msg38147 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-02-01.14:36:48
Here is review43961002 which opens the general ledger accounts, and then everything works as expected.
msg38145 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-01.14:16:04
For me, it should open the general ledger instead of the accounts.
msg38144 (view) Author: [hidden] (udono) Date: 2018-02-01.13:58:21
IMHO we have two issues here:

    * the functional fields from the account module do not know about the
      start_period and end_period context keywords, as sergi resumed in
      msg35532.
    * the shown move lines needed to be filtered by date 
      between start period and end period.

I do not see another way as using wizards and reverting review36631002

What do you think?
msg38143 (view) Author: [hidden] (udono) Date: 2018-02-01.13:48:29
I tested the scenario again on http://demo4.6.tryton.org/
with Income Statement 

    * Fiscalyear: 2017
    * Start Period: 2017-01
    * End Period: 2017-09
    * Type: Revenue

and I am sure the issue is not solved.
In the resulting list of Revenue accounts (only Main Revenue)
and the linked account moves, the Start Period and/or End Period
filter is not applied to the sums and to the move lines.
New changeset 1c84cd0bb05f by C├ędric Krier in branch 'default':
Replace tree open wizard by simple relate
http://hg.tryton.org/modules/account/rev/1c84cd0bb05f
review36631002 updated at https://codereview.tryton.org/36631002/#ps1
msg35753 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-09-23.23:46:03
Here is review36631002
msg35532 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-09-05.12:21:09
Indeed is a missing feature as the functional fields from the account module do not know about the start_period and end_period context keywords.
msg35531 (view) Author: [hidden] (udono) Date: 2017-09-05.11:05:54
copied from: https://groups.google.com/forum/#!topic/tryton/uwhl8dXL30A

The fiscal year/period context from the dynamic views of income statement
is not propagated to the underlying accounts and move lines.


Scenario
--------
Having a fiscal year with many periods and account moves using relevant
accounts for income statement.

Show the dynamic view of the income statement. with::

    Menu: Financial / Reporting /Income Statement

In the context header choose a fiscal year, start period and end period.
After reload, the tree view and the accumulated sums of the income
statement are updated.
*Double-clicking* or pressing *Enter* on an account type with connected
accounts, shows

    * a different accumulated sum than in the income statement.

Entering one of these accounts, shows all move lines in all open
periods, but

    * it should only show move lines in the given periods of the
      context.
History
Date User Action Args
2018-02-15 17:52:27reviewbotsetmessages: + msg38387
2018-02-15 17:23:57reviewbotsetmessages: + msg38384
2018-02-14 19:09:48cedsetsuperseder: + The period context from income statement is not propagated to accounts and move lines
2018-02-14 19:09:48cedlinkissue6747 superseder
2018-02-14 19:09:45cedunlinkissue7117 superseder
2018-02-14 09:55:32reviewbotsetmessages: + msg38364
2018-02-13 14:15:29udonosetmessages: + msg38344
2018-02-13 13:35:52udonosetmessages: + msg38342
2018-02-13 13:27:50udonosetmessages: + msg38341
2018-02-06 13:24:21reviewbotsetmessages: + msg38234

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