2017-05-23 0:44 GMT+02:00 Oscar Alvarez <oscar.alvarez.mont...@gmail.com>: > On 20/05/17 03:34, Nicolas Évrard wrote: > > * Oscar Alvarez [2017-05-20 00:04 +0200]: > > Hi Dev, > > > Hello Oscar, > > I am curious is it possible set tree view with numbers of Columns dinamic, > so the columns number must to change when Context change or to exist any way > for reach this? > > > What problems are you trying to solve? > > > Hi Nicolas, > > Dinamic views is important in several cases, the main use is for views used > in reports, for example: > > For balance sheet we need have one view where according to the context > model we can to see just one fiscalyear (1 column), two fiscalyear (2 > columns) or three fiscalyear (3 columns) for comparatives in this case a new > column is add/removed when the user click in reload. > > For stock products quantity report could be used for view one, two, three > columns where the columns represent differents warehouses, according to > warehouses selected in context maybe using "active_ids" > > Qty Qty > Product Warehouse 1 Warehouse 2 > A 5 2 > B 7 3 > C 1 25 > > > For sales is useful for comparative reports, where the user could be view > sales for one month or several months (the same fiscal year) > > When we want to see just one period: > ________________________________________________________________________________________ > > Report Sales / Purchase / Invoice Comparative > ________________________________________________________________________________________ > > Start Period: 2017-02 End Period: 2017-02 <- Many2One > of account.period > ________________________________________________________________________________________ > > Filter: > --------------------------------------------------------------------------------------------------------------------- > Party (Customer / Supplier) | 2017-02 | > --------------------------------------------------------------------------------------------------------------------- > Abc Company INC | $100.00 | > Xyz LLC | $359.00 | > . > . > . > > When we want to see a range of periods: > > ________________________________________________________________________________________ > > Report Sales / Purchase / Invoice Comparative > ________________________________________________________________________________________ > > Start Period: 2017-02 End Period: 2017-04 <- Many2One > of account.period (Just change "End period" field and click in "Reload", so > then more columns are added to treeview) > ________________________________________________________________________________________ > > Filter: > --------------------------------------------------------------------------------------------------------------------- > Party (Customer / Supplier) | 2017-02 | 2017-03 > | 2017-04 | > --------------------------------------------------------------------------------------------------------------------- > Abc Company INC | $100.00 | $500.0 > | $0 | > Xyz LLC | $359.00 | > $ 0 | $733 | > . > . > . > > > This feature make more powerful and flexible reports in views, so the only > way to reach > > I don't know maybe there is more people/developers interested in see and > works around this feature.
That is not possible yet you can find (at least) a couple of workarounds: - You may take a look at babi module at bitbucket were the user can configure a report and recalculate it when needed. That calculation process creates the views that are later shown to the user, and those may include more or less columns depending on data or how the user configured the report. Note that its implementation could be greatly improved by creating model fields on the fly. - When you create a dashboard it is possible to update the data on one of the views when a record is selected in another view. There's a patch * from a long time ago where I proposed a way not only to refresh data but the whole view. That means, that, for example you could select a record in one view and it would show you a graph. But if you select another record, then it shows a calendar, etc. I didn't work on it further but it could be a nice and simple improvement that would allow you to do more or less what you're looking for. * Sorry, I was not able to find it > > Oscar Alvarez > > -- > You received this message because you are subscribed to the Google Groups > "tryton-dev" group. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tryton-dev/d55eb0ba-89de-4800-8383-0c9cda403a9a%40gmail.com. -- Albert Cervera i Areny http://www.NaN-tic.com Tel. 93 553 18 03 -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CADWJ7Gn-dmm43E-r99%2BoCT1t2MrWOVxmEaKg%2BLiEQGNJXt8ZYQ%40mail.gmail.com.