Commit Graph
6982 Commits
Author SHA1 Message Date
Christophe Simonis 4b542b0484 [~MERGE] forward port of odoo/enterprise branch saas-10 up to odoo/enterprise@5ca7d8bc31
NOTE: all .po files haven't been forward-ported due to conflicts. Once
.pot updated, the auto-match of transifex should get them back.
2016-05-04 17:10:00 +02:00
Christophe Simonis 0fbc92e0c4 [MERGE] forward port of branch saas-10 up to 1e86774 2016-05-04 17:09:51 +02:00
Christophe Simonis 1e86774207 [MERGE] forward port of branch saas-9 up to 89873cb 2016-05-04 15:42:26 +02:00
Aaron Bohy 7ded5370f1 [REF] mail,web: unique Spinner template in base.xml 2016-05-04 15:06:20 +02:00
Aaron Bohy befbdcb935 [ADD] web: some deferred utils 2016-05-04 15:06:20 +02:00
Géry Debongnie 782a4466fe [IMP] web: better fuzzy search
The goal of this commit is to have better search results when fuzzy
searching.  Before this commit, the position of a match was irrelevant
to the search results.  After, a match in a first position has more
weight than a match in last position.  This is better, because we often
want to find results using the first letters.

This is controversial, but I could not find a better way to do this
without rewriting the whole library myself (which might not be a bad
idea, it is only 50 lines long)
2016-05-04 14:46:46 +02:00
Christophe Simonis 7b12757780 [MERGE] forward port of branch 9.0 up to 4f7d0da 2016-04-28 11:12:06 +02:00
qsm-odoo 324dbcde57 [FIX] web: editable list, up/down navigation on m2o
The current behavior was allowing going on the previous row if the
user is at the start of an editable element and on the next row if the
user is at the end of an editable element. The problem was, we did not
want this behavior when the editable element is a select or m2o (as
the up and down input should open the select/m2o dropdown instead).
2016-04-27 17:01:16 +02:00
Yannick Tivisse b0cfcfaf30 [IMP] web: Shortcuts easier to use (lowercase)
By putting the shortcuts lowercase, it is easier to remember and to user.

Instead of Alt + Shift + letter, we have Alt + letter for Windows and Linus users
Instead of Control + Alt + Shift + letter, we have Control + Alt + letter for mac users

The combinations Alt + d and Alt + e are reserved to the browsers, so other letters are chosen
for these actions
2016-04-27 14:14:54 +02:00
Yannick Tivisse f321466a69 [ADD] web: Library to make fuzzy searches
https://github.com/mattyork/fuzzy
2016-04-27 14:14:54 +02:00
Aaron Bohy 0c261c91e1 [REF] web: base.xml: remove unused template
Also clean the 'UserMenu.about' template (remove unnecessary classnames), and
fix version name.
2016-04-27 11:51:40 +02:00
Aaron Bohy 21462f4141 [FIX] web: view's do_execute_action with multiple input ids
Commit of xmo that has been lost by the unduplication of webclients (6768bbfc).
2016-04-26 16:34:47 +02:00
Christophe Simonis 2dcbdd0778 [MERGE] forward port of branch saas-10 up to bb8f0f1 2016-04-25 15:48:31 +02:00
Christophe Simonis bb8f0f1fc3 [MERGE] forward port of branch saas-9 up to 4d337f7 2016-04-25 14:43:44 +02:00
Aaron Bohy 69cb6088be [FIX] web: form_view: unnecessary jumping Edit button
When opening a record from a list view, the Edit button in the control panel
sometimes bounced. This was because we listened to event 'mouseup', and
astonishingly, the 'mouseup' event of the click in the list view was catched
by the form view.

The reason why we listened to 'mouseup' instead of 'click' is that some
widgets need the event to be propagated to the body. So this fix simply makes
the form view listen to 'click' instead of 'mouseup', but removes the call to
stopPropagation() on the catched event.
2016-04-25 11:29:59 +02:00
Géry Debongnie d65d251c57 [IMP] base, web: add type=fullscreen to ir_actions
With this commit, actions can have a type=fullscreen.  This means that
the navbar will be hidden, for the action and for all subsequent actions
open in the breadcrumb

There is no real security behind this, this is just a feature for
convenience, so users can bookmark an url an open some action in a way
that they are not distracted by anything.  In short, this is some kind of
light 'kiosk' mode.
2016-04-22 11:03:21 +02:00
Aaron Bohy 0e46d35bf6 [FIX] web: hide translate button of invisible fields 2016-04-22 10:27:20 +02:00
Aaron Bohy b0f3146d5e [REM] web: forgotten base.sass/css
base.css is unused since rev. 6768bbfcc0
2016-04-22 08:31:48 +02:00
Olivier Dony ee804e1d32 [MERGE] Forward-port 9.0 up to 74d8cbc190 2016-04-21 18:05:14 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
Géry Debongnie ab8a93c852 [FIX] web: fix dataset to avoid race conditions
The read_slice method in dataset is problematic, because it alters the
dataset ids.  So, if 2 consecutive read_slice are started, but the first
one ends after the second one, we don't have the correct ids in the
dataset.

This commit just make sure that previous read_slice do not alter the ids
of the next read_slice.
2016-04-20 17:20:25 +02:00
fossoult 17d0117edc [FIX] web: expose list view Column widget
The list view Column widget should be exposed, so it can be extended.
This is required to allow the creation of other kind of list widgets.
The _format method is not extendable if we don't add this line.

(comment from ged) The file list_view.js should be split in two, and
reorganized, but this should not be done in 9.0.
2016-04-19 16:14:28 +02:00
Joren Van Onder e18660c330 [FIX] web: fix iOS file downloading
e8a00bc50d moved the get_file function
from web.session to web.ajax. The issue is that get_file uses
session.url() for iOS devices. Also, in order to prevent an infinite
spinner options.complete() is called before actually opening up the new
window. Although this resolves the issue it still requires the user to
configure Safari to allow pop-ups, otherwise they are silently ignored.

opw-672882
2016-04-19 13:26:01 +02:00
Christophe Simonis 73fbadf8ae [MERGE] forward port of branch 9.0 up to 7c04420 2016-04-19 12:58:55 +02:00
Jeremy Kersten 8aee655825 [FIX] web: don't display view metadata for new record
Close #11584
2016-04-15 17:07:29 +02:00
Nicolas Martinelli 3705a868d1 [FIX] web: consistency between list and export
Following commit 8276fb585, the data exported should match the data
displayed on the list view. Therefore, we need to make sure that the
context used match the context of the list view.

When a filter is applied in the list view, the context is evaluated
thanks to pyeval (see the call to `/web/dataset/search_read`). The fix
is to evaluate the context in a similar way.

opw-674473
2016-04-14 10:44:25 +02:00
Olivier Dony ff0fd50cdf [MERGE] Forward-port saas-6 up to 2d4deca055
- Fix for status widget (b25c054c93) moved
  to appropriate file: addons/web/static/src/js/views/form_widgets.js
  even though the problem is less severe in 9.0 (no crash but triggers
  form save, which is unnecessary)

- Fix for website_event_sale ignored (880e951f34)
  because the problem does not exist anymore in 9.0, probably due to
  refactoring 66871ee65b
2016-04-14 10:39:09 +02:00
Olivier Dony 2d4deca055 [MERGE] Forward-port 8.0 up to 46c5f93b6c 2016-04-13 17:04:49 +02:00
Nicolas Lempereur 6b76b08748 [FIX] web: don't freeze on form warning escape
When the warning on form view is closed by cancel or OK button, all is
well. But if the modal is closed by any other way the def will stay pending
blocking next operations.

This commit set the deferred as dejected if not resolved when the modale
is closed.

closes #11688
opw-671371
2016-04-13 16:19:33 +02:00
Christophe Simonis 9b5ba8b238 [MERGE] forward port of branch saas-10 up to 21c7ef8 2016-04-12 12:38:02 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
qsm-odoo b338ae0153 [FIX] web: do not wrap numbers on multiple lines
In languages where the thousands separator is a space, numbers could
be wrapped over multiple lines.
2016-04-11 15:54:50 +02:00
Holger Brunn b25c054c93 [FIX] web: prevent crash in rare case with status field
Current behavior before PR: if you create a new record within a one2many
field and the model's form has a clickable status bar defined, clicking
this status bar will raise an exception because the virtual id
(one2many_v_XXXX) will be passed to the model's write method

Desired behavior after PR is merged: clicking just changes the cached
value
2016-04-11 15:21:45 +02:00
Géry Debongnie f652d384a2 [FIX] web: graph_view now actually supports 'stacked' attribute
For some reason, it was lost.  Probably in the graph view/pivot view split.
This commit simply accepts the attribute, but default to true, so nothing
changes unless you have explicitely set it to false.

Also, fixes en error introduced by a forward port (the use of
openerp.web.format_value)
2016-04-08 15:21:17 +02:00
Cedric Snauwaert 841f208b22 [REF] base_import: simplify import by reducing choice for the columns based on heuristic
automatically try to detect type of columns from the first 10 rows of file:
If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard
If column only contains true/false values, only show boolean fields in wizard
etc

add an advanced mode which is the same as previous import (show all fields)

Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
2016-04-07 09:42:23 +02:00
Géry Debongnie c4e0562144 [FIX] web: editable list view waits for record to be loaded
The editable list view method 'edit' is supposed to wait for the
record to be completely loaded.  But when loading the defaults values,
it ignored the actual loading and completed too early.  This commit
chains the deferred with the form record.
2016-04-06 12:30:30 +02:00
Géry Debongnie dac37163d1 [FIX] web: fieldmany2manytag issue
I recently removed some rpc from init fieldmany2manytag (it was in a
mutex) and moved it to the willStart method (without mutex).  The
fieldmany2many tag widget needs this information before it can be
rendered.  However, in editable list views, the rendering engine does
not wait for the fields to be ready before completing its initialization
process.  As a result, the field many2many tag was rendered before it
was ready, which broke various things, including its position.

This commit attempts to bring sanity to this issue by making sure that
the rendering engine waits for its fields to be ready.  Also, the
editable list view should detect correctly when the form is loaded.

If this commit introduces new issues with the editable list view and
onchanges, I will not be pleased.  You don't want to bring me this sad
news without at least something to buy my good will.
2016-04-06 09:55:06 +02:00
Christophe Simonis 658989868c [MERGE] forward port of branch saas-10 up to aa6ebd1 2016-04-05 20:08:50 +02:00
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +02:00
Christophe Simonis 3e639f4bea [MERGE] forward port of branch 9.0 up to 9e2de9b 2016-04-05 19:06:25 +02:00
Christophe Simonis 9e2de9b1ae [MERGE] forward port of branch saas-6 up to 7f5ca1d 2016-04-05 19:04:36 +02:00
Christophe Simonis 7f5ca1d94a [MERGE] forward port of branch 8.0 up to ceb87b7 2016-04-05 18:59:00 +02:00
Xavier Morel ceb87b78f0 [REV] usage of m2m listview for o2m
Turns out to break way more than it fixes.
2016-04-05 11:32:59 +02:00
Géry Debongnie 3d4954b88f [FIX] web: some float fields silently ignores their changes
We have an interesting problem when editing all custom float fields and all
fields with no explicit digit attributes: the propertiesmixin tries to
check if the number was changed, according to their declared precision.
But for these specific fields, it does not find a digit attribute, and
defaults to 2.  Then, it makes sure that the changes are ignored if the
new value is too close to the old value (with 2 digits precision)

For example, if the user sets the value to 1.234, then save, then change
it to 1.235, then save, the form view will display 1.234 and totally
ignore the change.

Not that handling the digit precision is done in the propertiesmixin and
in the field float widget.  Also, they do different things, and in some
case, may not be the same.   All this logic should be moved to the
fieldfloat widget.
2016-04-04 12:18:17 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Denis Ledoux 69fa2d5662 [MERGE] forward port of branch saas-6 up to 8f1782b 2016-03-30 11:23:18 +02:00