Commit Graph
197 Commits
Author SHA1 Message Date
Swapnesh Shah b07f2d31d2 [FIX] *: update document links
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#60228

X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-19 07:03:01 +00:00
Hardik Prajapati dbe6b1b30d [FIX] base_import: remove uppercase under Favorites
this commit removes unnecessary uppercase used under the favorites menu

task - 2325684

closes odoo/odoo#57319

X-original-commit: 1d54564d280d23b506e3764294318a359c0ad681
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-09 07:30:47 +00:00
Julien MougenotandMathieu Duckerts-Antoine bb3bc7c9e4 [IMP] *: adapt modules to Owl search panel
Adaptation of the rest of the environment to the changes regarding the
refactored search panel and model.

This commit includes the following changes:

- Since the control panel model is now part of the search model, the
view widget is responsible of its instantiation with the appropriate
API; creating an ActionModel holding the required model extensions.

- The controller is now importing/exporting the state of the entire
search model as well as the current state of the search panel (given
throught its props). Changes have been made to adapt to this behaviour.

- The multiple components linked to the control panel model have been
adapted to reflect the changes brought to it (they will now listen to
the "searchModel" instead of the "controlPanelModel").

- The `test_utils_create` methods have also been adapted to properly
instantiate a searchModel

Part of task 2228968

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-23 08:21:10 +00:00
jvm-odoo 5a60dbccd4 [FIX] base_import: fix re-importing same file
Issue

	Chrome

	- Sales > Product
	- Select a file
	- Change something in the file
	- Re-select it

	Nothing changed

Cause

	Chrome doesn't trigger change on
	input if the file is the same

Solution

	Clear the input value after the
	parse_preview so we can load a new
	file even if the preview failed.

OPW-2288191

closes odoo/odoo#54175

X-original-commit: f7d2bdf65901e3ee78e1055cab7cf8d60f798621
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-07-07 09:40:11 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Julien Castiaux 22db891888 [FIX] base_import: ensure reloaded file is valid
The *Reload File* import functionality stands on an undefined behavior
or the HTML File API. The API is not clear about what should done in
case the underlying file change on the filesystem after it has been
imported in the browser.

It turns out the actual behavior vary among browsers and even among
OSes. The *Reload File* button only works as intended when importing
files via Chrome on Linux.

In other cases, the browser may refuse to send the file or may send it
in a corrupted HTTP request. Such malformed request is rejected in the
best cases by the backend web application but there is chance it hangs.

Security-wise, this problem is not much likely to happen as it requires
an authenticated user with importation privileges to perform the
operation. When it comes to the severity, it is possible to exhaust the
available workers by forcing every one of them to hang.

As there is a security impact, we decided to disable the *Reload File*
functionality.

Steps to reproduce
------------------

1) Import a CSV or XLSX document in any model.
2) Wait for the data visualization to come back to the browser.
3) Change the file on disk to
  a) remove a few lines
  b) add a few more lines.
4) Click the Reload button.

Wrong `size` attribute on Firefox.
----------------------------------

Impact: Firefox

The advertised `Content-Length` HTTP header in the POST request is
a) *greater* than the actual body length. The backend web application
   hangs on a `socket.recv` like function waiting for those missing
   bytes.
b) *smaller* than the actual body length. The request is truncated
   and futher processing is impossible.

The malformed request should have been detected and reported by the http
web application as requested by the HTTP/1.1 spec [1]:

> When a Content-Length is given in a message where a message-body is
  allowed, its field value MUST exactly match the number of OCTETs in
  the message-body. HTTP/1.1 user agents MUST notify the user when an
  invalid length is received and detected.

Mitigating the issue is possible using nginx as reverse-proxy. The
connection is closed after one minute if data are missing.

Invalid `ERR_UPLOAD_FILE_CHANGED`
---------------------------------

Impact: Chrome on Windows

Chrome prevent sending the XHR due to a `ERR_UPLOAD_FILE_CHANGED` error,
this error should only happens when the underlying file content have
been changed the second before the request. On Windows, the error
is triggered as soon as the file have been changed, not considering the
modification time.

[1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html Section 4.4

opw-2252440

closes odoo/odoo#52276

X-original-commit: 30be09cdb7d5b80fb1e0221f58024586bd72ac61
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-06-02 15:24:14 +00:00
470fa48686 [IMP] base_import,*: move Import button to Favorite menu
*account,crm_iap_lead,hr_expense

Part of task 2234547

Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 14:31:11 +00:00
Sapan Zaveri 4946739c17 [IMP] base_import: improve preview table UI
Task 1919628

closes odoo/odoo#30430

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-16 13:38:02 +00:00
Julien Castiaux 3460b3ca15 [IMP] base_import: support multiple xlsx sheets
Excel can store data in multiple tables, each is called a sheet. Odoo
was only importing the first sheet making the process to import a file
containing multiple sheets cumbersome.

It is now possible to select the sheet in the import options. By default
the first sheet is selected.

closes odoo/odoo#40728

Task: 2043768
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-26 09:26:01 +00:00
mreficent 41c434cd5d [FIX] v13 urls
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-03 12:48:09 +00:00
Xavier Morel f58368210c [ADD] base_import: batching (& some other features)
various UI changes
------------------

* renamed "test import" button to "test"
* move relation fields thing to debug mode
* remove "Defer parent/child computation" option as it was deprecated
  / removed from the backend in
  80f1ac3599, turns out this checkbox
  existed inactive for longer than it's been of any use (added in
  68cb2ade09 on 2017-11-29, made
  non-operating on 2018-01-24, that's so sad)

batching
--------

* add support for batching imports (skip & limit parameters)
* modify client to use batched imports & properly adapt responses so
  it still looks like a single import for the client (more or less)
  e.g. update row numbers in error messages, etc...
* properly handle partial imports though
* disable usual loading throbber to have a single progress
  notification displayed continuously throughout all the batches: the
  normal throbber only shows after 3s of waiting for an RPC response,
  so it would keep flashing in and out (appear 3s into a batch's
  import then disappear at the end only to reappear 3s into the next
  batch's loading)

NOTE: the limit is row-wise. If a record straddles the limit (because
of nested O2M records), the record is imported in full and the "next
row" is whatever row follows the record. This means a limit of 10 can
lead to an import of 17 lines, and as the progress indicator is in
records# the increments can jump around.

Task 2059448
2019-09-13 09:45:29 +00:00
Aaron Bohy 9a4123995f [FIX] base_import: layout issues
This rev. makes the 'Formatting Options' area responsive.

Closes #34257

Task 2007558

closes odoo/odoo#36159

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-28 07:35:50 +00:00
jbm-odoo e1e63d018e [FIX] import: Avoid empty error message 2019-08-23 08:43:12 +00:00
Yannick Tivisse 58b3557d6d [IMP] base_import: Improve import general UX (back2basics)
Purpose
=======

Improve error management UX on import.

TaskID: 2049992

closes odoo/odoo#35804

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-20 12:23:08 +00:00
Yannick Tivisse 14067543d0 [IMP] uom: Remove parentheses on uom names
Purpose
=======

Parentheses in the label of units of measure sometimes make
reading needlessly uncomfortable.

Specification
=============

Remove parentheses in the name of every standard uom.uom and hardcoded
occurence on views/field names.

TaskID: 2030444

closes odoo/odoo#34492

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 12:57:34 +00:00
Romain Derie 72f7139f52 [IMP] *: use new helper config.isDebug()
Before this commit, both config and session were aliases to odoo.debug.
Now, config.isDebug() should be call, with possibility to pass a parameter to
check if we are in a specific debug mode such as 'tests' or 'assets'.

task-1934445
Coming with https://github.com/odoo/enterprise/pull/4281
Closes https://github.com/odoo/odoo/pull/33213
2019-06-05 05:56:33 +00:00
Aaron Bohy 55676110c8 [IMP] web: list: import attrs
The 'import' attrs is valid according to the rng definition of the
list view. It is used in a few views in Odoo. However, it didn't
actually work (in most cases, it worked by chance because it is
set to "0" in addition to create="0", and create="0" already
disables the import feature).

With this ref, the 'import' attrs is taken into account and we
can now disable the import feature even if the create one is
enabled. Moreover, it is now documented.
2019-04-02 11:55:57 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00
Christophe Simonis 71faa19af0 [MERGE] forward port branch saas-12.1 up to 2b3296bbf8 2019-03-11 14:42:34 +01:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
8b603cfdb6 [REF] base_import: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Baptiste Vergote f3f8430600 [FIX] base: use correct state name in res.partner import template
State from the template was 'CA' for California - not recognized on import
Changed it to 'California' to match with the db data

opw 1943904

closes odoo/odoo#31556

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-03-07 13:54:17 +00:00
Martin Geubelle 31664422c1 [IMP] web, *: remove explicit references to session_id
Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script. But before this rev. the
`session_id` was still provided by the server to the webclient (in session_info,
mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.

As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.
2019-02-13 09:38:30 +00:00
Géry Debongnie 6c1445b24e [FIX] base_import: adapt import client action
With the recent control panel refactoring, abstract actions had to be
adapted.  The base import action is actually quite
complicated, it relies on introspection and is fragile.  With this
commit, I attempt to make it work again.  The main issue is that now,
the root of the abstractaction is a div, which contains the root of the
content template, so most of the code was assuming that the $el of the
import action was the form tag, and not a parent.

Note that there are no meaningful tests for import actions, because
testing iframes are tricky.

closes odoo/odoo#29421
2018-12-11 13:06:09 +00:00
b1ef0001f6 [REF] *: adapt all client actions
to ControlPanel/Search view refactoring.

The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:07 +00:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Adrien Dieudonne 497dfb6917 [MOV] web, base_import: mobile tests should be in mobile suite
This fix some inconsistent error on runbot.

In mobile, some views* depend on 'jquery.touchSwipe' library which
is lazy loaded. As a result, the views become asynchronous...
It's why this library is already loaded before running tests in the
mobile test suite. So we can continue to use synchronous views whether
in mobile tests or not.

But some mobile tests weren't in mobile suite...
In desktop, 'jquery.touchSwipe' is lazy loaded and the first test will
load it for others. It's why the first one has to be asynchronous:
https://github.com/odoo/odoo/commit/da7b59045d246c159f93bc75e3f19c6b1221d31c

The inconsistency comes from the fact that all tests are sequential but
we can't garantee the execution order. So, if the test mentionned is not
the first executed one, an error will occur because the view is not
asynchronous.

Now, all mobile tests are moved in mobile suite to be sure that
'jquery.touchSwipe' is loaded.

We also set the default value for size_class because we want a
coherent environment. It is very rare to find mobile devices with
more than 474px wide.

*: form_view, kanban_view, res_config_settings

closes odoo/odoo#28195
2018-10-29 10:25:05 +00:00
mreficent dddd4072de [FIX] v12 urls
Was still pointing to old links

closes odoo/odoo#27443
2018-10-09 13:44:38 +00:00
Xavier Morel 376361c15c [FIX] base_import: show error message in some situation where it was missing
On an AccessError, the relevant message is passed as the first arg. But
the import error handler would only check for the second arg (if any)
then fallback on error.message, which is missing entirely when the issue
is raised as an except_orm subclass.
2018-10-03 16:54:25 +02:00
JPR 6da3dafe94 [FIX] base_import: 'Create if does not exist' option 2018-09-03 15:20:39 +02:00
David Monjoie 4bed2445f6 [FIX] base_import: fix formatting options structure
It used to work by chance with Bootstrap 3, but since we are now
using Bootstrap 4, the fake good appearance collapsed, revealing
the awful structure it used to have.
2018-08-16 11:19:25 +02:00
Mohammed Shekha 8fbadb9575 [ADD] base_import: debug option to create M2O/M2M records
Adds a checkbox to import columns (in debug mode) allowing a user to
create records M2O and M2M records not found (via name_search).

Task ID: 1850633

* uses a context key to avoid altering basically all the import callstack
* attempted to lift the creation in the `_str_to_*` functions and create
  m2m via commands, but that doesn't really work out
2018-08-16 11:10:35 +02:00
Xavier Morel 3de97f1689 [IMP] base_import: error message on transport/HTTP failure
Attempt to clarify/improve error message (and avoid traceback) when
import fails due to some intermediate system e.g. memory error or
gateway timeout.

Task 38254

Closes #20627

This change is loosely related to
35d452cffb and PR #24854 in the sense
that that was an attempt to better handle transport/gateway issues
during file download.
2018-08-13 13:52:41 +02:00
Xavier Morel cb6ad25e2b [FIX] base_import: import options layout
Broke during bootstrap 4 migration.
2018-08-09 11:13:48 +02:00
Xavier Morel be96188f2f [IMP] base_import: date-parsing patterns
* expand auto-detected date and time patterns (e.g. %b, %I, ...)
* try to make date-pattern-detection clearer
* add a select2 dropdown for date patterns (with a bunch of
  preselected patterns) rather than just an input
* also try to improve other column-matching bits (e.g. less reliance
  on exceptions, attempts to avoid redundant work)
2018-08-09 10:58:52 +02:00
Xavier Morel 36ee8a78ec [IMP] base_import: attempt to automatically guess the separator
It would probably be even better to iterate the file content and get
the non-quoted non-alphanumeric characters as separator
candidates (instead of a hard-coded list) however Python does not seem
to have a decoding iterator (taking bytes and yielding an iterator of
codepoints or even grapheme clusters) — incidentally uniseg seems to
require up-front decoding as well — so that's not really convenient as
we may be dealing with large-ish files and not want to load it
entirely in memory.

An alternative would be to use TextIOWrapper and iterate the file by
buffers of a few ks, and classify that based on either codepoints or
grapheme clusters.
2018-08-07 16:46:29 +02:00
Xavier Morel 5aba5ac99e [IMP] base_import: reintroduce encoding selector & override guess
* if an encoding is explicitly specified, use it and don't guess
* otherwise guess and return the guessed encoding so it can be
  displayed in the configuration UI
* fix less-than-stellar configuration & behaviour of select2 inputs
  to properly reflect underlying values as they get modified, to
  correctly handle future configuration guesses
2018-08-07 13:07:05 +02:00
Xavier Morel c9558e16de [FIX] base_import: avoid using the same color for background and font
That turns out to make the text completely invisible, which is not very
convenient for warning and error messages which we may want the user
to read.
2018-08-06 12:50:46 +02:00
Xavier Morel 3e0b89772a [IMP] base_import: swap load and reload buttons
Task 1870663
2018-08-06 12:03:52 +02:00
qsm-odoo 8ba0bbb092 [FIX] base_import: BS4, visible error text on import fail
In BS3, the combination "text-danger" and "bg-danger" worked as the red
color for texts was not the same as the red color for backgrounds. With
BS4, they are the same so it does not make sense.

Fortunately, we introduced a mixin customization which automatically
selects the correct color according to the background. So removing the
"text-danger" part is enough to make sure the text will be visible over
"bg-danger" background.
2018-08-02 09:55:20 +02:00
qsm-odoo ed1b18f103 [REF] *: BS4, adapt col-related classes
col-lg-* -> col-xl-*
col-md-* -> col-lg-*
col-sm-* -> col-md-*
col-xs-* -> col-*

col-lg-offset-* -> offset-xl-*
col-md-offset-* -> offset-lg-*
col-sm-offset-* -> offset-md-*
col-xs-offset-* -> offset-*

col-lg-pull-* -> order-xl-1
col-md-pull-* -> order-lg-1
col-sm-pull-* -> order-md-1
col-xs-pull-* -> order-1

col-lg-push-* -> order-xl-2
col-md-push-* -> order-lg-2
col-sm-push-* -> order-md-2
col-xs-push-* -> order-2
2018-07-27 12:36:54 +02:00
qsm-odoo cba48da727 [REF] *: BS4, rename border-radius related variables
$border-radius-base -> $border-radius
$border-radius-large -> $border-radius-lg
$border-radius-small -> $border-radius-sm
2018-07-27 12:36:54 +02:00
qsm-odoo 4ac446e328 [REF] *: BS4, adapt font-size and padding variables
BS variables were renamed or changed and all (most) variables now
use 'rem' units instead of 'px' unit.
2018-07-27 12:36:54 +02:00
qsm-odoo c59380bac5 [REF] *: BS4, rename btn-default to btn-secondary
BS4 "btn-default" class was replaced with "btn-secondary", which makes
more sense.
2018-07-27 12:36:54 +02:00
qsm-odoo 81f359c81c [REF] *: BS4, remove the use of btn-sm
Odoo made the bad choice of using the 'btn-sm' class for every button
instead of configuring the padding for default 'btn' to be smaller.
In BS4, the style of btn-sm is actually more complex, lowering the
font-size too. Also, btn-xs was removed so we would not have the
possibility to display smaller button than our default ones.

This commit removes btn-sm wherever it was used. Unfortunately, this
might remove it at some places where it made sense but this can be
restored in a second time.
2018-07-27 12:36:54 +02:00
qsm-odoo 7f10b55a50 [REF] *: BS4, adapt display classes
The system completely changed. I also had to adapt classes to new
screen breakpoints.

hidden/hide -> d-none
show -> d-block
hidden-xs -> d-none d-md-(block/inline/...)
hidden-sm -> d-md-none d-lg-(block/inline/...)
hidden-md -> d-lg-none d-xl-(block/inline/...)
hidden-lg -> d-xl-none
visible-xs-* -> d-* d-md-none
visible-sm-* -> d-none d-md-* d-lg-none
visible-md-* -> d-none d-lg-* d-xl-none
visible-lg-* -> d-none d-xl-*
hidden-print -> d-print-none
visible-print-* -> d-none d-print-*
...
and all possible combination of those had to be handled too.
2018-07-27 12:36:54 +02:00
qsm-odoo 0ca6d39777 [REF] *: BS4, adapt media queries
media queries that target a specific screen size handled by bootstrap
have now a more convenient way to be defined:

```
@​media (min-width: $screen-sm-min) { ... }
->
@​include media-breakpoint-up(sm) { ... }
```

```
@​media (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-down(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-only(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-md-max) { ... }
->
@​include media-breakpoint-between(sm, md) { ... }
```

Also, bootstrap has changed the values for its default screen sizes:

------------------
     | BS3 | BS4 |
------------------
0    | XS  | XS  | -> Portrait Mobile
576  | /   | SM  | -> Landscape Mobile
768  | SM  | MD  | -> Portrait Tablet
992  | MD  | LG  | -> Landscape Tablet / Small Desktop
1200 | LG  | XL  | -> Desktop
------------------

While it is possible to configure BS variables to behave as BS3, we took
the decision to keep the BS4 variables untouched. BS4 system seems
indeed better and having the purest bootstrap possible is better for
Odoo to be used as a framework.
2018-07-27 12:36:54 +02:00
Hiral Bhavsar da7b59045d [IMP] base_import, web: add view switcher and h 'Import' button in mobile
As there are a few chance that someone will import something on a mobile view.
So, we hide the button 'Import' in a mobile view.

For mobile view, we added a view switcher button and it'll display a list of
views buttons. Also set active view's icon as its icon.

Related to Task: 1857696
Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-07-25 12:48:38 +02:00
Jigar Patel b60de0db41 [IMP] import/export UIs
Task 40692

Various changes to import/export (mainly) UIs:

* default to excel & "full" (non-import-compatible) export
* auto-detect encoding of CSV using chardet
* remember column -> field mapping after having imported a file (useful
   for repeated imports where auto-matching failed)
* better handle localised booleans & column names
* automatically select source list view's fields when exporting
* better integrate import templates feature and add a number of templates
2018-07-17 15:19:05 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00