Tryton - Issues



Title Add filter to xxx2Many fields
Priority feature Status testing
Superseder Nosy List ced, pokoli, reviewbot
Type feature request Components trytond
Assigned To pokoli Keywords review
Reviews 32001002
View: 32001002

Created on 2014-06-17.12:45:29 by pokoli, last changed by reviewbot.

review32001002 updated at
review32001002 updated at
review32001002 updated at
review32001002 updated at
msg31620 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-02-01.10:51:34
Ok, lets keep it simple and forget about the PYSON filter. I updated the review.
review32001002 updated at
msg31613 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-01-31.23:40:04
I want to raise some concern about having filter as pyson. I think it will lead to records that are never shown because they will be filtered out by the dynamic filter. The client could not enforce a correct behaviour at this level. Also such feature has a very high cost on read which is the most used mode (in contrary to the domain validation).
So I'm in favour to implement as a static domain.
review32001002 updated at
msg31610 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-01-31.17:59:01
I remove sao and tryton client as they are no more necessary as explained on:

This is implemented on latest version of trytond review.
review32001002 updated at
review32001002 updated at
review33051002 updated at
review33041002 updated at
review32001002 updated at
msg31505 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-01-26.15:46:26
Here is review32001002 for trytond, review33041002 for sao and review33051002
 for tryton.
msg17227 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-06-17.14:12:34
On 17 Jun 13:28, Sergi Almacellas Abellana wrote:
> The filter attribute will be the `add_remove` one or a new attribute must be added?

A new one. `add_remove` is exactly the opposite.

> Also domain inversion must be done.

That's why I said the client must use the combination of domain and
msg17226 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2014-06-17.13:28:49
Sounds good to me. 

The filter attribute will be the `add_remove` one or a new attribute must be added?

Also domain inversion must be done.
msg17225 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-06-17.13:09:48
But let's convert it into a feature request.
I think something could be done by adding a filter attribute to xxx2Many that will be used in the getter and appended to the domain by the client when doing search.
msg17224 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2014-06-17.13:07:14
Understood, so I will use Function fields on our use case, as we need to show two diferent One2Many fields based on a filter.
msg17223 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-06-17.12:49:29
The current code is the expected behavior.
The domain on xxx2many is a constraint not a filter.
msg17222 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2014-06-17.12:45:28
The domain is not taken in account in [1] and [2] and the xxx2Many fields return incorrect values because they doesn't filer by domain. 

I attached a review that adds a test for this use case. 

Both test fails with a validation domain, because the second field (which have a domain) return the invalid values for the current model. 

Date User Action Args
2017-02-21 10:39:01reviewbotsetmessages: + msg32090
2017-02-15 11:08:55reviewbotsetmessages: + msg31937
2017-02-02 12:45:28reviewbotsetmessages: + msg31679
2017-02-01 11:19:02reviewbotsetmessages: + msg31621
2017-02-01 10:51:34pokolisetmessages: + msg31620
2017-02-01 10:44:57reviewbotsetmessages: + msg31618
2017-01-31 23:40:05cedsetmessages: + msg31613
2017-01-31 18:17:34reviewbotsetmessages: + msg31611
2017-01-31 17:59:01pokolisetreviews: 32001002,33051002,33041002 -> 32001002
messages: + msg31610
2017-01-31 17:57:22pokolisetcomponent: - tryton, sao

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