Commit Graph

164 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 2e0270783a []FIX] disable (broken) inline edition in grouped editable lists
Because the Add/Create button is global, it's not really possible to
know *where* to create the new record, and the current design can't
really deal with a record being edited outside of all groups.

An option might be to create a dedicated empty group for that, but the
cost/benefit is high and the UI would probably be odd.

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

bzr revid: xmo@openerp.com-20130306102136-2ms7llbt4swka92k
2013-03-06 11:21:36 +01:00
Xavier Morel a8d2327cda [FIX] Correctly stop embedded form when switching from editable to non-editable list
When using the ``set_editable`` feature (context key) from filters
(togglable on/off), the list view would not correctly clean up
(destroy) the form when switching from editable with a started editor
(and form) to non-editable, leading to form fields (in this case m2o
fields being in an incorrect state and trying to query a non-started
autocompletion widget on every click anywhere blowing it up).

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

bzr revid: xmo@openerp.com-20130225135629-8k338gw0arsi6m6j
2013-02-25 14:56:29 +01:00
Vijaykumar Baladaniya 5f23b55909 [FIX] passtrough_events name replace with passthrough_events.
bzr revid: vba@tinyerp.com-20130204084307-8qremz8qi1qcwhfe
2013-02-04 14:13:07 +05:30
Xavier Morel e972b6a5d4 [FIX] cancel list edition on search
Otherwise, if a search is performed while creating or editing a line
(e.g. in logged calls, create a line without saving then try to apply
a filter) the edition section (and new line) disappears but the list
remains in "edition" mode (e.g. save/discard button) even though
edition data is missing (trying to save or discard will error out).

bzr revid: xmo@openerp.com-20121210100914-delia5bhmtgrujpu
2012-12-10 11:09:14 +01:00
Xavier Morel 0b0cfff063 [MERGE] missing translation marks, courtesy of Csaba TOTH
lp bug: https://launchpad.net/bugs/1084306 fixed

bzr revid: xmo@openerp.com-20121129140109-bwx1njhyqfenc2d3
2012-11-29 15:01:09 +01:00
Xavier Morel 9f76458404 [FIX] groupby on editable list
Because of the "meta" columns (e.g. group name column),
ListView#columns would end up with a different number of elements than
ListView#fields_view.arch.children, and when zipping them together (to
build the form view for edition) things wouldn't match anymore.

It would seem simply filtering out meta columns (and only keep those
actually specified by the view) is sufficient to fix the issue and
have everything line up again. I'm midly impressed.

bzr revid: xmo@openerp.com-20121129131301-scc38i4l55ea7lis
2012-11-29 14:13:01 +01:00
tsabi 72109e7541 fix tab problem
bzr revid: csaba.toth@i3rendszerhaz.hu-20121129115306-ifncjymnmuk989eq
2012-11-29 12:53:06 +01:00
tsabi 92e87f7e6f Mark strings to be translated.
Maybe some missed, but most of them marked.

bzr revid: tsabi-20121129002200-20tppzvh0ap5tfwe
2012-11-29 01:22:00 +01:00
Xavier Morel ef5be74caa [FIX] disable sorting (column-click) in an editable listview being edited
To do so, extract sort handling to its own method (bound using the
events hash) and override-and-disable in editable.

bzr revid: xmo@openerp.com-20121127094109-mojnq50mzsrcj3q0
2012-11-27 10:41:09 +01:00
Denis Ledoux dle@openerp.com 08e0522ad6 [FIX]Add option 'disable_editable_mode' which disable editable widget when setted to true. This is because search popups should not be editable. 'search more...' was not clickable in fields with many2many_tags widget and default tree view with flag editable setted
lp bug: https://launchpad.net/bugs/1080997 fixed

bzr revid: dle@openerp.com-20121120153958-jopkpxmz38b78phj
2012-11-20 16:39:58 +01:00
Xavier Morel e0ec6783e5 [IMP] listview already checks non-empty ids array for deletion, so check not useful
bzr revid: xmo@openerp.com-20121119084533-6qnktzmh19kfwtoo
2012-11-19 09:45:33 +01:00
Xavier Morel 28cbfd22b7 [FIX] editable listview: do not attempt to delete falsy ids (from the dataset)
During the creation of a new record (in an editable list), the
prospective new record has a ``false`` id. In a non-o2m, the row under
creation can be selected (checkbox) and deleted (More > Delete),
leading to the request to ``DELETE false`` being sent to the ORM…
which said ORM does not wish to entertain.

Before actually performing the delete request (more precisely
forwarding said request to the listview itself), remove all false-ish
ids from the array.

Also, don't send a request to delete nothing.

bzr revid: xmo@openerp.com-20121119084203-0vz4v9myfizxz88u
2012-11-19 09:42:03 +01:00
Xavier Morel 86842fe9c8 [FIX] correctly handle case of deleting-an-o2m-line-being-edited
move special case in o2m listview to main editable and expand to
correctly fit edition cases, not just work in case of creation

issue: if a row being edited is deleted in an o2m, the form will be
blurred and try cancelling/saving the edition and reloading the row,
but this will only happen *after* the record/row/whatever has been
"deleted" and (amongst other things) removed from the buffered o2m
cache, leading to a tentative read on the server side (usually with a
local id which doesn't even make sense) and thus an error.

Intercept the deletion signal to cancel the edition immediately and
only let the deletion through after the edition has successfully been
canceled.

bzr revid: xmo@openerp.com-20121116164416-8kr39t6jtqy2s3jc
2012-11-16 17:44:16 +01:00
niv-openerp 729eb0ff4f [FIX] problem with list editable in o2m
bzr revid: nicolas.vanhoren@openerp.com-20121114103156-tzbz8sm4x54jgjvm
2012-11-14 11:31:56 +01:00
Xavier Morel a379a62d88 [REM] useless events binding
edition is triggered by row_clicked on the internal List

not even sure there's any td left which isn't an oe_list_field_cell

bzr revid: xmo@openerp.com-20121113124227-173ykkiwgv862oly
2012-11-13 13:42:27 +01:00
Xavier Morel 06bcfd27fc [FIX] editable listview @on_write handling in case of @colors
the onwrite handler created an "empty" record with no field value
whatsoever, which'd blow up in the py evaluator. As during creation
(edition of a record where all fields are empty) create a record where
all fields are set to ``false`` so rendering works correctly, and wait
for content refresh to get correct data.

Also added a test for @on_write

bzr revid: xmo@openerp.com-20121112150526-vrr66ms95qbuoped
2012-11-12 16:05:26 +01:00
Xavier Morel 788e8edf81 [FIX] don't resize & reposition invisible or readonly fields in editable listview
the datetime field doesn't setup its internal widget if the field is readonly, so accessing it blows up

bzr revid: xmo@openerp.com-20121108153544-o2uvpfeoofu2tx12
2012-11-08 16:35:44 +01:00
Fabien Meghazi 0b4b1cf52d [MERGE] trunk
bzr revid: fme@openerp.com-20121108111222-cetz6q6s47iwxnm2
bzr revid: fme@openerp.com-20121108111448-2rzx9moaqloc5lpc
2012-11-08 12:14:48 +01:00
niv-openerp fd2bb078fb Fixed problem with editable list
bzr revid: nicolas.vanhoren@openerp.com-20121106103828-uw6xv1ed7wueii71
2012-11-06 11:38:28 +01:00
Fabien Meghazi 2994db89ca [MERGE] trunk
bzr revid: fme@openerp.com-20121105093013-31veb91zkdeiuddh
2012-11-05 10:30:13 +01:00
Xavier Morel 62f4d999f4 [IMP] positioning of edition fields within a scrolled dialog
they still don't work every time, but should be slightly more reliable

bzr revid: xmo@openerp.com-20121031140718-j3e4r9djyq34rqu7
2012-10-31 15:07:18 +01:00
Xavier Morel b6af4f22cb [FIX] [ESC] key closing dialogs when editing a list
bzr revid: xmo@openerp.com-20121031140641-l1nf68jxiye8fyi8
2012-10-31 15:06:41 +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
Xavier Morel 9bf9ca7a67 [FIX] list view to use View#load_view rather than its own implementation thereof
bzr revid: xmo@openerp.com-20121023085329-y01e1u77vfz2n7a9
2012-10-23 10:53:29 +02:00
Xavier Morel b5be361c55 [FIX] various listview issues
bzr revid: xmo@openerp.com-20121018150108-althdcxk3jc2bkun
2012-10-18 17:01:08 +02:00
Xavier Morel 4223b1e786 [IMP] add overridable dimension-setting method on form fields
bzr revid: xmo@openerp.com-20121018145712-am4y6bdnz2x14i2c
2012-10-18 16:57:12 +02:00
vta vta@openerp.com ae8efbed06 [FIX] Fixed on_loaded in editable list.
bzr revid: vta@openerp.com-20121018115451-vx4i66o75kld3io9
2012-10-18 13:54:51 +02:00
Xavier Morel 8e54c76845 [FIX] fetching of table cells to match form inputs to
Only fetch the table cells of the row being edited *after* having
saved a pending edition.

Otherwise, when re-editing the same record (e.g. click between buttons
or on a readonly field), the cells are saved, the record is refreshed
destroying the cells, and when trying to get the cell positions to
position form fields correctly... the cells which don't exist anymore
return 0, 0 as their position and nothing works correctly.

bzr revid: xmo@openerp.com-20121017134351-lpmz27f1iemmsfoq
2012-10-17 15:43:51 +02:00
niv-openerp 38582c8410 [FIX] Problem in editable list view: in sale orders, when we add a line in the order lines o2m then select a product, some strange numbers appear on the top left of the list view.
bzr revid: nicolas.vanhoren@openerp.com-20121015123856-j4sgaqtf3oexg6of
2012-10-15 14:38:56 +02:00
Vidhin Mehta (OpenERP) ffb5a9c802 [IMP]method name change.
bzr revid: vme@tinyerp.com-20121012083827-hq8xrnn333foyiu3
2012-10-12 14:08:27 +05:30
vta vta@openerp.com 40eceb20a3 [FIX] Fixed on_record_loaded.
bzr revid: vta@openerp.com-20121010100233-tulf3c1fvnt2s85e
2012-10-10 12:02:33 +02:00
Raphael Collet b339be1450 [MERGE] trunk-access-ui-jam (hide buttons or disable actions to create/edit/delete that are not permitted to user)
bzr revid: rco@openerp.com-20120905093859-oh1udej3kgyghudy
2012-09-05 11:38:59 +02:00
Raphael Collet 14e87c09f3 [IMP] rename method _is_action_enabled to is_action_enabled
bzr revid: rco@openerp.com-20120904141155-288vwhonbt07dfcs
2012-09-04 16:11:55 +02:00
Xavier Morel 1f1a0ef14b [IMP] cancel pending edition when hiding the list view, if editable
otherwise the edition disappears but part of the list view (e.g. buttons at the top) remain in the wrong state

bzr revid: xmo@openerp.com-20120904121823-kejzzquax2hdedoo
2012-09-04 14:18:23 +02:00
Xavier Morel b4e20f0c14 [IMP] use list.Column's parsed (and potentially altered) modifiers to generate the edition form view
This way, listview 'widgets' can alter the modifiers object and influence the corresponding form widget

bzr revid: xmo@openerp.com-20120904115627-v626hcb9o0s7bcrp
2012-09-04 13:56:27 +02:00
Xavier Morel fd40dcbeff [FIX] add minimum height to listview rows matching that of edition row fields
Also fix reset of border-radius: none is not a valid value for
border-radius, change to 0.

bzr revid: xmo@openerp.com-20120904101139-xyl0dskdk6dbdfe1
2012-09-04 12:11:39 +02:00
Raphael Collet 0304a1eada [MERGE] from trunk
bzr revid: jam@tinyerp.com-20120831045217-xoy25yc9ignfi94v
bzr revid: rco@openerp.com-20120831145305-4wf3sl8un59k61he
2012-08-31 16:53:05 +02:00
Antony Lesuisse b745a2038a [IMP] view_form remove used callback on do_save
bzr revid: al@openerp.com-20120829102300-0a1m4f237wbmqzv4
2012-08-29 12:23:00 +02:00
Jigar Amin - OpenERP 548672a2c3 merge lp:openerp-web
bzr revid: jam@tinyerp.com-20120827044256-engs2hibz5x5fnwh
2012-08-27 10:12:56 +05:30
niv-openerp 5e338c591a [IMP] made a whole-application replace of $element by $el
bzr revid: nicolas.vanhoren@openerp.com-20120824182707-vt91ef40ieeudwyw
2012-08-24 20:27:07 +02:00
Jigar Amin - OpenERP a02de882a2 [USA] Reomved the unxpected lines
bzr revid: jam@tinyerp.com-20120821071842-srbnqutwfia8m5cb
2012-08-21 12:48:42 +05:30
Jigar Amin - OpenERP 09f031cd99 [IMP] If edit = false and trww views Editable shoue not allow edit column instead redirect normal behaviour
bzr revid: jam@tinyerp.com-20120821071702-pknuv44poe1hvlfx
2012-08-21 12:47:02 +05:30
Fabien Pinckaers 3d48b3f877 [IMP] misc CSS improvements, mainly editable lists
bzr revid: fp@tinyerp.com-20120808193842-nxrk13vc8hv9wxlg
2012-08-08 21:38:42 +02:00
Xavier Morel 67518796c6 [ADD] editable flag on list views for fp
bzr revid: xmo@openerp.com-20120808104311-ajrne9fb9emtaoe6
2012-08-08 12:43:11 +02:00
Xavier Morel 741a1541da [FIX] action button on row being *created* in editable list view
Altered action button workflow:

* Action callback (passed to ``do_button_action``) now *takes* a
  record id instead of closing over it, in case the original list does
  not have an id to start with
* ``handle_button`` partially applies the id *it* got to the callback
  via ``_.bind``
* Editable list view override of ``do_button_action`` uses ``id`` it
  got from ``ensure_saved`` in case it got id=false in

bzr revid: xmo@openerp.com-20120807092317-wk0xyfzrhxc89t94
2012-08-07 11:23:17 +02:00
Xavier Morel d8e2bec158 [FIX] state of editor after cancelled cancel() (haha), handling of a record being edited during o2m deletion
bzr revid: xmo@openerp.com-20120806150002-45c8mjq9dk5hck7y
2012-08-06 17:00:02 +02:00
Fabien Meghazi 9c31ba65d9 [FIX] Fixed form's fields autofocus
bzr revid: fme@openerp.com-20120802124909-w4li8dt6y0kktnfh
2012-08-02 14:49:09 +02:00
Xavier Morel 84bf640e67 [IMP] when trying to focus the first visible field in the editable list view, ensure that we only stop when we actually manage to focus a field
bzr revid: xmo@openerp.com-20120802100020-kbmo1s5shjwaof69
2012-08-02 12:00:20 +02:00