[tryton-dev] Un-assigned Tryton issue tracker requests

2018-01-06 Thread Tryton issue tracker
Created ID   Activity   Title
===
 bug
26 months ago 5131 2 days ago Open Chart of Accounts Application Error  
 bug
1 week ago  7035 1 week ago OS X Client 4.6.1 Crash   
 bug
2 weeks ago 7026 2 weeks ago Unable to inactivate reports from user ...
 bug
1 month ago 6970 1 month ago getting sometimes "ERROR: 'NoneType' o ...
 bug
27 months ago 5030 1 month ago Error connecting with Tryton client fr ...
 bug
5 months ago 6672 2 months ago Unable to update product cost_price   
 bug
8 months ago 6470 8 months ago Old migration to rename packing to shi ...
 bug
15 months ago 5905 15 months ago Display bug in tryton client with ubun ...
 bug
35 months ago 4582 35 months ago Display datetime before epoch on windows  
 bug
37 months ago 4359 37 months ago Windows client error when image size i ...

To view or respond to any of the requests listed above, visit the URL

   https://bugs.tryton.org/

and click on "Show Unassigned". Do NOT respond to this message.

-- 
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/20180106230002.B5D0311801B3%40moretus.b2ck.com.


Re: [tryton-dev] group by tree with table query

2018-01-06 Thread Roei Erez
On Saturday, 6 January 2018 04:24:41 UTC-5, Sergi Almacellas Abellana  wrote:
> On 6 de gener de 2018 2.06.53 CET, Roei Erez  wrote:
> >Hi,
> >
> >We have a system with tests, each Test has a many2one field of User who
> >is its executor and a time that the test execution took.
> >We would like to show a tree view that shows average time per test and
> >when click on a test it is like a pivot table that opens the users and
> >show the total per user.
> >
> >
> >Name|  Average Time
> >
> >+Test1   |2 hours
> >  User11  hours
> >  User2  | 1 hours
> >
> >
> >We saw such tree views in the client but we would like to implement
> >that without inserting real rows into the database for this tree view
> >but rather query the information from the existing Test model table
> >(using table query maybe?)
> 
> Yes you should use a new model which defines the table_query method. This 
> method must return a python-sql query with the computed data. In adition to 
> the displayed data you must compute the id, create_uid, create_date, 
> write_uid and write_date.
> 
> In order to open the records detail you can use the tree_open keyword which 
> will trigger a new action. This action will recieve the id of the clicked 
> record on the active_id keyword. So it mus have a domain like:
> 
> [('some_field', '=', Eval('active_id'))] 
> 
> In order to show only the related records on the target model.
> >
> >Appreciate if someone can help here, or refer me to an example of such
> >requirements.
> >Thanks.
> 
> 
> 
> -- 
> Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi 
> brevedad.

Hi Sergi,

Appreciate your response and help.
I have a few more questions on this:
1. Computing the ids: since this is a custom model for analytics and the 
records don't really exist, so do I have to create some "fake" ids?
2. I was looking here: http://demo4.4.tryton.org/ and what I need is the 
Financial/Reporting/Balance Sheet report. To get like a grouped time per test 
split by users.

I looked at the source for this but it looks like they have actual records in 
the database and I am looking to do it with table query without the need to 
insert a record per test per user just for analytics.
Deeper looking I saw that the way to tell the client that it is an expanded 
table is to use the field_childs on the treeview and then returns the child ids 
in that field. The problem is that I don't have real records with ids, so I 
wonder if there is and sample that I can look at.

Thanks,
Roei.

-- 
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/d68b39b3-9525-464d-b766-d43d8c746ba2%40googlegroups.com.


Re: [tryton-dev] group by tree with table query

2018-01-06 Thread Sergi Almacellas Abellana


On 6 de gener de 2018 2.06.53 CET, Roei Erez  wrote:
>Hi,
>
>We have a system with tests, each Test has a many2one field of User who
>is its executor and a time that the test execution took.
>We would like to show a tree view that shows average time per test and
>when click on a test it is like a pivot table that opens the users and
>show the total per user.
>
>
>Name|  Average Time
>
>+Test1   |2 hours
>  User11  hours
>  User2  | 1 hours
>
>
>We saw such tree views in the client but we would like to implement
>that without inserting real rows into the database for this tree view
>but rather query the information from the existing Test model table
>(using table query maybe?)

Yes you should use a new model which defines the table_query method. This 
method must return a python-sql query with the computed data. In adition to the 
displayed data you must compute the id, create_uid, create_date, write_uid and 
write_date.

In order to open the records detail you can use the tree_open keyword which 
will trigger a new action. This action will recieve the id of the clicked 
record on the active_id keyword. So it mus have a domain like:

[('some_field', '=', Eval('active_id'))] 

In order to show only the related records on the target model.
>
>Appreciate if someone can help here, or refer me to an example of such
>requirements.
>Thanks.



-- 
Enviado desde mi dispositivo Android con K-9 Mail. Por favor, disculpa mi 
brevedad.

-- 
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/6372D961-F7EC-4192-998A-AC8ADDF489B2%40koolpi.com.