Commit Graph

167 Commits

Author SHA1 Message Date
Tejas (OpenERP) 733941e979 Fix search m2o field, default added
bzr revid: tta@openerp.com-20111122104145-ce1z32beh8ef6346
2011-11-22 16:11:45 +05:30
Xavier Morel 11bc9e1ad8 [ADD] support for string literals in on_change specifications, some tests for parsing of on_change specs
bzr revid: xmo@openerp.com-20111122094416-knguk9qgpnd1f9ws
2011-11-22 10:44:16 +01:00
Fabien Meghazi 5c014979c2 [IMP] Ensure form is saved when xmo's protocol for sidebar context is used
bzr revid: fme@openerp.com-20111121163441-y200rwxk4g2jtzuj
2011-11-21 17:34:41 +01:00
Xavier Morel 84d46bf4ec [FIX] provide for values to sidebar links context
lp bug: https://launchpad.net/bugs/871714 fixed

bzr revid: xmo@openerp.com-20111121141418-x4623mk77ljx4nlv
2011-11-21 15:14:18 +01:00
Xavier Morel b40b60e278 [IMP] use _.map to extract values from onchange parameter names, instead of doing it indirectly via _.each
bzr revid: xmo@openerp.com-20111121124532-ndo2me1ehos7mu0m
2011-11-21 13:45:32 +01:00
Xavier Morel 8f67c5c367 [ADD] support for string literals in form @on_change
lp bug: https://launchpad.net/bugs/889741 fixed

bzr revid: xmo@openerp.com-20111121124145-6i2kvesyc689g3ez
2011-11-21 13:41:45 +01:00
Fabien Meghazi 8ca42daf0a [FIX] Apply same behavior as gtk+ and old web clients concerning fields to be saved/created
Special case 'id' field, do not save this field
on 'create' : save all non readonly fields
on 'edit' : save non readonly modified fields

lp bug: https://launchpad.net/bugs/891164 fixed

bzr revid: fme@openerp.com-20111121124030-egiajgy6fgokwmm1
2011-11-21 13:40:30 +01:00
Xavier Morel 9d09c570ae [ADD] support for arguments-less onchange (why the hell not)
bzr revid: xmo@openerp.com-20111121122845-98lctm470ncttz74
2011-11-21 13:28:45 +01:00
Xavier Morel e3a84ed7b6 [IMP] throw actual error objects to improve debugging experience
bzr revid: xmo@openerp.com-20111121120509-fa0rqj50w3zombs1
2011-11-21 13:05:09 +01:00
Xavier Morel ca95467bef [IMP] extract parsing of onchange specs into a separate method
bzr revid: xmo@openerp.com-20111121120413-xw2aanwbte79y8cr
2011-11-21 13:04:13 +01:00
Xavier Morel 7c629a31cc [FIX] synchronization of o2m widget saving, avoid race condition when clicking on button of unsaved record
After saving, the formview would both refresh the form and lauch the
action itself, which launches a refresh of its own.

Issue is that o2m's filling of themselves (a read) is async and
triggered by the set_value on the o2m field, so the second reload of
the form would be interspersed (between the first reload and the end
of the o2ms loading), resulting in corrupted state for the o2ms if the
button's action somehow changed the contents of the o2m (it would
remove the old records and return brand new ids during the refresh):
the set_value on the o2m would empty the o2m's dataset cache, and the
returning fetch request would try to find in cache values removed from
it, or something, blowing up everything.

Anyway, this was fixed by ensuring the button action is only executed
after the form is completely done doing its post-save reload (using
the new async set_value). This is a tiny bit brittle in that onchanges
are synchronous but call set_value, so a set_value on an o2m from an
onchange may have issues. It also increases the flicker of the view,
as the o2m is reloaded twice in quick succession.

lp bug: https://launchpad.net/bugs/885658 fixed

bzr revid: xmo@openerp.com-20111117161426-72jzhvv3dm387uom
2011-11-17 17:14:26 +01:00
Xavier Morel 6bd9084740 [FIX] issues with asynchronous set_value handling
* field could be changed from under the closure, use _.each
* There's a bug in Deferred.queue() when passing synchronous deferred
  (including non-deferred) it's instantanously resolved

bzr revid: xmo@openerp.com-20111117160009-s702939kji69v3zf
2011-11-17 17:00:09 +01:00
Fabien Meghazi efbef31770 [FIX] callers of on_record_loaded to use promises
bzr revid: fme@openerp.com-20111117131816-991odq4m45146vfv
2011-11-17 14:18:16 +01:00
Fabien Meghazi c4a10281e4 [IMP] FormView: on_record_loaded returns a promise
bzr revid: fme@openerp.com-20111117124319-61ruoa9g8we1a438
2011-11-17 13:43:19 +01:00
Fabien Meghazi 811c58e697 [FIX] Fixes form's date[time] widgets problems with jQuery ui date[time]pickers
lp bug: https://launchpad.net/bugs/877976 fixed
lp bug: https://launchpad.net/bugs/885385 fixed

bzr revid: fme@openerp.com-20111116222705-dg4u0lpw6p2o8nx1
2011-11-16 23:27:05 +01:00
Xavier Morel 2215a31920 [IMP] underscore fun
bzr revid: xmo@openerp.com-20111116075246-lbrusmxekmdygwkm
2011-11-16 08:52:46 +01:00
Fabien Meghazi 7e9090fde7 [REM] FormView: Removed is_dirty_for_user and replaced by calling is_dirty() on fields
bzr revid: fme@openerp.com-20111115145806-hlh19loo03nmy1qx
2011-11-15 15:58:06 +01:00
Fabien Meghazi 1116d94a81 [UNFK] Restore xmo fixes that I accidentally reverted.
bzr revid: fme@openerp.com-20111115132914-74mhywoy36gm8pdd
2011-11-15 14:29:14 +01:00
Fabien Meghazi d4058abeb7 [FIX] on_ui_change triggered before on_changes in date(time) widgets
lp bug: https://launchpad.net/bugs/885681 fixed

bzr revid: fme@openerp.com-20111115124520-aqma1ti2d81oye8j
2011-11-15 13:45:20 +01:00
Fabien Meghazi db2c85635b [IMP] Upgraded unserscore version from 1.1.7 to 1.2.2 and underscore.string from 1.1.6 to 1.2.0
WARNING: underscore string does not mixin to underscore by default. Use _.str.*

bzr revid: fme@openerp.com-20111115123059-k31lhp0db2d8h22k
2011-11-15 13:30:59 +01:00
Xavier Morel f6b0482130 [FIX] add active_id, active_ids and active_model to context send when fetching m2o widget values in forms
lp bug: https://launchpad.net/bugs/878189 fixed

bzr revid: xmo@openerp.com-20111115105809-phttoirkmq4rzd1w
2011-11-15 11:58:09 +01:00
Fabien Meghazi 95c31ad01c [ADD] FormView: Added debug information as tooltips
bzr revid: fme@openerp.com-20111114205916-549at8roai7yrpjm
2011-11-14 21:59:16 +01:00
Fabien Meghazi 86ecdd5e90 [FIX] Form view: 'string' attribute on 'group' tag is ignored (courtesy of Stefan Rijnhart)
lp bug: https://launchpad.net/bugs/883445 fixed

bzr revid: fme@openerp.com-20111114101118-jtqxe3095j9pn4ik
2011-11-14 11:11:18 +01:00
niv-openerp 96edd0d489 [imp] made m2m support embedded list view
lp bug: https://launchpad.net/bugs/888471 fixed

bzr revid: nicolas.vanhoren@openerp.com-20111110140754-1nvbhwjpey7sr215
2011-11-10 15:07:54 +01:00
niv-openerp 1b70c3d08a [fix] problem in readonly m2o
lp bug: https://launchpad.net/bugs/888502 fixed

bzr revid: nicolas.vanhoren@openerp.com-20111110123258-rae9jtwxk7ny38d3
2011-11-10 13:32:58 +01:00
niv-openerp c0c31c74bc [imp] made editable list in o2m auto-save
bzr revid: nicolas.vanhoren@openerp.com-20111110110206-2ba4qnj71wa5l3p3
2011-11-10 12:02:06 +01:00
Xavier Morel 90972f5e27 [IMP] add confirmation message when deleting a record in form view
bzr revid: xmo@openerp.com-20111110103650-pqss9bfejudyqkp2
2011-11-10 11:36:50 +01:00
Stefan Rijnhart c2d42b0968 [FIX] Changed widget name to WidgetGroup as per convention
bzr revid: stefan@therp.nl-20111110101006-czp6fferclxlz8v8
2011-11-10 11:10:06 +01:00
Xavier Morel a11dfc5e35 [IMP] open non-editable m2o links inline (replace current record) rather than in a popup
bzr revid: xmo@openerp.com-20111110100752-6x11ros4z1fhp0gc
2011-11-10 11:07:52 +01:00
niv-openerp 390b83c7fc [fix] problem in form open popup a form select create popup
lp bug: https://launchpad.net/bugs/888395 fixed

bzr revid: nicolas.vanhoren@openerp.com-20111110093221-u1ry76juajt6c1lz
2011-11-10 10:32:21 +01:00
Fabien Meghazi 762445ba01 [IMP] Form: only save record when there's something to save. Use <instance>.log()
bzr revid: fme@openerp.com-20111109151239-um65xcy0ryf4czn1
2011-11-09 16:12:39 +01:00
Fabien Meghazi cd73802261 [IMP] Move 'Translate' in 'Customize' sidebar's section that is only shown for admin user. Link to ir.translation
bzr revid: fme@openerp.com-20111109104700-v0njrwgp0iciavt1
2011-11-09 11:47:00 +01:00
Fabien Meghazi c4a13f1b3e [REM] Removed unused code
bzr revid: fme@openerp.com-20111107144435-k693w21gnmsd0dt5
2011-11-07 15:44:35 +01:00
Fabien Meghazi 6389731d37 [IMP] Refactored form view's buttons
Yuck

bzr revid: fme@openerp.com-20111107134539-ndykhew56v66i218
2011-11-07 14:45:39 +01:00
Stefan Rijnhart 93d35328dc [IMP] Form view: honours 'string' attribute on 'group' tag
lp bug: https://launchpad.net/bugs/883445 fixed

bzr revid: stefan@therp.nl-20111029172354-gryhpp17e3nr4rr8
2011-10-29 19:23:54 +02:00
niv-openerp 0443517746 [fix] problem with m2o search popup, should not be multi-selectable
bzr revid: nicolas.vanhoren@openerp.com-20111031154907-uf9way132l54n7lw
2011-10-31 16:49:07 +01:00
niv-openerp 16b9b43477 [imp] modified many2one in readonly mode to be able to click on it to open a popup
bzr revid: nicolas.vanhoren@openerp.com-20111031110937-den8gj0j5zwfflw3
2011-10-31 12:09:37 +01:00
niv-openerp 499b2e033a [fix] typo
bzr revid: nicolas.vanhoren@openerp.com-20111031110620-b00p18d0ebckr4xt
2011-10-31 12:06:20 +01:00
niv-openerp 0d75c597cd [fix] potential problem with m2o
bzr revid: nicolas.vanhoren@openerp.com-20111031105444-mjdgrhuylh146ryy
2011-10-31 11:54:44 +01:00
niv-openerp 85012767c8 [imp] allowed to click on an element of a readonly o2m to open it in a popup
bzr revid: nicolas.vanhoren@openerp.com-20111031104304-b3ur1j34nqe4o674
2011-10-31 11:43:04 +01:00
niv-openerp 41ebcc4079 [imp] added non editable implementation for o2m & m2m
bzr revid: nicolas.vanhoren@openerp.com-20111031102752-qdsfzzj747h5yp1w
2011-10-31 11:27:52 +01:00
Fabien Meghazi 66ea543974 [FIX] Add support for @align attribute in form views
lp bug: https://launchpad.net/bugs/844625 fixed

bzr revid: fme@openerp.com-20111027124325-ckd8kuujbb591nqu
2011-10-27 14:43:25 +02:00
Xavier Morel fca7ced152 [IMP] rename 'this' from 'view' to 'widget' in the FormView template rendering to increase coherency amongst templates, courtesy of Valentin Lab
bzr revid: xmo@openerp.com-20111027104517-9u3b8q0e50mboikw
2011-10-27 12:45:17 +02:00
niv-openerp 33c4580c03 [fix] problem when switching from form view to list view in o2m
bzr revid: nicolas.vanhoren@openerp.com-20111026153944-bdk335em06dxxi2p
2011-10-26 17:39:44 +02:00
niv-openerp 5329b9273a [fix] potential race condition in o2m
bzr revid: nicolas.vanhoren@openerp.com-20111026153109-8pcjlo7c5ud6bkko
2011-10-26 17:31:09 +02:00
niv-openerp 5bc7011b52 [fix] race condition in m2m
bzr revid: nicolas.vanhoren@openerp.com-20111026152305-t7rg7mn37h91swra
2011-10-26 17:23:05 +02:00
niv-openerp 08ef807c3b [imp] implemented readonly in o2m in form view too
bzr revid: nicolas.vanhoren@openerp.com-20111026144218-vn44rlkzo7vo0umq
2011-10-26 16:42:18 +02:00
niv-openerp 9988d503b1 [imp] implemented readonly in o2m in list view only
bzr revid: nicolas.vanhoren@openerp.com-20111026141148-kl37triimsivvh9n
2011-10-26 16:11:48 +02:00
niv-openerp 9a48657a45 [imp] made o2m reload when readonly property is changed
bzr revid: nicolas.vanhoren@openerp.com-20111026125524-c77rmzd6gq9u9oke
2011-10-26 14:55:24 +02:00
niv-openerp f0714ccd72 [imp] removed useless logging
bzr revid: nicolas.vanhoren@openerp.com-20111026100538-momcgi4s3lxy560l
2011-10-26 12:05:38 +02:00