Commit Graph
7484 Commits
Author SHA1 Message Date
Aaron Bohy d1056939ad [FIX] Web: pager for ListView in One2Many fields
The pager was not displayed in One2Many List views. This fix applies the
same behavior as in One2Many Kanban views, which is probably not the
best way to do it, but which works fine.

The issue was caused by 2 things:
   - The One2Many.FormView template removes the condition around  the
     buttons/pager divs of the FormView template. However, it was using a
     selector that does not seem to be used anymore. We thus removed it
     and the buttons/pager divs are now in the rendered One2Many List View
   - The rendered pager was appended to this.options.$pager whereas it
     should be appended to the corresponding div in its own template.

This commit should not be forwardported
2015-04-08 10:48:50 +02:00
Christophe Simonis 16f23dd43a [MERGE] forward port of branch 8.0 up to 8ad1105 2015-04-01 19:31:22 +02:00
Christophe Simonis 8ad11055bb [MERGE] forward port of branch saas-3 up to 12f600c 2015-04-01 19:13:25 +02:00
Christophe Simonis 12f600cec9 [MERGE] forward port of branch 7.0 up to 35077af 2015-04-01 19:07:59 +02:00
Cedric Snauwaert 80d3adc1f3 [FIX] web: when converting a node back to xml, correctly escape node content 2015-04-01 11:02:31 +02:00
David Monjoie 27594146b5 [IMP] web: added readonly checkmarks fix in saas file
I forgot to put the new rule of cc9f2919be in the saas file.
opw 630611
2015-03-31 14:28:52 +02:00
David Monjoie cc9f2919be [FIX] web: fixed opacity of readonly checkboxes
Apparently, browsers decide how they want to style readonly inputs,
and it seems like Firefox is greying them out while Chrome doesn't.
We use an opacity: 0.5 rule to grey them out ourselves in Chrome,
but in Firefox they are not dark enough to read easily because of
the double greying. I checked with the designers but they don't
have any better fix for that.
2015-03-30 15:00:34 +02:00
Christophe Simonis cd08281979 [IMP] web: debug menu extra actions available to users in "Configuration" group 2015-03-27 13:14:46 +01:00
Géry Debongnie a35badc00b [FIX] web: graph view should respect graph type
The graph view is supposed to load in a given mode, as described by the
type attribute ('bar', 'line', 'pie').  However, the type attribute in
the fieldviewget was ignored, which means that the graph view was
always loaded in bar mode.
2015-03-27 10:05:11 +01:00
Christophe Simonis 313acf87a2 [MERGE] forward port of branch 8.0 up to d780014 2015-03-26 18:44:22 +01:00
Christophe Simonis d780014248 [MERGE] forward port of branch saas-3 up to ce69064 2015-03-26 18:00:06 +01:00
Christophe Simonis ce690649e9 [MERGE] forward port of branch 7.0 up to 2a0c018 2015-03-26 17:56:05 +01:00
Goffin Simon b83f5a8ef9 [FIX] ir_filters: filters not in the language of the user
the context must be passed to the get_filters function to take into account
the language of the user.

opw:630057
2015-03-26 14:41:54 +01:00
Géry Debongnie 9333c88d71 [IMP] web: pivot view should allow explicitely defined measures
In some rare cases (non stored functional fields), the pivot view should
allow it as a valid measure.  This commit changes the pivot view in such
a way that any explicitely defined measure will be added to the list,
even if it should not work, like for the non stored functional fields.

The pivot view has no way to know if a generic model has overrided the
read group method in a correct way to make it work, it is up to the
developer to make sure that measures defined in the xml are valid.
2015-03-26 09:46:18 +01:00
Nicolas Lempereur aaf9badbce [FIX] account: context/domain in move line tree
On a line write in a account.move.line tree view, the on_write return all the
sibling move lines of the written move line. The lines are then displayed even
if they do not match the current search domain.

This fix adds the context on the given on_write callback request, and in
on_create_write use a on_write_domain in this context to filter the returned ids.

fixes #3161, closes #5727

opw-630093
2015-03-26 08:59:23 +01:00
Christophe Simonis c2b4766860 [MERGE] forward port of branch 8.0 up to c54d83e 2015-03-25 18:39:17 +01:00
Christophe Simonis 3540ec53e4 [MERGE] forward port of branch saas-3 up to 6b70b80 2015-03-25 18:00:08 +01:00
Christophe Simonis 6b70b80a0e [MERGE] forward port of branch 7.0 up to 881c10b 2015-03-25 17:41:53 +01:00
Christophe Simonis fb8b970567 [MERGE] forward port of branch 8.0 up to 0ed63d7 2015-03-23 16:35:03 +01:00
Géry Debongnie 23bb735908 [FIX] web: datetime widget didn't detect all changes
The datetime widget use the "keypress" event to detect if it has been
changed.  Unfortunately, some keys, such as backspace, do not fire a
keypress event.  This commit listen instead on the 'change' event, which
should fire when the input has changed.
2015-03-23 10:50:34 +01:00
Christophe Simonis 77a75d4e1f [FIX] web: remove leftover future_display_name.
see 694fe1f
2015-03-21 15:59:05 +01:00
Nicolas Lempereur d539be329e [FIX] view_form: add context to search_count
Currently, the view_form search_count doesn't propagate the context, so when
searching on a translated field, the count can be different than the one we
would expect and get with a search in a current language different than en_US.

opw-628792 opw-630212 closes #5825
2015-03-20 10:39:33 +01:00
Christophe Simonis 3baab9b22d [MERGE] forward port of branch 8.0 up to 7780004 2015-03-19 18:48:41 +01:00
Christophe Simonis 7780004f95 [FIX] web: correct many2one dropdown visibility.
The dropdown should only be append to visible elements.
2015-03-19 18:41:45 +01:00
Nicolas Lempereur b97578f689 [FIX] view_form: sequence at item creation
The sequence for new items in some models is simply set to a constant 10.
Hence if 3 items had after reordering sequences 10, 11 and 12. If a new item is
added, it would get after saving at the second position.

This fix set the sequence of a new item to the maximum+1 or minimum-1 sequence
of current items sequences (max if tree has editable="bottom", min if tree has
editable="top").

opw-627830
2015-03-19 09:56:12 +01:00
Olivier Dony 694fe1fb3f [FIX] web: remove deprecated hack for future_display_name
This temporary patch was used to simulate the presence of a
`display_name` field in all models. It is not needed anymore
as of version 8.0, which comes with the actual magic to make
`display_name` work everywhere.
2015-03-18 14:10:18 +01:00
Christophe Simonis 3440501fd0 [MERGE] forward port of branch 8.0 up to 890174b 2015-03-12 14:46:06 +01:00
Christophe Simonis 97389d34da [MERGE] forward port of branch 8.0 up to 1ac4d31 2015-03-12 14:30:24 +01:00
Géry Debongnie f9cdd19cdb [FIX] web: fix searchview menus height
first, I want to say that I'm not proud of this.  Let's just say that it
is better than the previous code (of which I'm not proud either).

The issue is that the sub menus (filters/groupbys/favorites) aren't very
good when their height is too big, and they're hidden below the screen
without scrollbar.  Previous code tried clumsily to compute the correct
max height in js, but it was only done in filters menu, and did not
always work.  This code do the same in css.  This would be good except
that it is just an estimation: calc(100vh - 125px).  It assumes that
the header will approximately take 120px, and size the max-height
accordingly.
2015-03-12 11:46:33 +01:00
Aaron Bohy a1d319a8fb [FIX] Web: view_list.js: _.template()
The signature and behavior of function template() of underscore.js has
been changed from rev. 1.7.0. It doesn't accept an initial data object
anymore, and always returns a function.

This commits adapts our calls to _.template(). This fixes display bugs in
list views (e.g. the progressbar which was not displayed).
2015-03-12 11:16:06 +01:00
Olivier Dony df4bd736f1 [FIX] search view: autocomplete: further improve support for rapid barcode scanning
This patch removes the asynchronous code that was
still used to open the autocompletion drawer.
Even with the setTimeout delay forced to 0, the
asynchronous handling meant the final ENTER
keyUp event could be processed before the opening
of the autocompletion drawer related to the last
key pressed. This would trigger the search with
the search string of the previous autocompletion
popup, missing the last few keys.

Also handle ENTER at keyDown, because in some
rare cases a barcode scanner may emit only
the keyDown event for ENTER, without the
corresponding keyUp, causing a merge of two
successive scanned barcodes.

Based on many tests conducted with different
barcode scanners, the only thing that
is guaranteed is the correct order of the keyPress
events for all regular characters, and the
fact that the ENTER keyDown and/or keyUp will
always be sent after them.

All other events can be mixed or simply missing
if you make a rapid succession of scans, especially
if done with a long series of barcodes.

Scanners tested (with 1ms data transmission delay):
 - Honeywell Eclipse MS5145
 - Dacomex Slim 50mm CCD scanner
2015-03-11 17:59:46 +01:00
Géry Debongnie 438c33ed5f [FIX] web: usability fix in searchview
* when users press ENTER after editing some custom search, the resulting
  filter is now applied.
* when users press ENTER in favorite menu, save current search, the
  current search is now saved
2015-03-11 13:58:17 +01:00
Géry Debongnie cda9221d7c [FIX] web: prevent graph view from crashing (sometimes)
if the graph view is set in bar mode, and does not have any groupby,
then it tried to read some property from its viewmanager, which results
in a crash.  It is most likely the remnants of the old code, this commit
correctly sets the string to the current measure.
2015-03-11 13:43:26 +01:00
Julien Laloux a20545a936 [IMP] web: add no update info on metadata view (debug mode) 2015-03-11 11:10:42 +01:00
Christophe Simonis 9eccc71a14 [MERGE] forward port of branch 8.0 up to c0496ed 2015-03-10 18:33:30 +01:00
Christophe Simonis c0496ed03a [MERGE] forward port of branch saas-3 up to f8a9405 2015-03-10 18:00:43 +01:00
Christophe Simonis f8a94057e5 [MERGE] forward port of branch 7.0 up to a5e3269 2015-03-10 17:51:16 +01:00
Nicolas Lempereur 9abf7a2010 [FIX] mass mailing: keep menu when back in backend
The menu was not present in 8.0 when going back from the mass mailing email
composer to the backend. This fix adds the current action id as a return_action
query string parameter and return to the correct action.

fixes #5591

opw-629526
2015-03-10 13:51:08 +01:00
Géry Debongnie 1fe4cef530 [FIX] web: fix issue with search view input
This patch hopefully solves an annoying issue with the search view:
when the user types really fast (or uses a barcode scanner for example),
the resulting search string was (sometimes) missing the last few
characters.  I'm unclear on the exact reason why it happens.  From the
code, I can only guess that it happens because the scanner use a TAB
key instead of ENTER (TAB is handled in keydown event, ENTER in keyup),
or that the key events aren't in a correct order (if the user press a
key A, then press ENTER, then release ENTER, then release A, it results
in an empty key).

Anyway, the way this patch probably solves the issue is by using the
keypress event for triggering the search view.  I hope that in every
case, the keypress event are correctly ordered.  It leads to some code
I'm not really proud of this patch, but the key event handling are
quite messy.  Also, I need to handle the search string also when the
keyup event is fired, because it might change the search (for example
backspace trigger a keyup, but not a keypress).
2015-03-10 11:28:56 +01:00
Nicolas Martinelli 2cc09e86af [FIX] web: on_change event on one2many fields was not fired if an attribute is mandatory (courtesy of Christophe Matthieu)
opw: 626974
2015-03-09 16:20:36 +01:00
Christophe Simonis 449f601f8e [MERGE] forward port of branch 8.0 up to 948befb 2015-03-09 12:40:57 +01:00
Christophe Simonis 416f0246ac [MERGE] forward port of branch saas-3 up to 4a3c471 2015-03-09 12:03:22 +01:00
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
Olivier Dony 0d60cdfd68 [FIX] search view: restore the disable_custom_filters flag effect
This search view option was properly set but not
observed by the search view itself.

This caused all related links and smart buttons
to open a list of records that was wrongly filtered,
as soon as a default filter was applicable to the
target action (e.g. with default filters gloablly
set per model, not per action).

This regression was introduced at refactoring
commit d8d6311b50
2015-03-06 13:34:32 +01:00
xmo-odoo d9c9ac72da [FIX] export: decode Field strings before comparisons
Allows exporting fields whose string is a non-ascii *byte*string (rather than unicode).

backport of 7286f4e424 fixing #773 to branch 7.0 by request of @flotho
2015-03-06 13:12:50 +01:00
Aaron Bohy a6919adf70 [FIX] Web: base.sass: FormView: overflow in One2Many fields
Override the "overflow: auto" rule of view-manager-content in One2Many
fields to remove useless scrollbar displayed in One2ManyKanban.
2015-03-06 11:11:31 +01:00
Christophe Simonis 5b6617a5e4 [FIX] base: correct m2o design for active items. 2015-03-05 17:29:00 +01:00
Christophe Simonis bab519fd8a [FIX] web: do design changes in sass file!
8ab68d8 introduced css changes not present in sass file.
2015-03-05 17:26:17 +01:00
Denis Ledoux 3508104c97 [FIX] web: autocomplete dropdown wrong initial position
This issue is related to
http://bugs.jqueryui.com/ticket/8656
http://bugs.jqueryui.com/ticket/8749
https://github.com/jquery/jquery-ui/commit/d693ce5324f6f3be8479ef083e4eaf3c705ef043

When opening a form view, scrolling down,
and opening a many2one dropdown menu,
the dropdown menu wasn't directly under its input.
It could be really problematic when the menu was not even
visible on the current browser page (when you had to scroll down
a lot to access the many2one input).

The issue was resolved as soon as you opened the dropdown
menu a second time, and did not happen if you didn't scrolldown.
But, on initialization, the dropdown menu wasn't at the right position.

Fixes #5603
opw-629601
2015-03-05 17:23:41 +01:00
Denis Ledoux c9a72b79e4 [FIX] web: size of text fields textarea when invisible by default
Text fields, or char fields having widget="text",
were not sized correctly when the field was not
visible by default, ans was set visible thanks
to attrs and other fields values.

opw-629394
2015-03-04 17:56:05 +01:00