Commit Graph

194 Commits

Author SHA1 Message Date
Christophe Matthieu 2f842d1703 [FIX] web: assertion error when save after speed multi delete in one2many
To reproduce use a form view with a one2many editable list and create a lot of lines. Then click a few times quickly on the delete.
If the user click at least two times on delete of a same record, the dataset add the id in "to_delete" the virtual id because "to_create" doesn't contains the virtual id of the record deleted previously.

E.g.: create a "Customer Payments" and select a "Customer" and "Payment Method" who generate a lot of "Credits" lines.
2015-10-12 17:15:28 +02:00
Stefan Rijnhart 33a65c2b8e [FIX] web: binary fields in one2many widgets
Don't retrieve the binary contents just to display the size, but pass context
with bin_size=True instead
Always pass filename in download link

Combination of patches from the bug report from Enrico Ganzaroli, Cedric Le
Brouster and Holger Brunn
Fixes #4899, lp:1167429
2015-06-25 11:45:47 +02:00
Christophe Simonis 780dd9891f [MERGE] forward port of branch saas-5 up to 7eab880 2014-09-15 14:00:02 +02:00
Christophe Simonis 56f2b7ae0f [MERGE] forward port of branch saas-3 up to fdc6271 2014-09-12 18:53:48 +02:00
Christophe Simonis fdc62713a5 [MERGE] forward port of branch 7.0 up to 9b1cdea 2014-09-12 17:28:55 +02:00
fka-odoo 875d7ed38e [FIX] web: sort with undefined value
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-09-11 17:38:40 +02:00
Frederic van der Essen ea7b440dc8 [IMP] web: allow rpc options to be passed to Model.query() calls 2014-08-26 12:21:04 +02:00
Martin Trigaux f9d43e83c6 [FIX] web: correct rev 680f955
Missing backport of commit f652402 for buffered dataset
Again, should not be forwardported
2014-07-23 12:31:25 +02:00
Géry Debongnie 5f09c7dedc [IMP] improves sorting mechanisms in datasets
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-06-16 10:44:23 +02:00
Gery Debongnie 53cca3a046 [MERGE] merge from trunk
bzr revid: ged@openerp.com-20140407080642-b51z9j9cryb72tpc
bzr revid: ged@openerp.com-20140408090852-xmfi9nwd2lzsfbza
2014-04-08 11:08:52 +02:00
Gery Debongnie 9d915db214 [FIX] read_group has been changed to return the results with field:interval 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-03 16:35:34 +02:00
Gery Debongnie 95b2daf17b [IMP] modifies the web client to be able to use the new 'lazy' parameter of 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 09:41:22 +02:00
Denis Ledoux 0aba30cbaa [FIX] web: data, read_ids, active_test false was mislocated. The context is no more altered, a new one is created
bzr revid: dle@openerp.com-20140402085359-k7e9iy1vqcpgvcqu
2014-04-02 10:53:59 +02:00
Denis Ledoux f652402dd7 [FIX] web: read_ids of data.js use method search_read if check_access_rule 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-27 12:24:56 +01:00
Christophe Simonis 541a5d3f82 [MERGE] forward port of branch saas-2 up to revid 3904 chs@openerp.com-20140318112743-tqv492026y2pnbff
bzr revid: chs@openerp.com-20140318115516-sn3laxqseam1oz3f
2014-03-18 12:55:16 +01:00
Christophe Simonis acb010a985 [MERGE] forward port of branch 7.0 up to revid 4162 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-18 12:27:43 +01:00
Martin Trigaux 82692f11a0 [MERGE] [FIX] one2many fields: when sortign on a column of type m2o (format (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-12 16:04:35 +01:00
Mohammed Shekha (OpenERP) f29f1e6f04 [FIX]Fixed the issue of o2m sorting by column, m2o field does not give proper result for sorting because whole value of m2o [id, value] going to compare for sorting.
bzr revid: msh@openerp.com-20140304110659-4uu38feetsjj0tt5
2014-03-04 16:36:59 +05:30
Xavier Morel cdc83a0763 [FIX] dataset.read_ids should always return records in the order of the 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-25 17:28:13 +01:00
Gery Debongnie f94f50c7e8 [FIX] fixes a crash caused by incorrect use of date/datetime fields of the 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-24 12:05:54 +01:00
Martin Trigaux 59aa0e88d9 Forward-port of latest saas-2 bugfixes, up to rev.3902 revid:mat@openerp.com-20140219111353-cxo860z7ctz7om30
bzr revid: odo@openerp.com-20140219163348-5fpbm3rgpkq7kjw5
2014-02-19 17:33:48 +01:00
Martin Trigaux 2e831ab7c3 [IMP] data: skip read_ids call when got no id (opw 604099).
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-18 11:14:38 +01:00
Olivier Dony 15a1aef33c [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3901 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-17 11:28:06 +01:00
Martin Trigaux 409c3cfe9f [FIX] data: _.find (prefered to older _.detect) may return undefined if no 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-02-13 09:50:08 +01:00
Gery Debongnie 8ed584d1ac [FIX] simplify a computation of raw_fields to make sure it doesn't crash (_.contains expects a list, and not a string) (addon web)
bzr revid: ged@openerp.com-20140130153700-2lno0uefta93ex53
2014-01-30 16:37:00 +01:00
Gery Debongnie a482809cf9 [FIX] correctly compute the attribute 'length' in a query_group so that the list view properly display groups when grouped by 'date:interval' (addon web)
bzr revid: ged@openerp.com-20140129092359-20kw6n3sxqobiqu5
2014-01-29 10:23:59 +01:00
Gery Debongnie d0806ed3f7 [FIX] makes the querygroup methods compatible with the 'field:interval' format of groupbys accepted by read_group
bzr revid: ged@openerp.com-20140122124449-4nodai5vkoz3eryf
2014-01-22 13:44:49 +01:00
Denis Ledoux 5649e0bbf2 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9770 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-16 17:14:15 +01:00
Christophe Simonis 0e870fc7a7 [MERGE] forward port of branch saas-2 up to revid 3897 dle@openerp.com-20140115121441-bskbyxxbc09ubavh
bzr revid: chs@openerp.com-20140115221349-3lw7b0kpo3f2d04l
2014-01-15 23:13:49 +01:00
Mohammed Shekha (OpenERP) b3391cd7fe [FIX]Web: Fixed the issue of immediate update of many2one field when 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-12-03 18:08:56 +05:30
Christophe Simonis 9f52ab382b [MERGE] forward port of branch saas-2 up to revid 3887 chs@openerp.com-20131122172422-tsd8wzqkbqknrw1w
bzr revid: chs@openerp.com-20131125160506-30uia4pdwzpp54gj
2013-11-25 17:05:06 +01:00
Frédéric van der Essen 0a76694628 [IMP] webclient: Introducing SimpleIndexedDB, a key value wrapper around IndexedDB
bzr revid: fva@openerp.com-20131122140048-goaplzrx26jvcmmu
2013-11-22 15:00:48 +01:00
Christophe Simonis 1e4b2695d5 [MERGE][FIX] web: fix race condition in BufferedDataset.
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-14 15:26:39 +01:00
Christophe Simonis 3213ad4ddd [FIX] web: instance.web.DataSetSearch.get_domain() returns the domain.
lp bug: https://launchpad.net/bugs/1195631 fixed

bzr revid: chs@openerp.com-20131105121843-rqplhk83fczxww0t
2013-11-05 13:18:43 +01:00
niv-openerp db75733848 [FIX] rare race condition in BufferedDataset
lp bug: https://launchpad.net/bugs/1248531 fixed

bzr revid: nicolas.vanhoren@openerp.com-20131107112017-7omd01ocvnbzx9m6
2013-11-07 12:20:17 +01:00
Christophe Simonis aabbb0b1c3 [MERGE] forward port of branch 7.0 up to revid 4055 chs@openerp.com-20131105121843-rqplhk83fczxww0t
bzr revid: chs@openerp.com-20131105125947-2q11suxxpxh18hyc
2013-11-05 13:59:47 +01:00
Frédéric van der Essen a590fbaf43 [MERGE] point_of_sale: various fixes and improvements
bzr revid: chs@openerp.com-20130910125223-5iu0tohmourxcz64
bzr revid: fva@openerp.com-20130911155921-xyqskhjx9r9pgw9c
2013-09-11 17:59:21 +02:00
Xavier Morel 4a1d3f16ce [FIX] broken pager
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-06 17:01:01 +02:00
Anael Closson dbedded58e [FIX] OPW 597162 : context not properly retreived and therefore not sent when retreiving o2m and m2m lines
lp bug: https://launchpad.net/bugs/1217374 fixed

bzr revid: acl@openerp.com-20130905155817-llmjnsmd252q3286
2013-09-05 17:58:17 +02:00
niv-openerp baef37aec6 [IMP] Removed old JavaScript module loading system in the 'web' addons. Still has some retro-compatibility for other addons.
bzr revid: nicolas.vanhoren@openerp.com-20130806125022-bzjbtn0nqk40ak4g
2013-08-06 14:50:22 +02:00
niv-openerp 76ef945c96 Corrected some stuff in openerp.web.Model
bzr revid: nicolas.vanhoren@openerp.com-20130805134059-3ayw6b0tqqberkaw
2013-08-05 15:40:59 +02:00
niv-openerp 226b142ac6 Simplified a little the Query class by removing a reference to a controller and using call_kw instead
bzr revid: nicolas.vanhoren@openerp.com-20130805130458-21w806v9wc456oq4
2013-08-05 15:04:58 +02:00
niv-openerp affb4f0589 Ported model to the framework
bzr revid: nicolas.vanhoren@openerp.com-20130805123916-s62upxq3jwqjygt0
2013-08-05 14:39:16 +02:00
niv-openerp c767a0d34c Added semicolons
bzr revid: nicolas.vanhoren@openerp.com-20130725103301-65nld10p1if7k0zt
2013-07-25 12:33:01 +02:00
niv-openerp 42e493e73e Added Gruntfile with jshint and corrected most js errors
bzr revid: nicolas.vanhoren@openerp.com-20130725100749-0i82gf3k3nvt4r44
2013-07-25 12:07:49 +02:00
Xavier Morel 1ea609ba65 [FIX] bugs discovered by failing onwrite test case
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 17:23:26 +02:00
Xavier Morel 8d0d43b40b [IMP] correctly reinsert ids into dataset when moving them around in the list view
bzr revid: xmo@openerp.com-20130607120355-x3poxy2ar2bpqqvw
2013-06-07 14:03:55 +02:00
Mohammed Shekha 2b65ba1f64 [FIX]Refixed the issue of resequence, added id at specified index in dataset.
bzr revid: msh@openerp.com-20130606065630-r536yqlcq0wihs8l
2013-06-06 12:26:30 +05:30
Xavier Morel aaa0cc0b82 [FIX] triggering of dataset_changed events to correctly happen *after* the 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-30 15:11:15 +02:00
Mohammed Shekha d8dd8fc14b [FIX]Fixe the issue of listview record re-ordering which is not working due to revision 3898.
bzr revid: msh@openerp.com-20130509085102-ln4lidp7caqw25ur
2013-05-09 14:21:02 +05:30