Commit Graph

83 Commits

Author SHA1 Message Date
Xavier Morel 7353e02e2e [MERGE] from trunk
bzr revid: xmo@openerp.com-20120322143331-iajlifomw1hohbht
2012-03-22 15:33:31 +01:00
Xavier Morel 514c63288c [FIX] change dataset.read_index to be implemented in terms of dataset.read_ids, not in terms of model.first() as not all model data is kept/transferred (filters are not bubbled?)
bzr revid: xmo@openerp.com-20120322142540-x3j9p7kub2px6p6v
2012-03-22 15:25:40 +01:00
Olivier Dony 6a38a66d50 [FIX] BufferedDataSet: avoid randomizing results when there are no sort_fields
Array.sort is not necessarily stable, and sorting an
array with an unstable sort will cause a randomization
of the original order, which should have been preserved.

See also:
  - http://ecma262-5.com/ELS5_Section_15.htm#Section_15.4.4.11
  - http://code.google.com/p/v8/issues/detail?id=90

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

bzr revid: odo@openerp.com-20120314111014-1igxhrynu5557di5
2012-03-14 12:10:14 +01:00
Xavier Morel d05add0c7d [FIX] length management in dataset when items are removed from list view
bzr revid: xmo@openerp.com-20120306163841-4ko7el1t54xwguxr
2012-03-06 17:38:41 +01:00
Xavier Morel 8b13a99967 [FIX] handling of _count in queries: it can be 0, which is valid but falsy
bzr revid: xmo@openerp.com-20120306161358-py6zz2bts9b3cb1x
2012-03-06 17:13:58 +01:00
Xavier Morel 075ac184f8 [FIX] recursive grouping
bzr revid: xmo@openerp.com-20120306160558-sq5r7a4d7ks4g33b
2012-03-06 17:05:58 +01:00
Xavier Morel 2864ffb5ae [FIX] DataSet created in/from datagroups
bzr revid: xmo@openerp.com-20120306155550-be04x4q21pt58t5h
2012-03-06 16:55:50 +01:00
Xavier Morel b48fddcc81 [IMP] make Query#order_by more resilient to somebody passing 'undefined'
bzr revid: xmo@openerp.com-20120306150945-86358u7atgyevb52
2012-03-06 16:09:45 +01:00
Xavier Morel 1465730531 [FIX] call_button implementation in model
bzr revid: xmo@openerp.com-20120306145741-wi9xk2c4e18fab2z
2012-03-06 15:57:41 +01:00
Xavier Morel 79f79deec1 [FIX] "bzr cdiff" operator binds tighter than "instanceof", remember to parenthesize "instanceof" calls before negating them
bzr revid: xmo@openerp.com-20120306145029-pckye3yoig2xlhh8
2012-03-06 15:50:29 +01:00
Xavier Morel c1ec7b1938 [REM] debug logging
bzr revid: xmo@openerp.com-20120302155324-v3ju1lcioiw2s9el
2012-03-02 16:53:24 +01:00
Xavier Morel 9b0cc92b66 [ADD] grouping to the Model/Query API, but filtering looks completely broken
bzr revid: xmo@openerp.com-20120302154759-8ihi5p1ffygiyhw3
2012-03-02 16:47:59 +01:00
Xavier Morel 2c2df2b325 [FIX] Model#call not working correctly if the second argument (after method) is the kwargs
bzr revid: xmo@openerp.com-20120302100742-p1wrg44ght8d3cdy
2012-03-02 11:07:42 +01:00
Xavier Morel 1aed1963c0 [REM] horrible hack of a query-aborting API, use DropMisordered instead
DropMisordered does not abort late requests, but provides a better and simpler API if 'late' requests
(resolved after those following them) should just be ignored

bzr revid: xmo@openerp.com-20120302083941-pm43lag22bfac8g4
2012-03-02 09:39:41 +01:00
Xavier Morel 190eb339fa [ADD] replacement for current aborter/abort_last hack: UDP-style handler of mis-ordered requests
* By default, ignores (refuses to resolve) mis-ordered request when they come back
* Optionally, fails them

bzr revid: xmo@openerp.com-20120301152315-67kbkdwpy7cdh25y
2012-03-01 16:23:15 +01:00
Xavier Morel 9022aae8cb [ADD] core Traverser API
There are still questions over how it'll work, and if it can work at all

bzr revid: xmo@openerp.com-20120301102117-zxd89ffcvo2n32nw
2012-03-01 11:21:17 +01:00
Xavier Morel 739d1c7363 [ADD] basic docstrings to Query and Model
bzr revid: xmo@openerp.com-20120228132832-pf16do6611fcwrj1
2012-02-28 14:28:32 +01:00
Xavier Morel f26eff28a9 [FIX] typos
bzr revid: xmo@openerp.com-20120228130321-rzxy8axbqtnjr1ze
2012-02-28 14:03:21 +01:00
Xavier Morel e6f5d4c211 [ADD] Model API, reimplement DataSet/DataSetSearch on top of it (as much as possible)
TODO: traversal state API, removing even more method (e.g. completely remove DataSet.call in the Python API)

bzr revid: xmo@openerp.com-20120227135626-yxqh0gc6jwrdkshs
2012-02-27 14:56:26 +01:00
niv-openerp 011286b863 [fix] removed arbitrary limit in name_search
bzr revid: nicolas.vanhoren@openerp.com-20120216103535-txdh6m6nmwlew53o
2012-02-16 11:35:35 +01:00
niv-openerp cf6b9b6e3e [fix] complex bug in BufferedDataSet
lp bug: https://launchpad.net/bugs/925345 fixed

bzr revid: nicolas.vanhoren@openerp.com-20120214161558-k634bkwbwq0vk58p
2012-02-14 17:15:58 +01:00
niv-openerp c8912b68d8 [fix] problem with on_changes in the editable lists in o2m
bzr revid: nicolas.vanhoren@openerp.com-20120214152031-br1lq6zqx6ycdj7p
2012-02-14 16:20:31 +01:00
niv-openerp 6d17167b36 [fix] problem in BufferedDataSetStatic : should not trigger a on_change when we call create()
bzr revid: nicolas.vanhoren@openerp.com-20120213165437-lhs3d6iyvx61vlun
2012-02-13 17:54:37 +01:00
Xavier Morel a7354829cd [CNG] make forms worse but pagination not break in case of manyrecords
bzr revid: xmo@openerp.com-20120209170748-l70q7grxgsumha2i
2012-02-09 18:07:48 +01:00
Xavier Morel 6ebf8face0 [ADD] sorting support in buffered datasets
bzr revid: xmo@openerp.com-20120206103259-nt3wjmt9w9k7kegy
2012-02-06 11:32:59 +01:00
Xavier Morel 7b25f9d4c7 [UP] update underscore
bzr revid: xmo@openerp.com-20120206101215-yutyc4dv2p1qgxtu
2012-02-06 11:12:15 +01:00
Xavier Morel ae273f2414 [IMP] move DataSetSearch#sort to DataSet#sort
bzr revid: xmo@openerp.com-20120206094648-1pq0y6oczk8uzzw6
2012-02-06 10:46:48 +01:00
Xavier Morel ceaf203ce9 [IMP] remove fixed todo
bzr revid: xmo@openerp.com-20120130095339-x3cmsfrzxpwtl8u6
2012-01-30 10:53:39 +01:00
Xavier Morel 084bf9fb3f [FIX] in m2o fields, abort previous name_get when new one (for same field) arrives in order to limit the number of requests in-flight
lp bug: https://launchpad.net/bugs/920884 fixed

bzr revid: xmo@openerp.com-20120124141927-wznbkd2tf3mngq31
2012-01-24 15:19:27 +01:00
niv-openerp c044b70429 [imp] removed identifier_prefix
bzr revid: nicolas.vanhoren@openerp.com-20120124151343-t17b3obenv244io3
2012-01-24 16:13:43 +01:00
niv-openerp 3002bd091f [imp] removed bunch of old stuff in widget
bzr revid: nicolas.vanhoren@openerp.com-20120124145810-lr2y8igt9iqzqepn
2012-01-24 15:58:10 +01:00
Xavier Morel 7b38be7370 [FIX] DataSetStatic.read_slice called with no options should not blow up
lp bug: https://launchpad.net/bugs/919161 fixed

bzr revid: xmo@openerp.com-20120120124930-zug80i862x9mwu34
2012-01-20 13:49:30 +01:00
Xavier Morel 07a459f2d4 [FIX] trailing commas
bzr revid: xmo@openerp.com-20120117132843-obecwigtts1rf9ja
2012-01-17 14:28:43 +01:00
Xavier Morel 88eb2db8f9 [FIX] doc typo
bzr revid: xmo@openerp.com-20120111162923-v1icuslj5jtcfme8
2012-01-11 17:29:23 +01:00
Fabien Meghazi 25283f304b [FIX] Refactoring leftovers
bzr revid: fme@openerp.com-20120111084952-n7ghlby6uos5i0nb
2012-01-11 09:49:52 +01:00
Fabien Meghazi e9ca86dd63 [IMP] More dataset refactoring
bzr revid: fme@openerp.com-20120110165451-pvchn668y0b1p645
2012-01-10 17:54:51 +01:00
Fabien Meghazi f0c294e584 [ADD] Add options arguments to Dataset#read_index in order to provide custom contexts
bzr revid: fme@openerp.com-20120110143513-00p14goadekz0y4z
2012-01-10 15:35:13 +01:00
niv-openerp 53144e6ed8 [imp] improved js-side Model class
bzr revid: nicolas.vanhoren@openerp.com-20120106104009-67z8ofmo4ndl4651
2012-01-06 11:40:09 +01:00
niv-openerp 666ed25b4d [imp] simplified buffered dataset
bzr revid: nicolas.vanhoren@openerp.com-20120106100331-ouggh486o1zab1vz
2012-01-06 11:03:31 +01:00
niv-openerp f295808ff1 [imp] replaced many usages of setTimeout by async_when
bzr revid: nicolas.vanhoren@openerp.com-20111219162805-0ibqw4hn23imkfuj
2011-12-19 17:28:05 +01:00
Xavier Morel d8df2d5e17 [FIX] have page view force a return to the previous view if switched to with no record
lp bug: https://launchpad.net/bugs/900225 fixed

bzr revid: xmo@openerp.com-20111219125039-049o944efkkl2sk9
2011-12-19 13:50:39 +01:00
Xavier Morel 308c975967 [FIX] static datasets: don't set the index to 0 if there are no ids at all, the form view does not like it
lp bug: https://launchpad.net/bugs/899043 fixed

bzr revid: xmo@openerp.com-20111215154100-aspzga71cng767u8
2011-12-15 16:41:00 +01:00
niv-openerp 91909f1927 [imp] now closes dialogs when using client actions
bzr revid: nicolas.vanhoren@openerp.com-20111214170356-znxja2f0jekb63a9
2011-12-14 18:03:56 +01:00
Fabien Meghazi 9796aadeb4 [FIX] Dataset#callbutton: assume the last argument is the context
bzr revid: fme@openerp.com-20111206172515-dz4rduhcbd26b1e8
2011-12-06 18:25:15 +01:00
Xavier Morel 41e8b3f92c [FIX] correctly send context during graph's fields_get
lp bug: https://launchpad.net/bugs/898636 fixed

bzr revid: xmo@openerp.com-20111206113141-nbfxp0jx4lrgo95g
2011-12-06 12:31:41 +01:00
Fabien Meghazi 5ddb1549d5 [IMP] Dataset#get_id_index returns null instead of -1 when no record found
In order to pair with convention on Dataset#index === null for creation mode

bzr revid: fme@openerp.com-20111201142049-xqndd22l7pncfz0j
2011-12-01 15:20:49 +01:00
Fabien Meghazi b29b6f31a5 [IMP] Use type coercion in Dataset#select_id
bzr revid: fme@openerp.com-20111201140831-dth7rx1yny23427c
2011-12-01 15:08:31 +01:00
Xavier Morel b7dfc8bb45 [FIX] semicolon warnings
bzr revid: xmo@openerp.com-20111122101813-61xmoekdio52j1oj
2011-11-22 11:18:13 +01:00
Xavier Morel 89e5c72b6e [ADD] cache eviction for buffereddataset on records on which call_button has been invoked
lp bug: https://launchpad.net/bugs/885679 fixed

bzr revid: xmo@openerp.com-20111121163412-jyvpoa9smrk4qy2g
2011-11-21 17:34:12 +01:00
Fabien Meghazi 5ebcc65fc5 [FIX] Fixed data#read_index() so it returns same argument to callback and to .then()
bzr revid: fme@openerp.com-20111117130913-lji983yp8b7vb0do
2011-11-17 14:09:13 +01:00