Commit Graph

70 Commits

Author SHA1 Message Date
Xavier Morel 987a9cc07b [IMP] merge title of o2m list view into list header
bzr revid: xmo@openerp.com-20111213144955-o4menzpyak0c1ugx
2011-12-13 15:49:55 +01:00
Xavier Morel 8cd2acd27f [FIX] progress values in group headers
bzr revid: xmo@openerp.com-20111213115452-hnxjfgehq49cv6ye
2011-12-13 12:54:52 +01:00
Xavier Morel 65f92d7208 [FIX] columns filtering in group headers
bzr revid: xmo@openerp.com-20111213115001-r0lhumhiqtdxcdrv
2011-12-13 12:50:01 +01:00
Xavier Morel fb4db0666f [FIX] missing confirmation message handling on listview buttons
lp bug: https://launchpad.net/bugs/903209 fixed

bzr revid: xmo@openerp.com-20111213081038-sq5p1a2lsodieito
2011-12-13 09:10:38 +01:00
Xavier Morel 5882ba65e3 [FIX] correctly format group header values
lp bug: https://launchpad.net/bugs/902302 fixed

bzr revid: xmo@openerp.com-20111212131534-z1a7c35c43u85c5g
2011-12-12 14:15:34 +01:00
Vaibhav (OpenERP) 15e9b073c6 [FIX] ListView drag&drop within parent bound.
bzr revid: vda@tinyerp.com-20111208131633-b7c3bd5hs3deuobd
2011-12-08 18:46:33 +05:30
Xavier Morel bbf46ca288 [FIX] creation button in list view
bzr revid: xmo@openerp.com-20111207133229-m47jhi2kr01247k4
2011-12-07 14:32:29 +01:00
Xavier Morel f3c671cbd8 [ADD] push/pop API for views
lp bug: https://launchpad.net/bugs/900225 fixed

bzr revid: xmo@openerp.com-20111207104503-gcy0gbin36s4uudh
2011-12-07 11:45:03 +01:00
Xavier Morel c58ebcfaed [FIX] records disappearing from sequenceable list views when dropped onto their original position
In the listview's backing Records, a noop set (setting a property to
the value it already has) has no visible effect (no even is triggered,
it is simply ignored).

The listview relies on setting the sequence number to refresh records
and re-display them correctly in their table rows, but dropping an
already sequenced row onto itself would set its sequence to its
current value (barring record removals), yielding to no refresh and
the row simply poofing out of view as it gets removed from the
collection (and the table), then added back to the collection in its
new (and old) position and displayed in a bare-bones empty states
waiting for a render_record call.

Added a check to sorting management to bail out immediately if a sort
is a noop (the row is dropped at the same position it was taken from)

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

bzr revid: xmo@openerp.com-20111206123735-4bfnqh1zl7u4ozm9
2011-12-06 13:37:35 +01:00
Xavier Morel 0fbdaab88f [FIX] defer actually writing the resequencing of a list view to the backing dataset ~/projects/tiny/web/current
There seems to be an issue with synchronous o2m writes doing weird
things (records disappear after being drag & dropped)

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

bzr revid: xmo@openerp.com-20111206082713-efq1w88sv0htl39c
2011-12-06 09:27:13 +01:00
Xavier Morel 34b8c8f4a6 [FIX] right-align number columns in group headers
lp bug: https://launchpad.net/bugs/900204 fixed

bzr revid: xmo@openerp.com-20111205110647-jnzk2hppavgbhpa0
2011-12-05 12:06:47 +01:00
Xavier Morel 19d9cc0481 [FIX] list should go back to first page on new search
lp bug: https://launchpad.net/bugs/898546 fixed

bzr revid: xmo@openerp.com-20111201104233-kpkywab12mqbkzmu
2011-12-01 11:42:33 +01:00
Xavier Morel 7f7f00a52f [FIX] docstring
bzr revid: xmo@openerp.com-20111123122957-416z2p458wpw7nic
2011-11-23 13:29:57 +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 e536b4ace8 [FIX] handling of groups with length 0 in ContainerDataGroup's group descriptor munger
For a group with a ${field}_count of 0, code would fallback on __count
which does not exist -> would try to set group.length to `undefined`
which leads to the property being removed from the result, blowing up
the call to `$('<td>').text(group.length)` in the listview (jQuery's
.text() apparently does not like getting `undefined` as its
parameter... who knew?)

Also make `openable` clearer, and improve style of listview in case of
an empty group (openable but length 0): remove the arrow on the left
(but leave the indent, otherwise it's ugly).

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

bzr revid: xmo@openerp.com-20111115112906-e87sf40tgr8goqps
2011-11-15 12:29:06 +01:00
Xavier Morel c6d6027f64 [FIX] cell borders in padding rows of list views
bzr revid: xmo@openerp.com-20111114092721-n9gqprm31hhcfr5w
2011-11-14 10:27:21 +01:00
Xavier Morel 194cc51b22 [FIX] only aggregate columns explicitly asking for aggregation ~/projects/tiny/web/current
Instead of relying only on the column's group_operator, ensure the
view itself asks for the aggregation function (by checking if the
corresponding field attribute is set).

If the @group_operator function is not set on the field (even without
a label, it just has to be *there* so `<field sum=""/>` would work),
do not aggregate the column at all.

bzr revid: xmo@openerp.com-20111114081853-a9ja0zdaxk2261nd
2011-11-14 09:18:53 +01:00
Xavier Morel 48499f2e0a [FIX] list view: display group titles straight from read_group if we fail to format them
read_group plays fast and loose with formats, and apparently has no
problem returning arbitrary strings for date columns, arbitrary
strings which may very well be completely unparseable.

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

bzr revid: xmo@openerp.com-20111110152850-o31j3r4u5gdugznw
2011-11-10 16:28:50 +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
Xavier Morel 125ce4ec85 [FIX] on a button action, ListView should send the content of the corresponding record as (evaluation) context
also needs to set active_id, and let's throw active_ids and active_model in for the same price

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

bzr revid: xmo@openerp.com-20111028085051-p49564vmrozkr1fr
2011-10-28 10:50:51 +02:00
Xavier Morel 69f909a9a1 [REN] 'New' button of ListView to 'Create'
bzr revid: xmo@openerp.com-20111025132412-4vx57uf1vipcyfkq
2011-10-25 15:24:12 +02:00
Xavier Morel e35686ca93 [ADD] global select/unselect toggle on lists
bzr revid: xmo@openerp.com-20111025105925-7ghxlljq6ugupxx5
2011-10-25 12:59:25 +02:00
Xavier Morel b6a0874f4c [FIX] disgusting hack to skip around race condition
When clicking on an action button, form view first saves then executes
the action. In doing so, it causes the o2m field to call
ListView#reload_content twice without waiting for the reloading to
end, generating a race condition in ListView.List#render_dataset.

As a result, the read_slice callback fills the list twice (once for
each #reload_content call), resulting in everything being duplicated.

Clear the content of the records collection before adding stuff.

note: collections should dedup on ids.

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

bzr revid: xmo@openerp.com-20111025085112-q38q8m0k2mopwadg
2011-10-25 10:51:12 +02:00
Xavier Morel ba2f06a2ac [ADD] missing deferred propagation in ListView.reload_content
bzr revid: xmo@openerp.com-20111025070626-pxxp6virhhomb7kl
2011-10-25 09:06:26 +02:00
kbh fa94cf7578 [IMP] Remove unnecessary code in checkbutton select all/none in list view.
bzr revid: kbh@bde-desktop-20111025062429-dvx4x0h1caqwg21i
2011-10-25 11:54:29 +05:30
kbh 276cff1807 [IMP] Remove unnecessary code in checkbutton select all/none in list view.
bzr revid: kbh@bde-desktop-20111025060142-47y025oqteocdgj3
2011-10-25 11:31:42 +05:30
kbh 3e20652e55 [IMP] Fixed the issue of checkbutton select all/none in tree view.
bzr revid: kbh@bde-desktop-20111024132959-y9b3scfye91nut1c
2011-10-24 18:59:59 +05:30
kbh 2ce07c97c6 [FIX] Fixed the issue of checkbutton select all/none in tree view.
lp bug: https://launchpad.net/bugs/878108 fixed

bzr revid: kbh@bde-desktop-20111024091730-dkzafro2f9e0k7tf
2011-10-24 14:47:30 +05:30
Fabien Meghazi 69d36a02ca [FIX] Fix bug for Internet Explorer 3.0
In fact IE<9

bzr revid: fme@openerp.com-20111020162255-5duca37zd18by343
2011-10-20 18:22:55 +02:00
Fabien Meghazi a958ff049f [REM] Removed a console.log
bzr revid: fme@openerp.com-20111019160612-w0ih265m5no00khg
2011-10-19 18:06:12 +02:00
Xavier Morel 7a5e3da9ad [FIX] incorrect management of dataset indexes leading to always selecting a record on the listview's first page when clicking on a record to open its form (even when at the 5th page)
lp bug: https://launchpad.net/bugs/878103 fixed

bzr revid: xmo@openerp.com-20111019151703-dxvzdrn2mg75y8fd
2011-10-19 17:17:03 +02:00
Fabien Meghazi 062449472f [FIX] In paginated list view, clicking on a row on page 2+ goes to wrong record in form view
bzr revid: fme@openerp.com-20111019144507-j5oec235bw79gw73
2011-10-19 16:45:07 +02:00
Xavier Morel 8c9d65c41a [IMP] fix mistake done while merging ref-in-listviews, improve discrimination between ref-value and printable value
* Removed a test on splitting on ',' yielding more than one value, which means we're going to loop on the name_get since they're all strings
* Improved value-detection: we should only name_get the reference field if the value is an actual reference value, meaning a model name, a ',' and an id. Used regex instead of naive split, so we don't match referenced names with a comma (e.g. 'Hubert de Vaucanson, Vicomte de Blois')

bzr revid: xmo@openerp.com-20111018105255-6vz6l9lg1iiurfc9
2011-10-18 12:52:55 +02:00
Xavier Morel 7b600e82c4 [IMP] don't check for the column type being m2o if we already went through the reference case
bzr revid: xmo@openerp.com-20111018103443-p1l5cya0nexf6cj1
2011-10-18 12:34:43 +02:00
Xavier Morel adea72acd7 [FIX] correctly display reference field values in list view
bzr revid: xmo@openerp.com-20111018103258-qnldbs6jwh1fa8is
2011-10-18 12:32:58 +02:00
Vaibhav (OpenERP) c7f4482d5b [FIX] Check value type,base with parseint.
bzr revid: vda@tinyerp.com-20111018093432-0ixihleg3vynpvwx
2011-10-18 15:04:32 +05:30
Vaibhav (OpenERP) 8b8d7a1d76 [FIX] Display name of reference field in tree.
lp bug: https://launchpad.net/bugs/861434 fixed

bzr revid: vda@tinyerp.com-20111018055400-2j1gvgvognuo6ka9
2011-10-18 11:24:00 +05:30
Xavier Morel 3790db3e40 [FIX] action buttons with a name composed solely of digits in list view
lp bug: https://launchpad.net/bugs/869746 fixed

bzr revid: xmo@openerp.com-20111017141022-u7v9aiw08aczpsv1
2011-10-17 16:10:22 +02:00
Xavier Morel 9012103f82 [IMP] add translation marks to printed text in listview
bzr revid: xmo@openerp.com-20111017115652-9230tli493e9sqkt
2011-10-17 13:56:52 +02:00
Xavier Morel 484063df5e [ADD] confirmation popup when deleting an element from the list view
bzr revid: xmo@openerp.com-20111017115117-0mas0bkdbkq0yku6
2011-10-17 13:51:17 +02:00
Fabien Meghazi 22da3764df [FIX] Fix error when clicking on empty row in editable lists
bzr revid: fme@openerp.com-20111017095216-zfzqgmsfrdcjvccj
2011-10-17 11:52:16 +02:00
Xavier Morel f786f5537a [FIX] method call invocation indentation
bzr revid: xmo@openerp.com-20111014084941-cj85qsl9tfbxsvhp
2011-10-14 10:49:41 +02:00
Xavier Morel 405beaa3c6 [FIX] m2o values display in list views (mostly under onchange condition)
Normal m2o values are pairs of (id, name) (name_get format, basically)
but in some cases (lazyness & al), APIs (often onchange results) only
return the `id` part, which is not sufficient to display the m2o
as-is, a name_get has to be performed.

Added an intermediate step in displaying a table cell (in list view):
if we're displaying an m2o cell (~a cell for an m2o column) and the
value is a number, then dispatch a name_get and keep trucking (display
the rows without the m2o values).

When the name_get returns, it will simply refresh the row and diplay
the m2o name.

bzr revid: xmo@openerp.com-20111014084310-pv2mmmy28fwwk9sm
2011-10-14 10:43:10 +02:00
Turkesh Patel (Open ERP) 937c881aaa [FIX] Fixed the issue for confirmation popup when we delete a record from a list
lp bug: https://launchpad.net/bugs/872708 fixed

bzr revid: tpa@tinyerp.com-20111013085758-el0bn170ai0h6wfc
2011-10-13 14:27:58 +05:30
niv-openerp aaf01c6395 [fix] dirty fix of the problem with list views in o2m
bzr revid: nicolas.vanhoren@openerp.com-20111010143634-sjld7z726l6ebg53
2011-10-10 16:36:34 +02:00
Xavier Morel acc3d54316 [ADD] update pager on record deletion
bzr revid: xmo@openerp.com-20111007071756-h73imu0g4tl3fhay
2011-10-07 09:17:56 +02:00
Fabien Meghazi 65745d5142 [FIX] Do not compute modifiers for aggregates in list view.
lp bug: https://launchpad.net/bugs/865188 fixed

bzr revid: fme@openerp.com-20111005153202-4ao575zh3885ukuy
2011-10-05 17:32:02 +02:00
Xavier Morel 318ec9998b [IMP] use .children(selector) rather than .find('> ' + selector)
bzr revid: xmo@openerp.com-20111004155918-c2vy0rwkesvdkmli
2011-10-04 17:59:18 +02:00
Xavier Morel 72b852c2c6 [FIX] insertion position of new lines (in editable lists) in case of lists padded to 5 (empty) lines
bzr revid: xmo@openerp.com-20111004154246-7o1cw016cf9ygem3
2011-10-04 17:42:46 +02:00
Xavier Morel 29cef016f9 [FIX] re-rendering of a given list's row (e.g. onchange, edition, etc...): 'view' needs to be in the context so the row's color can be computed
bzr revid: xmo@openerp.com-20111004104848-277ajqmaud8oc8hn
2011-10-04 12:48:48 +02:00