Commit Graph

150 Commits

Author SHA1 Message Date
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
Xavier Morel c19bc50648 [FIX] ids of deleted records living in shared dataset when clicking on list row
When a record is activated, the listview will do some jiggling around
assigning the ids of internal dataset to the one shared between all
views, this is mostly for the case where one switches from a "grouped"
list view, so the form view only cycles on the "current" group.

Problem is, that internal dataset is not correctly synchronized with
the shared one, so when the id is removed from the shared dataset it
is *not* removed from the internal one(s), and when the switch is made
the ids from the internal dataset are set on the shared one and
reintroduce the deleted record, leading to the form view's incorrect
state.

Fix the issue by updating the dataset's ids list when a record is
deleted from the records tree.

Also extracted some stuff from DataSetSearch's unlink callback so it
can be overridden and is more stable across datasets.

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

bzr revid: xmo@openerp.com-20130416152000-06dbwkgdb8zlf9pc
2013-04-16 17:20:00 +02:00
Xavier Morel a455d6c2b2 [FIX] correctly handle group_by_no_leaf when no grouping applied
If there are no grouping field specified *but* group_by_no_leaf is
specified, should call read_group with no grouping fields: will
generate a single group (which can not be opened) for all of the
model.

Necessary for analysis views since individual "records" make no sense.

bzr revid: xmo@openerp.com-20130416092344-2pqog8f7xprn6hsh
2013-04-16 11:23:44 +02:00
Fabien Meghazi 8a20760fc8 [FIX] DataSet#size() problem + FormView#on_button_delete() shall pop breadcrumb on empty dataset
bzr revid: fme@openerp.com-20130404101459-m9q90e32qwf068lw
2013-04-04 12:14:59 +02:00
niv-openerp c55de6996f [FIX] small problem with m2o, does not uses context when opening them in read-only mode
bzr revid: nicolas.vanhoren@openerp.com-20130319102719-0gdwvmix4d3x8th5
2013-03-19 11:27:19 +01:00
niv-openerp 2328040c3a added readonly fields to buffered dataset cache
bzr revid: nicolas.vanhoren@openerp.com-20130308104050-uqt5qi2n9dmcd2hb
2013-03-08 11:40:50 +01:00
Xavier Morel 7278305f68 [FIX] O2M record reloading after workflow progress
Evict record from BufferedDataSet cache as is done with button calls,
otherwise when caller reloads record (read) after having executed the
workflow action, it'll get the old one back from the BDS's cache.

bzr revid: xmo@openerp.com-20130301103543-jra87w2wm417tgyc
2013-03-01 11:35:43 +01:00
Mohammed Shekha 8d02a23ee9 [FIX]Fixed the issue of reload record affter callign exec_workflow for one2many dataset.
bzr revid: msh@openerp.com-20130219101940-uum7iqbvvhg619uk
2013-02-19 15:49:40 +05:30
Xavier Morel 48b0d70fc2 [FIX] context evaluation in kanban resequencing
bzr revid: xmo@openerp.com-20121128151044-i58uwcdem2cgyyrv
2012-11-28 16:10:44 +01:00
Xavier Morel cc4d5a79ec [FIX] group_by using old code
bzr revid: xmo@openerp.com-20121127143917-pk4un6zi1v96niyr
2012-11-27 15:39:17 +01:00
Xavier Morel 5a9f78302f [MERGE] from trunk
when creating the instance, set instance.session.uid to 42 so the evaluator has something to chew on when it tries to create the evaluation context

bzr revid: xmo@openerp.com-20121120101733-b0ire11bbuywfi8u
2012-11-20 11:17:33 +01:00
niv-openerp 76cce62c99 [IMP] Added feature in the rpc() method to be able to perform a call without triggering the loading messages.
bzr revid: nicolas.vanhoren@openerp.com-20121116094200-q4cby6jofcrk87hd
2012-11-16 10:42:00 +01:00
niv-openerp de39dccefb [FIX] problem with invalid on*|do* refactoring
bzr revid: nicolas.vanhoren@openerp.com-20121114125922-cirvs06k133dwako
2012-11-14 13:59:22 +01:00
Antony Lesuisse 521f52caff [FIX] dataset class
bzr revid: al@openerp.com-20121110222822-ey7vzl7excr70j9k
2012-11-10 23:28:22 +01:00
Antony Lesuisse 27c872cef3 remove CallbackEnabled
The on_/do_ binding still happens in Widget.init, but as we now use ES5 bind()
it doesnt clutter stack traces anymore. However the fate of this automatic binding
feature remains uncertain.

bzr revid: al@openerp.com-20121110193440-78mpwamqx7iwq2ux
2012-11-10 20:34:40 +01:00
Fabien Meghazi 2994db89ca [MERGE] trunk
bzr revid: fme@openerp.com-20121105093013-31veb91zkdeiuddh
2012-11-05 10:30:13 +01:00
Xavier Morel 2295ab0d5a [FIX] dataset methods to get their request context through Dataset#get_context
if they go directly through the embedded model, child classes to
DataSet don't get the occasion to override the generation/fetching of
the context, and e.g. relational fields thus don't work correctly (as
their field context isn't forwarded).

bzr revid: xmo@openerp.com-20121031143723-j4q0t8cbzttela1r
2012-10-31 15:37:23 +01:00
Fabien Meghazi ca6c49becf [IMP] jQuery deferred API changes refactoring. Changed 'then's in 'done'/'fail' and 'pipe's in 'then'
bzr revid: fme@openerp.com-20121030140630-gf20ye8fou1ebxft
2012-10-30 15:06:30 +01:00
niv-openerp c6eaa8beb8 [FIX] problem in read_group, caused an exception "cannot read 'lang' in undefined" in a lot of views
bzr revid: nicolas.vanhoren@openerp.com-20121022124935-mxfzx2wg431bqhm9
2012-10-22 14:49:35 +02:00
niv-openerp 268d1856cd [FIX] problem with exec_workflow in dataset: does not return the expected result format
bzr revid: nicolas.vanhoren@openerp.com-20121019165211-n6oh82sv4uc6jfsg
2012-10-19 18:52:11 +02:00
Xavier Morel 5d5a8e85c2 [FIX] group_by_no_leaf handling
bzr revid: xmo@openerp.com-20121017110750-vrtx04b40e4kralm
2012-10-17 13:07:50 +02:00
Xavier Morel 71bbb149fb [MOVE] datagroup to a private ListView API
bzr revid: xmo@openerp.com-20121017105213-sfosutg26zg0w2ax
2012-10-17 12:52:13 +02:00
Fabien Meghazi 5a6158bb5f [FIX] Broken Dataset#unlink
bzr revid: fme@openerp.com-20121016093834-ulhdzbhvasw9msp5
2012-10-16 11:38:34 +02:00
vta vta@openerp.com 76fe889331 [FIX] Fixed some small issues concerning event triggering.
bzr revid: vta@openerp.com-20121015075320-2zgo32vy5fengm7b
2012-10-15 09:53:20 +02:00
vta vta@openerp.com c6dfd8afc1 [MERGE] Latest trunk.
bzr revid: vta@openerp.com-20121015071605-jgupguux9p1aavdm
2012-10-15 09:16:05 +02:00
Christophe Simonis 40d2a376ca [IMP] help debugging xhr calls
bzr revid: chs@openerp.com-20121012130140-qgi8ret2oxoeko6d
2012-10-12 15:01:40 +02:00
Vidhin Mehta (OpenERP) 4112f2b3a7 [IMP]method name change
bzr revid: vme@tinyerp.com-20121012121911-nmzuomg2p87qiszp
2012-10-12 17:49:11 +05:30
Xavier Morel e6b77eb820 [IMP] shortcut call to eval_domain_and_context to be evaluated on the JS side, also add some offline-evaluation of contexts and domains in rpc call methods
bzr revid: xmo@openerp.com-20121011100532-5ihje0maslp37zpf
2012-10-11 12:05:32 +02:00
Vidhin Mehta (OpenERP) dd747c0962 [IMP]replace callbackenable from dateset on_change event.
bzr revid: vme@tinyerp.com-20121011094132-9a752zxib2rpy4ji
2012-10-11 15:11:32 +05:30
vta vta@openerp.com 6b509ab8ea [FIX] on_unlink.
bzr revid: vta@openerp.com-20121010143607-nv3lhmy8r27m1ls9
2012-10-10 16:36:07 +02:00
ggh-openerp 5ab21e13a3 [IMP] Remove add_last in on_unlink method
bzr revid: ggh@tinyerp.com-20121009061618-ohsjlzf14jpqws2q
2012-10-09 11:46:18 +05:30
Antony Lesuisse ef56fc10d0 [MERGE] callback2deferred dataset.call
bzr revid: al@openerp.com-20121006162030-s5moj83dzegxlron
2012-10-06 18:20:30 +02:00
Vidhin Mehta (OpenERP) 558ad0616a [IMP]remove callbacks from call method and improve related code.
bzr revid: vme@tinyerp.com-20121003103428-fnr942tzl065rcei
2012-10-03 16:04:28 +05:30
Antony Lesuisse c4eafc859d [IMP] dataset docstrings cleanups, remove traverser
Direct access to Dataset.ids was supposed to be superseeded by exposing a cleaner api named Traverser.
But as it never happened we keep the leaky dataset api for the moment.
Direct access to ids should be avoided whenever possible.
We might reintroduce Traverser in the future.

bzr revid: al@openerp.com-20121001223630-epxu4vad93i74lmd
2012-10-02 00:36:30 +02:00
Antony Lesuisse f025e07860 [MERGE] trunk-deferred-write, change r.result into r
bzr revid: al@openerp.com-20121001220248-e40r7wypgzxa3i0a
2012-10-02 00:02:48 +02:00
Vidhin Mehta (OpenERP) 7c701944ec [IMP]remove callbacks from write method and change related code.
bzr revid: vme@tinyerp.com-20121001085609-rxdoknvpo130ehq3
2012-10-01 14:26:09 +05:30
Antony Lesuisse 0aeb750b95 [MERGE] callback2deferred dataset.call_and_eval
bzr revid: al@openerp.com-20120930151806-ss1cbv2qg0vemf1z
2012-09-30 17:18:06 +02:00
Antony Lesuisse c5bcb0e53f [MERGE] callback2deferred dataset.call_button (and fix exec_workflow)
bzr revid: al@openerp.com-20120930151538-ka35fozw40v99e71
2012-09-30 17:15:38 +02:00
Antony Lesuisse 1a369bfd3c [MERGE] callback2deferred dataset.name_get
bzr revid: al@openerp.com-20120930150329-b3j0pmnf7gnxlxzj
2012-09-30 17:03:29 +02:00
Antony Lesuisse 5278efece4 [MERGE] callback2deferred dataset.name_search
bzr revid: al@openerp.com-20120930145836-uavy0c4ghxlmxvcc
2012-09-30 16:58:36 +02:00
Antony Lesuisse b634ca91a0 [MERGE] callback2deferred dataset.exec_workflow
bzr revid: al@openerp.com-20120930144916-aco0b10x4ykdddg6
2012-09-30 16:49:16 +02:00
Antony Lesuisse 7b36898705 [MERGE] callback2deferred dataset.name_create
bzr revid: al@openerp.com-20120930144651-x731f97te5a2pjx5
2012-09-30 16:46:51 +02:00
Vidhin Mehta (OpenERP) 768d769b2d [IMP]remove callbacks of create method from data.js
bzr revid: vme@tinyerp.com-20120928101243-tg4litc304d6m7wg
2012-09-28 15:42:43 +05:30
Vidhin Mehta (OpenERP) c768a2f226 [IMP]remove callback from exec_workflow method and update related code.
bzr revid: vme@tinyerp.com-20120928094423-r7zpurqq0dbr6cyr
2012-09-28 15:14:23 +05:30
Vidhin Mehta (OpenERP) bb5fd9ba81 [IMP]remove callback from name_create method and update related code.
bzr revid: vme@tinyerp.com-20120928094007-mx5p402a1ehdl73f
2012-09-28 15:10:07 +05:30