Merge lp:~openerp-dev/openobject-client-web/listgrid-validation into lp:openobject-client-web/trunk
Proposed by
Vaibhav Darji
Status: | Merged |
---|---|
Merged at revision: | 3256 |
Proposed branch: | lp:~openerp-dev/openobject-client-web/listgrid-validation |
Merge into: | lp:openobject-client-web/trunk |
Diff against target: |
208 lines (+85/-40) (has conflicts) 2 files modified
addons/openerp/static/javascript/listgrid.js (+71/-23) addons/openerp/widgets/templates/listgrid.mako (+14/-17) Text conflict in addons/openerp/widgets/templates/listgrid.mako |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-client-web/listgrid-validation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Navrang Oza (community) | Approve | ||
Xavier (Open ERP) (community) | Approve | ||
Review via email: mp+34733@code.launchpad.net |
Description of the change
implemented validation for inline editable list and o2m.
To post a comment you must log in.
* Should validate all fields at once, currently only validates one field at a time
* If validation failed, should set focus on first failed field so user doesn't have to re-select it by mouse in order to fix
* Fields fixed don't get back to "blue" color after next validation:
- Create new analytic journal item
- Put gibberish in Analytic Account field
- Try to save, "General Account" field becomes red
- Pick value for general account
- Try to save again, Analytic Journal is now red but General Account still is.
- You can fill all incorrect fields one after the other, they never get back to normal (blue)
* In listgridValidation, there are many paths which result in exactly the same behavior. Probably this could be improved by fixing some code (for instance I think `record_id == 'undefined' || typeof record_id == 'undefined'` could be replaced buy `record_id == undefined` no?) merging tests and things like that to reduce the total number of tests (and the complexity of the code).
* I am not sure about storing all those informations (list changed status and current id) as global variables. Probably we could add it a an attribute on the list itself for storing the current id.