Commit Graph
43871 Commits
Author SHA1 Message Date
Xavier Morel 125eead80a [FIX] focus issues with m2o contextual menu (and popup operations)
bzr revid: xmo@openerp.com-20120619093651-7rfe1pp7ucuj0ajh
2012-06-19 11:36:51 +02:00
Xavier Morel 0516533c16 [FIX] handling of focus on m2o fields (in editable list row)
* Throw out focusin/focusout: the m2o widget's completion list is
  created at the page top (body) so the editable listview can't
  generically handle arbitrary widgets via mere focusin/focusout.

* Move responsibility of focus/blur events to the form view and its
  widgets.

* Events could not just be named ``focus`` and ``blur`` due to usage
  of jquery's event system: jquery will automatically call a method of
  the event's name if it exists on the object, which conflicts with
  .web.form.Field#focus and leads to an infinite loop (as Field#focus
  focuses the field's root element, which triggers the focus event,
  which calls the focus method,...) => form-* and widget-*, can be
  switched back in trunk

* m2o mess kind-of complex, basically:

  - the core input and the menu button behave as blur/focus triggers

  - when the autocompletion list is clicked, it will temporarily
    remove the focus from the input (blurring it), and put it back
    later... on a timer. Issue is the timer, we don't want to rely on
    having a bigger timer (as later revisions of the library may
    change our timings and it's iffy to rely on timers conserving
    order perfectly); on the other hand we know the focus *will* come
    back to the input eventually. So we can just avoid propagating
    blur iif the blur is the consequence of having clicked on the
    completion list.

  - roughly the same thing happens when clicking on $drop_down (after
    fixing the handling of its final focus to be consistent, as
    $drop_down would not re-focus the input if it was *closing* the
    completion list)

  - pretty sure the menu thing does *not work at all*, but I don't
    have the courage of fixing it before committing this part.

Date/datetime widget remains to be handled, basically the core focus
handling is the same as in e.g. a charfield *but* needs to handle (and
ignore) loss of focus from clicking inside the picker
widget. Expecting the level of suck to reach unknown heights.

bzr revid: xmo@openerp.com-20120619072518-lsrhzij5asxt2aea
2012-06-19 09:25:18 +02:00
Xavier Morel 70b0af1375 [IMP] jQuery exposes focusin and focusout, use that instead of its manual implementation
bzr revid: xmo@openerp.com-20120618073431-gmeo349oskbld53t
2012-06-18 09:34:31 +02:00
Xavier Morel 3e2cab2aad [FIX] handling of [Return] key to save records being edited in MSIE
* DOM events sequence screwed up, requiring an explicit blur on the
  current target to try and ensure the corresponding form widget would
  register its own change event
* Requirement to stop the default behavior of keypress and keydown on
  [Return] as they would somehow trigger the contextual menu of m2o
  fields on the row, at the wrong place, when in a char field (I don't
  even...)
* Delaying of the actual saving of the form (via `setTimeout`) to try
  and ensure the blur/change event has had the time to propagate
  correctly (and be handled) before we actually save

bzr revid: xmo@openerp.com-20120615055440-yn00uv4q8y29nboq
2012-06-15 07:54:40 +02:00
Xavier Morel 055edd7790 [ADD] automatic save of o2m rows being created/edited when clicking/focusing outside
bzr revid: xmo@openerp.com-20120614123731-x2owyp4nc1yi1ocj
2012-06-14 14:37:31 +02:00
Xavier Morel acfff868cb [IMP] return deferred from ListView#render_row_as_form indicating *when* the row has been rendered as a form
bzr revid: xmo@openerp.com-20120614123130-1z1vvt62rnr21bpz
2012-06-14 14:31:30 +02:00
Xavier Morel 7516028068 [IMP] allow overloading a listview's List and Groups types
bzr revid: xmo@openerp.com-20120614123056-cu3q34m4ysjxzqtt
2012-06-14 14:30:56 +02:00
Xavier Morel 05238cd948 [FIX] don't require an extended class to have a method yet to allow it to be overloaded
bzr revid: xmo@openerp.com-20120614123024-ngby1srdwojv5rmb
2012-06-14 14:30:24 +02:00
Xavier Morel 83eef22856 [FIX] don't break the handling of record index 0 in editable list views: index 0 means something different than index = null
bzr revid: xmo@openerp.com-20120614085009-xuo1ifu2vnlcic72
2012-06-14 10:50:09 +02:00
Xavier Morel 29584df420 [IMP] hide [disk drive] button in o2m editable lists
bzr revid: xmo@openerp.com-20120614084420-0ky3d41kk2r8zlp8
2012-06-14 10:44:20 +02:00
Xavier Morel 49f6ab9853 [FIX] do not break dataset index (at the wrong moment) when clicking on [Create] row
dataset.index was previously set to ``null`` in handler of [Create]
button (to fullfill contract with form view that dataset.index should
be ``null`` to indicate the creation of a new record with no id).

Issue: after setting the index to ``null``, the list view calls
``render_row_as_form`` which starts out trying to save a row being
edited (case: clicking of the [Create] button after having selected a
row for edition or after having written in a new record e.g. [Create]
-> type -> [Create] type -> ...). This tentative to save the existing
form would be performed in the context of a ``null`` dataset.index,
which the form view doesn't (and shouldn't, index should be that of
record *being edited*) expect.

-> first save in whatever dataset state is the current one, and *right
before* creating the new form (after having saved and/or discarded the
previous one) we have the id of the new record to edit (or ``null``),
find the index for *that* and set ``dataset.index`` to that (or
``null``) so the new form view can be created and opened in the right
context.

bzr revid: xmo@openerp.com-20120613153842-pd6xitjs8n003ogs
2012-06-13 17:38:42 +02:00
Xavier Morel 9f9bbcff33 [FIX] in ensure_saved, discard non-dirty editable rows
if the editable row's form isn't dirty, either nothing has been
entered in a new row or an existing row (being edited) has not been
altered, so can just discard the row (and reload it from cache if it's
an edition).

bzr revid: xmo@openerp.com-20120613153633-ms7i8t9lvdarxqi3
2012-06-13 17:36:33 +02:00
Xavier Morel 533f17231c [FIX] if a form is not dirty, always consider the corresponding o2m[list] to be valid
the user has not modified the editable line after opening it (whether to create a new record or to edit an existing one), so shouldn't be invalid

bzr revid: xmo@openerp.com-20120613153555-fq0moy1q464l92yj
2012-06-13 17:35:55 +02:00
Xavier Morel e475bc7a2a [IMP] don;t needlessly wrap values into deferreds in pipes
bzr revid: xmo@openerp.com-20120613153412-c2byqrc66jcn0e97
2012-06-13 17:34:12 +02:00
Xavier Morel 5ec4ecf85d [FIX] O2M validation: correctly proxy validation from/to edited row of the list view, if any
bzr revid: xmo@openerp.com-20120613100819-sw93kst4dpwhnu1p
2012-06-13 12:08:19 +02:00
Xavier Morel 632a4dee0c [FIX] correctly forward arguments in _super() call of editable listview's form widgets override
bzr revid: xmo@openerp.com-20120613094037-3iny9dsdhmp7qspi
2012-06-13 11:40:37 +02:00
Xavier Morel 0240ab1682 [CHG] try saving any row under edition when starting an (other) row edition
editable lists should not lose data unless explicitly asked to forget about it by user action

bzr revid: xmo@openerp.com-20120612150820-z97jxme1vcu3x3jd
2012-06-12 17:08:20 +02:00
Xavier Morel eb83b58e32 [IMP] Deferred usage in editable listview
bzr revid: xmo@openerp.com-20120612150708-0z5dsclcrtj29st3
2012-06-12 17:07:08 +02:00
Xavier Morel 6c4568c548 [FIX] mis-handling of url actions in sidebar
bzr revid: xmo@openerp.com-20120608090619-494wipr0pfekq6ex
2012-06-08 11:06:19 +02:00
Launchpad Translations on behalf of openerp 98e535ec56 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120606053039-a4juyl2r3spflgxr
bzr revid: launchpad_translations_on_behalf_of_openerp-20120607051141-x5vxg958wo48mr5b
bzr revid: launchpad_translations_on_behalf_of_openerp-20120608051529-d5rbbmihnra3sz05
bzr revid: launchpad_translations_on_behalf_of_openerp-20120608051613-be9s789ejsqjffow
2012-06-08 05:16:13 +00:00
niv-openerp 629ffe9370 fixed bug with ir.actions.url
bzr revid: nicolas.vanhoren@openerp.com-20120607140822-bsljpmaqnbg5m2pm
2012-06-07 16:08:22 +02:00
Xavier Morel 79044bc264 [ADD] handling of required attr on m2m fields
bzr revid: xmo@openerp.com-20120607111149-cgf3ap0yjzsxrkjx
2012-06-07 13:11:49 +02:00
Xavier Morel 5dd4134e24 [FIX] Error while deleting a record when there is only one record in pageview
bzr revid: xmo@openerp.com-20120607110503-exd0yhx8cqsimxer
2012-06-07 13:05:03 +02:00
Xavier Morel 9098fdea91 [IMP] display clean error dialog when user tries to create a database which already exists
bzr revid: xmo@openerp.com-20120607110313-rqj2k80cxpskdvx0
2012-06-07 13:03:13 +02:00
Xavier Morel 43f37b457f [FIX] re-display [Add Pad] button after removing the pad from a document
bzr revid: xmo@openerp.com-20120607110035-qxh5p2nnf3p0mj5s
2012-06-07 13:00:35 +02:00
Xavier Morel bab4adf42b [IMP] formatting of o2m and m2m fields in list views, courtesy of William Beltrán
backported from trunk revision xmo@openerp.com-20120607101329-aq0caswlxamd8z0n

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

bzr revid: xmo@openerp.com-20120607103240-edk8759inv2jiw2q
2012-06-07 12:32:40 +02:00
msh-openerp 3dde84cb82 [FIX]Refixed the issue of pad button not rendered when we delete the pad link.
bzr revid: msh@tinyerp.com-20120607083645-nyrk6vu3fjnmj5sv
2012-06-07 14:06:45 +05:30
msh-openerp 9756f7bb7a [FIX]Refixed the issue of database creation which was giving traceback instead of message.
bzr revid: msh@tinyerp.com-20120607072805-htfer9njseaty66w
2012-06-07 12:58:05 +05:30
Amit Dodiya 902694cf86 [FIX] Error while deleting a record when there is only one record in pageview
bzr revid: ado@openerp.com-20120607065207-jwu8qlvo9i5c59jo
2012-06-07 12:22:07 +05:30
Amit Dodiya 60d2e6878c [FIX] Error while deleting a record when there is only one record in pageview
bzr revid: ado@openerp.com-20120607064823-wpwvgq3ep7ufiui4
2012-06-07 12:18:23 +05:30
Amit Dodiya 7c38280c50 [FIX] Error while deleting a record when there is only one record in pageview
bzr revid: ado@openerp.com-20120607064431-2r2gbh0hav11ojeg
2012-06-07 12:14:31 +05:30
Amit Dodiya 7c87017fc2 [FIX] Error while deleting a record when there is only one record in pageview
bzr revid: ado@openerp.com-20120607063146-h22emjasnj0ararc
2012-06-07 12:01:46 +05:30
cpa-openerp 55954ed199 [FIX] Code optimization as per suggestion.
bzr revid: cpa@tinyerp.com-20120607060633-ewnd0kr9qzxw0tey
2012-06-07 11:36:33 +05:30
Launchpad Translations on behalf of openerp 300b3face2 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120607051242-r8pa2ag5y48gicq6
2012-06-07 05:12:42 +00:00
Olivier Dony 51292dca89 [MERGE] OPW 574895: fix incorrect matching of column headers when importing CSV files
- required fields may sometimes be provided by alternative columns,
  and all the alternatives are therefore not required (e.g. for
  a m2o the CSV can provide m2o or m2o/id columns)
- when fields share the same label, precedence when matching
  column headers should be given to the field with the exact
  same name, rather than just the first one encountered

bzr revid: odo@openerp.com-20120606174043-f1nmkad3p17mccyy
2012-06-06 19:40:43 +02:00
Xavier Morel cff511da83 [FIX] incorrect handling of 'None of the following condition must match' advanced search combinator
Introduced during 'simple style fixes' (sic) of rev xmo@openerp.com-20110812094541-zeb5lz6nk0jgq21y

bzr revid: xmo@openerp.com-20120606143721-004xllr8j28sgga9
2012-06-06 16:37:21 +02:00
Xavier Morel af000c9dd2 [IMP] performances when opening an m2o "search" without any filtering term
Don't prefilter via name_search if no data has been entered in the m2o
field, it's going to return all records (not paginated) so it's a
waste of time and resources

bzr revid: xmo@openerp.com-20120606124717-h2p211vbrydazado
2012-06-06 14:47:17 +02:00
Xavier Morel 85f95e6858 [FIX] handling of empty domains, context and view_id in action descriptors
* Some literal actions (not stored) provide an empty string for
  domains and contexts instead of (respectively) an empty array or an
  empty dict literal inside the string. Treat those case as nothing
  being provided.
* Likewise some literal actions provide nonsensical (but falsy, but
  not False) values for view_id (such as an empty list). Yield a
  ``False`` view_id for all falsy ``view_id`` received (``0`` should
  not be a valid view_id, so ``False`` works)

bzr revid: xmo@openerp.com-20120606123508-ndh3jpzw1nabf98n
2012-06-06 14:35:08 +02:00
Xavier Morel bc25bd8cce [FIX] reloading of o2m forms in dialogs (popups) after clicking on a button
bzr revid: xmo@openerp.com-20120606123230-bjwrplz1xeekeecg
2012-06-06 14:32:30 +02:00
Xavier Morel d7ddebed96 [FIX] handling of get_selection in listview in case of non-selectable lists (e.g. editable o2ms?)
OPW 572764

bzr revid: xmo@openerp.com-20120606123115-hilv8huw72di4ovi
2012-06-06 14:31:15 +02:00
Xavier Morel 5b6aed9576 [FIX] handling of empty lines in CSV file being imported (ignore them)
lp bug: https://launchpad.net/bugs/941977 fixed

bzr revid: xmo@openerp.com-20120606103353-k8z51yhp9j1u2irp
2012-06-06 12:33:53 +02:00
Launchpad Translations on behalf of openerp f5404ed23c Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120605051802-bospr54h50wirl0p
bzr revid: launchpad_translations_on_behalf_of_openerp-20120606053111-in0n1qxhmy84ofxp
2012-06-06 05:31:11 +00:00
Christophe Simonis e0bdf1abd6 [FIX] opw: catch invalid results from opw server
bzr revid: chs@openerp.com-20120605152100-82bjiisvcck07s53
2012-06-05 17:21:00 +02:00
Quentin (OpenERP) cee6ba5247 [FIX] account_coda: fixed coda import to work with iban bank accounts
bzr revid: qdp-launchpad@openerp.com-20120605122517-wm86m0yoo5c0bsfe
2012-06-05 14:25:17 +02:00
Quentin (OpenERP) 53d3c03185 [REF] account_coda: stripped dummy spaces at end of lines
bzr revid: qdp-launchpad@openerp.com-20120605094112-hdhavcwy767tbbxg
2012-06-05 11:41:12 +02:00
Olivier Dony a6a98f70b4 [FIX] edi: fix Invoice preview template, uos_id field not required so may be missing
bzr revid: odo@openerp.com-20120605085712-r08p06gyeqo0i0o0
2012-06-05 10:57:12 +02:00
cpa-openerp 817c495816 [FIX] Fixed in advance search when search on 'None of the following condition must match'.
bzr revid: cpa@tinyerp.com-20120605055415-xgczrlyzb1g92exx
2012-06-05 11:24:15 +05:30
Launchpad Translations on behalf of openerp 7af45caa3f Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120605051658-eplb8pqgus26l24a
bzr revid: launchpad_translations_on_behalf_of_openerp-20120605051757-3r6mwelhve3xheyn
2012-06-05 05:17:57 +00:00
Olivier Dony ded3cb59f9 [MERGE] OPW 575395: orm: don't defer function fields computation during creation of parent records (inheritS)
bzr revid: odo@openerp.com-20120604125001-ls1pkxp9as1eyn6i
2012-06-04 14:50:01 +02:00
Olivier Dony 14a6cd841f [FIX] OPW 575395: orm: don't defer function field computation during creation of parent records (inheritS)
An optimization in the set() method of o2m fields
disables the direct computation of function fields
in order to avoid computing them line-by-line.
This is done with context key 'no_store_function',
and deferred at the end of the caller write() or
create() method.
This was unfortunately disabling all function fields
in parent model (via _inheritS) at the time of
creation, even though those were *not* batch-computed
at the end.
The patch removes the 'no_store_function' field in
the context that is passed to inheritS parents during
creation, as it was never meant to be passed.

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

bzr revid: odo@openerp.com-20120604114536-4t6ulwl93zalfgr7
2012-06-04 13:45:36 +02:00