Merge lp:~openerp-dev/openerp-web/6.1-opw-578688-msh into lp:openerp-web/6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openerp-web/6.1-opw-578688-msh |
Merge into: | lp:openerp-web/6.1 |
Diff against target: |
16 lines (+5/-1) 1 file modified
addons/web/static/src/js/view_form.js (+5/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/6.1-opw-578688-msh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mohammed Shekha(Open ERP) (community) | Disapprove | ||
Jiten (OpenERP) (community) | Abstain | ||
OpenERP Core Team | Pending | ||
Review via email: mp+123677@code.launchpad.net |
Description of the change
Hello,
Fixed the issue of states and attrs clashing when one of expression of modifiers goes to true, currently if there are two expressions in modifiers so if bith pass the truth test then and then returns true, but it should be oring intead of anding, if I am setting my field invisible with attrs as well as states and if both condition are clashing then it should consider true one that is if one of expression goes true web should make my field invisible because as a developer my intension was to invisible in one of expression.
Demo :- Go to any view in which there is states on field and now put attrs on that field like follow(Example)
invisible=True(in .py) states="draft, assign, confirmed" attrs="{invisible: [('state', '=', 'confirmed')]}"
So according to above modifiers will be.
[["state", "=", "confirmed"], ["state", "not in", ["draft", "assigned", "confirmed"]]]
So when state is 'confirmed' the field should be invisible(
Currently Web-client is use 'and' instead 'or' should be used because in any case developer has think to make field invisible.
Thanks.
Unmerged revisions
- 2455. By Mohammed Shekha(Open ERP)
-
[FIX]Fixed the issue of states and attrs clashing when one of expression of modifiers goes to true, currently if there are two expressions in modifiers so if bith pass the truth test then and then returns true, but it should be oring intead of anding, if I am setting my field invisible with attrs as well as states and if both condition are clashing then it should consider true one that is if one of expression goes true web should make my field invisible because as a developer my intension was to invisible in one of expression.
Hello,
The same is fixed from server in the branch lp:~openerp-dev/openobject-server/6.1-bug-invisible_modifiers-xal.
Hence this branch is not useful now.
Thanks.