Tryton - Issues

 

Issue6513

Title Action window domain doesn't work with context _user
Priority bug Status resolved
Superseder Nosy List ced, resteve, reviewbot, roundup-bot
Type behavior Components sao
Assigned To ced Keywords review
Reviews 42361002
View: 42361002

Created on 2017-05-18.14:19:16 by resteve, last changed by roundup-bot.

Messages
New changeset abd1f3210920 by C?dric Krier in branch 'default':
Synchronise context evaluation of act_window with tryton
http://hg.tryton.org/sao/rev/abd1f3210920
review42361002 updated at https://codereview.tryton.org/42361002/#ps1
msg33707 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-05-19.00:16:56
Indeed the code has diverged from tryton.
msg33700 (view) Author: [hidden] (resteve) Date: 2017-05-18.14:19:16
An action window domain with context get _user, work fine in GTK client, but not in SAO.

Example XML:

        <record model="ir.action.act_window.domain" id="act_agreement_domain_pending">
            <field name="name">My Pending</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'requested'), ('blockers', '=', Eval('context', {}).get('_user', -1))]" pyson="1"/>
            <field name="act_window" ref="act_agreement"/>
        </record>

If we remove the "context get _user" condition, in Sao show all records that state are requested:

            <field name="domain" eval="[('state', '=', 'requested')]" pyson="1"/>
History
Date User Action Args
2017-05-22 18:09:58roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg33739
2017-05-19 00:40:53reviewbotsetnosy: + reviewbot
messages: + msg33708
2017-05-19 00:16:56cedsetstatus: chatting -> testing
priority: feature -> bug
type: feature request -> behavior
keyword: + review
assignedto: ced
reviews: 42361002
nosy: + ced
messages: + msg33707
2017-05-18 14:19:16restevecreate

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