* Original label is evaluated very early (before translation database is loaded), defer its execution
* Replacement 'add' label in m2m list views wasn't marked for translation
* Also mark a few strings in form view
lp bug: https://launchpad.net/bugs/903963 fixed
bzr revid: xmo@openerp.com-20111215100652-8iujastl6bvi7feu
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
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
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
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
* 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