summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/data.js
AgeCommit message (Collapse)Author
2015-03-18[REF] web: add module system to the web clientGéry Debongnie
This commit introduces a new module system for the javascript code. Instead of using global (namespaced) variables everywhere (like openerp.web.whatever, ...), each file declare one (or more) module with its dependencies. Each module will be loaded after its dependencies, and will be given a reference to the return values. This change is a massive departure from the way the client worked previously. It will sadly break some/most history, but I am sure that the future git ecosystem will allow you to easily browse the history past this revision (one can dream). This commit feature: * main namespace is now odoo instead of openerp * a way to define modules and dependencies (inspired by requirejs) * many files have been splitted in simpler subfiles * basic support for debugging in odoo.__DEBUG__ * no global variable (i.e. nothing in window.openerp) * many bug fixes, many new bugs Future vision: this modularization should simplify future code development, simplify debugging and will allow a serious testing effort
2015-01-08[REM] modelines: Gotta catch 'em allRichard Mathot
2014-09-15[MERGE] forward port of branch saas-5 up to 7eab880Christophe Simonis
2014-09-12[MERGE] forward port of branch saas-3 up to fdc6271Christophe Simonis
2014-09-12[MERGE] forward port of branch 7.0 up to 9b1cdeaChristophe Simonis
2014-09-11[FIX] web: sort with undefined valuefka-odoo
In this awesome programming language called javascript, undefined is neither bigger nor smaller than a string. Previous code was then considering undefined values equal to any string. This fix allows to sort in a column of a o2m field and group the undefined values together. opw 607704
2014-08-26[IMP] web: allow rpc options to be passed to Model.query() callsFrederic van der Essen
2014-07-23[FIX] web: correct rev 680f955Martin Trigaux
Missing backport of commit f652402 for buffered dataset Again, should not be forwardported
2014-06-16[IMP] improves sorting mechanisms in datasetsGéry Debongnie
Create a deserialize_sort method and add a set_sort method to datasets. The set_sort method is useful to avoid duplicating code in lists and kanban views (to set the initial default order)
2014-04-08[MERGE] merge from trunkGery Debongnie
bzr revid: ged@openerp.com-20140407080642-b51z9j9cryb72tpc bzr revid: ged@openerp.com-20140408090852-xmfi9nwd2lzsfbza
2014-04-03[FIX] read_group has been changed to return the results with field:interval ↵Gery Debongnie
as key (for example, date_deadline:week), to avoid name collisions. This commit changes the web client to make sure it properly processes the new result format. No change at all for queries that do not use the field:interval format (addon web) bzr revid: ged@openerp.com-20140403143534-3jpugw9g8n966n9t
2014-04-02[IMP] modifies the web client to be able to use the new 'lazy' parameter of ↵Gery Debongnie
the method readgroup (so now the client can requires a readgroup to be eager/lazy) (addon web) bzr revid: ged@openerp.com-20140402074122-sf52hult1qkqos81
2014-04-02[FIX] web: data, read_ids, active_test false was mislocated. The context is ↵Denis Ledoux
no more altered, a new one is created bzr revid: dle@openerp.com-20140402085359-k7e9iy1vqcpgvcqu
2014-03-27[FIX] web: read_ids of data.js use method search_read if check_access_rule ↵Denis Ledoux
option is true. This fix is related to revision 3985 revid:dle@openerp.com-20140326142040-pls0dk2kd03z55ro, which did not worked for buffered dataset (virtual one2many line in view form search_read is used instead of read to not return records for which we lose the access rights bzr revid: dle@openerp.com-20140327112456-iyceuf9dnn07hwke
2014-03-18[MERGE] forward port of branch saas-2 up to revid 3904 ↵Christophe Simonis
chs@openerp.com-20140318112743-tqv492026y2pnbff bzr revid: chs@openerp.com-20140318115516-sn3laxqseam1oz3f
2014-03-18[MERGE] forward port of branch 7.0 up to revid 4162 ↵Christophe Simonis
launchpad_translations_on_behalf_of_openerp-20140318062141-rdiqz2ptnz3qmxd0 bzr revid: chs@openerp.com-20140129095637-mbfz82r5pyz4dctc bzr revid: dle@openerp.com-20140210140818-5mtk1qhheo219bm1 bzr revid: dle@openerp.com-20140214114445-krexrwm9o2nrxepk bzr revid: mat@openerp.com-20140219111353-cxo860z7ctz7om30 bzr revid: dle@openerp.com-20140221120519-1pj3wc8kqgkr5uda bzr revid: chs@openerp.com-20140318112743-tqv492026y2pnbff
2014-03-12[MERGE] [FIX] one2many fields: when sortign on a column of type m2o (format ↵Martin Trigaux
(id, name)), instead of sorting on the tuple (and then id), sort on the name_get value to match what is shown on the screen bzr revid: mat@openerp.com-20140312150435-shq9hy3b9njkhxsn
2014-03-04[FIX]Fixed the issue of o2m sorting by column, m2o field does not give ↵Mohammed Shekha (OpenERP)
proper result for sorting because whole value of m2o [id, value] going to compare for sorting. bzr revid: msh@openerp.com-20140304110659-4uu38feetsjj0tt5
2014-02-25[FIX] dataset.read_ids should always return records in the order of the ↵Xavier Morel
parameter ids BufferedDataSet.read_ids assumes the input and output orders are the same, and returns wonky results when not the case, which in turns fucks up its cache as it associates ids and records incorrectly. bzr revid: xmo@openerp.com-20140225162813-8ofxpiy1012eehgk
2014-02-24[FIX] fixes a crash caused by incorrect use of date/datetime fields of the ↵Gery Debongnie
form 'date:interval': the list view in some case tried to format the strings as a date, and it could not parse it. lp bug: https://launchpad.net/bugs/1279382 fixed bzr revid: ged@openerp.com-20140224110554-y007810prx7qg5yi
2014-02-19Forward-port of latest saas-2 bugfixes, up to rev.3902 ↵Martin Trigaux
revid:mat@openerp.com-20140219111353-cxo860z7ctz7om30 bzr revid: odo@openerp.com-20140219163348-5fpbm3rgpkq7kjw5
2014-02-18[IMP] data: skip read_ids call when got no id (opw 604099).Martin Trigaux
This avoids making useless calls to to read the values of o2m fields when the read on a record already told us there was no ids. bzr revid: mat@openerp.com-20140218101438-yqim33cvtg6wt4mw
2014-02-17[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3901 ↵Olivier Dony
dle@openerp.com-20140214114445-krexrwm9o2nrxepk The following fixes have intentionally been reverted, as the code has significantly changed and the bugs cannot be reproduced: - web_calendar fix (revid:dle@openerp.com-20140214114258-0hcsfdwyl61gph0v) - CSS fix for buttons (revid:mat@openerp.com-20140213145755-txvtwqbfc83vnw9o) bzr revid: odo@openerp.com-20140217102806-qg6kwk2jomdvvmlj
2014-02-13[FIX] data: _.find (prefered to older _.detect) may return undefined if no ↵Martin Trigaux
match and would trow an error when applying .values Instead returns undefined which is handled below. This does not solve the issue when records are not loaded properly but gives a better information on the reason. bzr revid: mat@openerp.com-20140213085008-pnq4r0ebfl072u78
2014-01-30[FIX] simplify a computation of raw_fields to make sure it doesn't crash ↵Gery Debongnie
(_.contains expects a list, and not a string) (addon web) bzr revid: ged@openerp.com-20140130153700-2lno0uefta93ex53
2014-01-29[FIX] correctly compute the attribute 'length' in a query_group so that the ↵Gery Debongnie
list view properly display groups when grouped by 'date:interval' (addon web) bzr revid: ged@openerp.com-20140129092359-20kw6n3sxqobiqu5
2014-01-22[FIX] makes the querygroup methods compatible with the 'field:interval' ↵Gery Debongnie
format of groupbys accepted by read_group bzr revid: ged@openerp.com-20140122124449-4nodai5vkoz3eryf
2014-01-16[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9770 ↵Denis Ledoux
revid:chs@openerp.com-20140116154645-sy4zhdgqc48xaqbx bzr revid: dle@openerp.com-20131224112612-5gjit5uu1aaaqstx bzr revid: dle@openerp.com-20140103094532-mbczi9ssr3gc90o1 bzr revid: dle@openerp.com-20140108105833-gblxqdw3if1gt35k bzr revid: dle@openerp.com-20140115121441-bskbyxxbc09ubavh bzr revid: dle@openerp.com-20140115165506-yuux9km39gbv7k4n bzr revid: dle@openerp.com-20140116161415-0y9m0kgavcytzj9z
2014-01-15[MERGE] forward port of branch saas-2 up to revid 3897 ↵Christophe Simonis
dle@openerp.com-20140115121441-bskbyxxbc09ubavh bzr revid: chs@openerp.com-20140115221349-3lw7b0kpo3f2d04l
2013-12-03[FIX]Web: Fixed the issue of immediate update of many2one field when ↵Mohammed Shekha (OpenERP)
many2one object name has been changed from follow button popup, reloaded the record from database forcefull to update dataaset, do not call form-blur when follow button is clicked, also do not evict record when record is still not created. bzr revid: msh@openerp.com-20131203123856-gce4li1igo9k1mak
2013-11-25[MERGE] forward port of branch saas-2 up to revid 3887 ↵Christophe Simonis
chs@openerp.com-20131122172422-tsd8wzqkbqknrw1w bzr revid: chs@openerp.com-20131125160506-30uia4pdwzpp54gj
2013-11-22[IMP] webclient: Introducing SimpleIndexedDB, a key value wrapper around ↵Frédéric van der Essen
IndexedDB bzr revid: fva@openerp.com-20131122140048-goaplzrx26jvcmmu
2013-11-14[MERGE][FIX] web: fix race condition in BufferedDataset.Christophe Simonis
Backport of saas-2 commit 3867 nicolas.vanhoren@openerp.com-20131107112017-7omd01ocvnbzx9m6 lp bug: https://launchpad.net/bugs/1248531 fixed bzr revid: chs@openerp.com-20131114142639-ng7wzfjwvvel2nhv
2013-11-05[FIX] web: instance.web.DataSetSearch.get_domain() returns the domain.Christophe Simonis
lp bug: https://launchpad.net/bugs/1195631 fixed bzr revid: chs@openerp.com-20131105121843-rqplhk83fczxww0t
2013-11-07[FIX] rare race condition in BufferedDatasetniv-openerp
lp bug: https://launchpad.net/bugs/1248531 fixed bzr revid: nicolas.vanhoren@openerp.com-20131107112017-7omd01ocvnbzx9m6
2013-11-05[MERGE] forward port of branch 7.0 up to revid 4055 ↵Christophe Simonis
chs@openerp.com-20131105121843-rqplhk83fczxww0t bzr revid: chs@openerp.com-20131105125947-2q11suxxpxh18hyc
2013-09-11[MERGE] point_of_sale: various fixes and improvementsFrédéric van der Essen
bzr revid: chs@openerp.com-20130910125223-5iu0tohmourxcz64 bzr revid: fva@openerp.com-20130911155921-xyqskhjx9r9pgw9c
2013-09-06[FIX] broken pagerXavier Morel
Turns out when code looks somewhat odd there may well be a good reason for it, and changing it without wondering breaks the pager. In this case, `/web/dataset/search_read` has a significant difference with Model.search_read: it returns the records slice specified by (``limit``, ``offset``) but it also returns the *total number of records* for ``domain`` which is sort-of useful to generating the pager. lp bug: https://launchpad.net/bugs/1218266 fixed bzr revid: xmo@openerp.com-20130906150101-2qb349fzaz6rye36
2013-09-05[FIX] OPW 597162 : context not properly retreived and therefore not sent ↵Anael Closson
when retreiving o2m and m2m lines lp bug: https://launchpad.net/bugs/1217374 fixed bzr revid: acl@openerp.com-20130905155817-llmjnsmd252q3286
2013-08-06[IMP] Removed old JavaScript module loading system in the 'web' addons. ↵niv-openerp
Still has some retro-compatibility for other addons. bzr revid: nicolas.vanhoren@openerp.com-20130806125022-bzjbtn0nqk40ak4g
2013-08-05Corrected some stuff in openerp.web.Modelniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130805134059-3ayw6b0tqqberkaw
2013-08-05Simplified a little the Query class by removing a reference to a controller ↵niv-openerp
and using call_kw instead bzr revid: nicolas.vanhoren@openerp.com-20130805130458-21w806v9wc456oq4
2013-08-05Ported model to the frameworkniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130805123916-s62upxq3jwqjygt0
2013-07-25Added semicolonsniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130725103301-65nld10p1if7k0zt
2013-07-25Added Gruntfile with jshint and corrected most js errorsniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130725100749-0i82gf3k3nvt4r44
2013-06-07[FIX] bugs discovered by failing onwrite test caseXavier Morel
Following xmo@openerp.com-20130607120355-x3poxy2ar2bpqqvw: * add_ids should not add ids which are already in the dataset, this leads to duplicates which the web client does not overly like * methods which add or remove records should not manipulate dataset.ids as well as that's now automatic (on_write feature) * record add should only insert the id in the dataset on non-false ids (e.g. list edition uses "pending" record with false id during creation, then sets the id it got from create() call) bzr revid: xmo@openerp.com-20130607152326-2pja1kuwo0ropfuw
2013-06-07[IMP] correctly reinsert ids into dataset when moving them around in the ↵Xavier Morel
list view bzr revid: xmo@openerp.com-20130607120355-x3poxy2ar2bpqqvw
2013-06-06[FIX]Refixed the issue of resequence, added id at specified index in dataset.Mohammed Shekha
bzr revid: msh@openerp.com-20130606065630-r536yqlcq0wihs8l
2013-05-30[FIX] triggering of dataset_changed events to correctly happen *after* the ↵Xavier Morel
operation also added it to DataSet#create calls where it seems to be missing lp bug: https://launchpad.net/bugs/1185752 fixed bzr revid: xmo@openerp.com-20130530131115-tzap50w2ydnqmxit
2013-05-09[FIX]Fixe the issue of listview record re-ordering which is not working due ↵Mohammed Shekha
to revision 3898. bzr revid: msh@openerp.com-20130509085102-ln4lidp7caqw25ur