Tryton - Issues

 

Issue8251

Title SAO add_remove don't filter correctly records
Priority bug Status resolved
Superseder Nosy List ced, nicoe, pokoli, resteve, reviewbot, roundup-bot
Type behavior Components sao
Assigned To ced Keywords patch, review
Reviews 273281002, 249301002
View: 273281002, 249301002

Created on 2019-04-02.22:40:12 by resteve, last changed by roundup-bot.

Files
File name Uploaded Type Edit Remove
issue8251.diff resteve, 2019-04-02.23:19:27 text/plain
Messages
New changeset 5a1241f97750 by Cédric Krier in branch '4.8':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/5a1241f97750

New changeset 0494417ebbba by Cédric Krier in branch '4.6':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/0494417ebbba

New changeset ad2a38f75470 by Cédric Krier in branch '4.4':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/ad2a38f75470

New changeset a6f9abaf7e36 by Cédric Krier in branch '4.2':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/a6f9abaf7e36
New changeset bf09d006925e by Cédric Krier in branch 'default':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/tryton-env/rev/bf09d006925e

New changeset 13fbb24d7f03 by Cédric Krier in branch '5.0':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/tryton-env/rev/13fbb24d7f03
New changeset c4746b39549f by Cédric Krier in branch 'default':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/c4746b39549f

New changeset 97977fb04348 by Cédric Krier in branch '5.0':
Add missing add_remove to search domain of Many2Many
https://hg.tryton.org/sao/rev/97977fb04348
New review249301002 at https://codereview.tryton.org/249301002/#ps259361002
New review273281002 at https://codereview.tryton.org/273281002/#ps287331002
msg49063 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-15.22:25:43
As we do not have any updates since 2 weeks. Here is review273281002 and I added review249301002 for 5.0 because the patch will not be back-portable due to the usage of JS property.
msg48369 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2019-04-03.19:31:24
Thank you for contributing.

I fixed the title and the description of the codereview for you, they are important because it allows to use the reviewbot to detect PEP8 errors and to have link between the codereview instance and the bugtracker.
msg48368 (view) Author: [hidden] (resteve) Date: 2019-04-03.18:45:28
Here is review267151002

Thanks @angel
msg48358 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-04-03.12:00:10
@resteve you should probably update to the new tools. Using upload.py from codereview works seamlesly.  

Feel free to ping me on IRC or by mail if you have doubts so I can try to give you some advices.
msg48356 (view) Author: [hidden] (resteve) Date: 2019-04-03.11:34:22
Two years ago.... since upgrade my SO, I can't.
msg48355 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-03.11:32:05
Also @resteve do not lie about your incapacity to use coderveiew, you have already published on it https://codereview.tryton.org/user/resteve
msg48354 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-03.11:30:07
@resteve If you do not like the tools, you can still contribute to improve them.
Otherwise, please do not post any contributions on bug.tryton.org. We are all fed up to tell you to follow the guideline.
msg48353 (view) Author: [hidden] (resteve) Date: 2019-04-03.11:13:58
Thank you for your comments and I know perfectly the process. The problem? To publish to review tool (codereview.tryton.org) and can't continue.
msg48352 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-03.11:04:12
Should not we forbid @resteve access to the bug tracker if he does not follow the common rule we all follow?
msg48351 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2019-04-03.10:47:23
Could you for the love of god follow the contribution process http://www.tryton.org/develop

You're a seasoned Tryton user, it's the least you can do for the community.
msg48343 (view) Author: [hidden] (resteve) Date: 2019-04-02.23:19:27
I found that counterpart_lines field is o2m but in view we use m2m widget 

<field name="counterpart_lines" colspan="4" widget="many2many"/>

At the moment, I fixed add add_remove domain in Many2Many field because is missing in add method [1]. See diff.

+            domain = [domain,
+                this.record().expr_eval(this.attributes.add_remove)];

[1] https://bitbucket.org/tryton/sao/src/59c9c145636e7ac0f825f41abebc19eeae90acb7/src/view/form.js?at=default&fileviewer=file-view-default#form.js-3283
msg48342 (view) Author: [hidden] (resteve) Date: 2019-04-02.22:40:12
add_remove in o2m field don't filter correctly records in SAO.

Example [1]:

        add_remove=[
            ('reconciliation', '=', None),
            ('bank_statement_line_counterpart', '=', None),
            ('move_state', '=', 'posted'),
            ('account.reconcile', '=', True),
            ]

GTK is ok.

[1] https://bitbucket.org/trytonspain/trytond-account_bank_statement_counterpart/src/cc34c166a5d4ab5a0f5d317ea16ede52cf1f0e5d/statement.py#lines-40
History
Date User Action Args
2019-05-04 11:14:52roundup-botsetmessages: + msg49606
2019-04-23 12:01:14roundup-botsetmessages: + msg49165
2019-04-23 12:01:09roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg49164
2019-04-15 22:32:43reviewbotsetmessages: + msg49065
2019-04-15 22:32:42reviewbotsetreviews: 273281002 -> 273281002, 249301002
2019-04-15 22:32:36reviewbotsetnosy: + reviewbot
messages: + msg49064
2019-04-15 22:32:35reviewbotsetreviews: 273281002
keyword: + review
2019-04-15 22:25:43cedsetassignedto: resteve -> ced
messages: + msg49063
2019-04-04 10:17:18pokolisetstatus: chatting -> testing
2019-04-03 19:31:24nicoesetmessages: + msg48369

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