Commit Graph
714 Commits
Author SHA1 Message Date
Christophe Simonis 6f3eada2c3 [MERGE] forward port branch saas-15 up to f687a27b79 2017-06-06 19:23:03 +02:00
Christophe Simonis f687a27b79 [MERGE] forward port branch saas-14 up to c0e7f9b0b1 2017-06-06 18:57:56 +02:00
Odoo Translation Bot 9ca236685d [I18N] Update translation terms from Transifex 2017-06-04 07:07:18 +02:00
Olivier Dony de38d0262b [MERGE] Forward-port 10.0 up to 76cd8d2558 2017-06-03 01:24:21 +02:00
Kishan Gajjar 79477b8d96 [FIX] web_editor: hide customize menu when there are no options 2017-06-01 17:08:49 +02:00
Dharmraj Jhala dbdbfa7432 [FIX] website: properly rebind background events
In carousel snippet, the target element for background snippet option is
being changed manually. So for the new target, we have to rebind the
associated events that were bound in `start` function of the snippet
option. For that, some code is extracted from the `start` function and
is used to rebind necessary events for new targets.

In particular, this was preventing the carousel slides' backgrounds to
be automatically removed when a background-color was selected.
2017-06-01 17:08:49 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Géry Debongnie cad943d035 [FIX] web_editor: prevent crash with FieldTextHtmlSimple
If the method commitChange from the widget FieldTextHtmlSimple was
called in mode=readonly, a traceback was displayed.  This is not very
common, because most save operations are done in mode=edit, but it can
happen in readonly mode: when the user clicks on an action button, then
the form view is saved, if necessary.

To reproduce this bug, just open a form view for res.users, and click on
the Change Password button.
2017-05-29 12:12:44 +02:00
Odoo Translation Bot bcf302cf48 [I18N] Update translation terms from Transifex 2017-05-28 04:29:29 +02:00
Adrien Dieudonne a1e1b0b933 [FIX] web_editor: allow html widget for html fields
Before this commit, it was not possible to set the 'html' widget
for a field in Studio.

Even if this is the default widget for the form view, it not the
case for the kanban view. You need to precise each widget you
want to use (for performance reasons).

opw-744254
2017-05-24 08:23:05 +02:00
qsm-odoo 5331a87f81 [FIX] web_editor: properly match snippet options' DOM
The snippet options are attached to `closest`, `all` and `is` functions
to be able to find/check DOM they are associated to. Their behavior
depend on the snippet option type: the search in the DOM is either done
in the body, the editable parts, the editable children only, ....

The problem is that when searching from a given DOM element, jQuery
won't match the elements whose selector contains this given DOM element.
Or in code terms, jQuery find function behavior is:
`$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`)

This was indeed a problem on the job position apply form pages where the
main editable element is the <form/> element itself. Indeed, the snippet
options' selectors which began by 'form' were not able to match. Worse,
the selector is used for a jQuery search for drag & drop and saving but
not for initialization (where it is used as a `is` check on clicked
elements). So, some DOM were able to be modified by options but not
properly (re)configured before saving.

opw-705902
opw-741305
2017-05-23 17:07:32 +02:00
Nicolas Lempereur 57f7c68106 [FIX] web_editor: inline space in source code
The prettifying of html when editing sources (user need to be in debug
mode to see the button) was removing too much spaces in some instances.

For example if someone got in a case such as:

  <span>hello<b> cruel </b>world!</span>

The spaces between text and tag would be removed (this would work fine
with the space outside of the tag).

This code add a special case so this doesn't happen anymore.

opw-743565
closes #17142
2017-05-22 11:06:50 +02:00
Odoo Translation Bot c0d9ddb4d4 [I18N] Update translation terms from Transifex 2017-05-21 07:11:01 +02:00
Odoo Translation Bot 7eda91ce58 [I18N] Update translation terms from Transifex 2017-05-21 04:33:07 +02:00
Aaron Bohy a845ecffa1 [FIX] web_editor: field html: save changes done in code mode
Summernote doesn't call the onChange callback when changes are
done in the code mode, so the html field isn't aware of those
changes. It means that if the user does some changes in code mode
and then save directly (without coming back to normal mode), those
changes are lost.

This rev. ensures to save every changes by manually come back to
the normal mode before saving, as this will correctly trigger the
changes. Actually, it simply restores some code of the previous
implementation (before new views) of this widget.
2017-05-19 15:51:57 +02:00
qsm-odoo a83f812357 [FIX] mass_mailing, web_editor: increase mail clients compatibility
Following bee3253b44, this commit is made
to increase the mail clients compatibility for the mails that are
created with the odoo mail editor.

Three new problems are handled:

- Font family of titles had to be forced too as outlook was not
  inheriting parent font family on those either.

- Default text font-size had to be forced as was not detected in
  transcoding correctly.

- text-decoration rule was decomposed in text-decoration(-line,
  -style and -color) in transcoding. Outlook is ignoring those
  three rules for some reason. As the decomposition is useless,
  the transcoder now forces the recomposition of these three rules.
2017-05-17 11:29:24 +02:00
Olivier Dony 61c2b8efd5 [MERGE] Forward-port of saas-14 up to 9b3ca1af23 2017-05-16 12:47:44 +02:00
Olivier Dony 9b3ca1af23 [MERGE] Forward-port 10.0 up to 1545995b39 2017-05-16 12:12:30 +02:00
Olivier Dony ab8c81a96f [MERGE] Forward-port saas-11 up to 0570033ae7 2017-05-16 10:30:23 +02:00
Olivier Dony 0570033ae7 [MERGE] Forward-port 9.0 up to 2c4512c263 2017-05-16 10:06:36 +02:00
Nicolas Lempereur 89e644000a [FIX] web_editor: don't resize iframe in content
In 4e0e376b0 an iframe for the readonly preview was added when
displaying html fields.

In e5112ee00 this iframe was only used if style-inline was set in the
widget options.

This brought an incompatibility if the not iframed preview contained an
iframe (eg. a youtube video which is then resize to a 30px height) which
is solved by this commit.

opw-725161
closes #16955
2017-05-12 16:21:14 +02:00
Martin Geubelle 136a119311 [FIX] web_editor: use new rpc system
Directly use `ajax.jsonRPC` makes it untestable as the RPCs can't
be mocked.
2017-05-09 15:19:00 +02:00
qsm-odoo ac490b1b3e [FIX] web: better factorize debounced/input fields code
`DebouncedField` and `InputField` classes were not properly factorized,
some of the DebouncedField code had to be part of the `InputField`
class (which is a specialization of `DebouncedField`). Indeed the
`FieldText` class, specialization of `DebouncedField` class, was missing
properties which were part of `InputField` and was duplicating code
which was already defined in `InputField`.

For example, it was not possible to navigate out of text fields in
editable list views with the right/left keys as this was part of the
`InputField` class.

Note: the FieldTextHtmlSimple class was implementing the `commitChanges`
function differently than `DebouncedField` but this was in fact not
necessary. This is why documentation update has also been done for this
by this commit.
2017-05-05 15:58:43 +02:00
Christophe Matthieu 5dd23f7de2 [FIX] web_editor: prevent crash when publishing a payment in edit mode
When updateStyleInfo is called, the options is not necessarily on
editable area (eg: when update the toolbar for image)
2017-05-04 17:19:25 +02:00
qsm-odoo 250e716c3a [REF] web, *: restore views design
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).

This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
  in x_layout.less and x.less was a mistake. Many rules can be
  considered to be layout and not layout at the same time, developers
  always have to switch from one file part to the other, many CSS
  selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
  fields.less file. As before, the fields_extra.less will contain the
  rules specific to community so that the enterprise repo can override
  those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
  many classes can now be applied outside of form view. These classes
  should not be used in templates anyway.

The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).

Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.

The editable list view should also completely stop flickering on chrome
and firefox.

The commit also removes the orange outline on list view dirty cells.

The commit also removes deprecated static xml, LESS and other code.

Notice there are still styles to restore/fix and LESS to improve.
2017-05-04 12:07:30 +02:00
Odoo Translation Bot eb19319585 [I18N] Update translation terms from Transifex 2017-04-30 07:12:44 +02:00
Odoo Translation Bot e0ff2840a5 [I18N] Update translation terms from Transifex 2017-04-30 04:31:05 +02:00
Odoo Translation Bot 32ea5ad690 [I18N] Update translation terms from Transifex 2017-04-30 00:29:03 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
xmo-odoo 2e6a589f41 [FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)

issue 8530
2017-04-27 13:59:33 +02:00
Odoo Translation Bot 7350a50a2e [I18N] Update translation terms from Transifex 2017-04-23 07:13:47 +02:00
Odoo Translation Bot 07c563e075 [I18N] Update translation terms from Transifex 2017-04-23 04:30:51 +02:00
Odoo Translation Bot 91c00bc011 [I18N] Update translation terms from Transifex 2017-04-23 00:31:08 +02:00
Christophe Simonis 39ab200cd3 [MERGE] forward port branch saas-15 up to 780064ea89 2017-04-18 18:37:24 +02:00
Martin Trigaux 780064ea89 [I18N] export saas-15 source terms 2017-04-18 18:16:42 +02:00
Odoo Translation Bot 28db302a10 [I18N] Update translation terms from Transifex 2017-04-16 07:12:56 +02:00
Odoo Translation Bot c043db5e3b [I18N] Update translation terms from Transifex 2017-04-16 04:29:59 +02:00
Odoo Translation Bot 2c75ad396f [I18N] Update translation terms from Transifex 2017-04-16 00:30:18 +02:00
Christophe Simonis e92ae40d71 [MERGE] forward port branch saas-15 up to b0992d082d 2017-04-14 13:32:15 +02:00
Christophe Simonis b0992d082d [MERGE] forward port branch saas-14 up to 8f30e707e5 2017-04-13 15:31:27 +02:00
Aaron Bohy ec988d4121 [FIX] web(_editor): field widget html
The field widget html wasn't implemented yet in the new views. A
very basic implementation was done in addon web. It only handled
the readonly mode so that the field were displayed in studio.

This commit removes this basic implementation from web, and re-
introduced the old one, converted, in addon web_editor.
2017-04-13 14:31:24 +02:00
Christophe Simonis 13ad16104a [MERGE] forward port branch 10.0 up to 00e169c05a 2017-04-13 13:22:27 +02:00
Christophe Simonis 9e159ef204 [MERGE] forward port branch saas-11 up to f830c7c3e3 2017-04-12 18:51:16 +02:00
Aaron Bohy 2d2e9c93c3 [FIX] web_editor: various fixes and new tests
- use 'nodeOptions' instead of 'options' in FieldTextHTML as
  'options' doesn't exist, it has been renamed into nodeOptions
  in AbstractField.
- mock iframe route in test to prevent the test framework from
  displaying an error (unimplemented route), and so the test from
  being red.
- test that the url given in the node options is correctly used.
- remove useless and broken code introduced by last rebase.
2017-04-11 19:44:38 +02:00
Géry Debongnie e574027056 [REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Xavier Morel 3979f6802e [#8530] convert exception handlers to except..as syntax
Futurize fixers:
* lib2to3.fixes.fix_except
2017-04-11 14:53:29 +02:00
Odoo Translation Bot 69b45530dc [I18N] Update translation terms from Transifex 2017-04-11 10:37:54 +02:00