Commit Graph
663 Commits
Author SHA1 Message Date
237b9e8ef5 [REF] note: 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
Christophe Simonis 0e7675847f [MERGE] forward port branch saas-12.1 up to 0f4abc5c22 2019-02-22 16:25:02 +01:00
Christophe Simonis 1d2b6f1bef [MERGE] forward port branch 12.0 up to 84143a34b3 2019-02-21 15:37:19 +01:00
Vandan Shah 7a80ebe35e [IMP] *: Add progress bar on kanban views based on activities
Purpose
=======

If the activities are available on a model (i.e. inherits mail.activity.mixin),
add a progress bar based on the activities if nothing is defined yet.

closes odoo/odoo#24777
2019-02-19 11:01:40 +00:00
XavierDo d3b2da41b7 [FIX] note: display date picker in activity menu
The date picker should be displayed when clicking on the fa-calendar
when creating a note from activity systray.

The test was missing the assertion checking that the date picker was displayed,
but fixing this issue breaks the test. The datepicker looks to be
asynchronously initialized, and the blur event raises an error because of
that. Since it is difficult to test external libs behaviour, this
step is simply removed from the test.

Task: 1942850

closes odoo/odoo#31241
2019-02-19 11:52:23 +00:00
Odoo Translation Bot a463a87189 [I18N] Update translation terms from Transifex 2019-02-17 01:33:04 +01:00
Odoo Translation Bot 1bec017c15 [I18N] Update translation terms from Transifex 2019-02-10 01:32:20 +01:00
Odoo Translation Bot 69dbbea09a [I18N] Update translation terms from Transifex 2019-02-03 01:38:30 +01:00
Odoo Translation Bot fe36bff420 [I18N] Update translation terms from Transifex 2019-01-27 01:37:55 +01:00
Odoo Translation Bot 127fdea764 [I18N] Update translation terms from Transifex 2019-01-21 17:38:09 +01:00
Martin Trigaux 1e224d244c [I18N] export 12.0 source terms
Mostly following changes at 7f8631a913

closes odoo/odoo#30072
2019-01-15 15:15:34 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Martin Trigaux bfe1e20d6b [I18N] export saas-12.1 source terms
To reflect fixes at ec2263080a and cd4080839f

closes odoo/odoo#30253
2019-01-16 10:35:49 +00:00
Odoo Translation Bot 91382f691d [I18N] Update translation terms from Transifex 2018-12-30 01:30:16 +01:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Odoo Translation Bot b234af04c1 [I18N] Update translation terms from Transifex 2018-12-24 12:51:19 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
Odoo Translation Bot 3ce5c8bebd [I18N] Update translation terms from Transifex 2018-12-16 01:18:51 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Odoo Translation Bot c487d2c26c [I18N] Update translation terms from Transifex 2018-11-21 09:40:22 +01:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01: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
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
jem-odoo d2b3c9a04b [IMP] mail: upload a file to mark activity as done
This commit introduces the "upload file" activity type
category. For an activity of that time, uploading a file
will mark the activity as done (and maybe create the forced
next activities).
This activity type is seen as a shortcut to upload a file
with a reminder.

Task-1915004

closes odoo/odoo#29861
2019-01-17 13:47:27 +00:00
Christophe MatthieuandAntoine Guenet f296992317 [IMP] web_editor,*: Refactoring the wysiwyg editor and 'html' field
* Creating a new structure by transforming all the plugins in the
  library using the odoo inheritance system. Plugins are easier to
  implement with the AbstractPlugin to add Odoo behaviors.

* From now on, the methods of the library (in this case Summernote) can
  no longer be called by other modules or files. Only the wysiwyg
  widgets can access it, to simplify the updating process. The wysiwyg
  object serves as an interface.

* Depending on the options the snippets will be loaded or not, the
  editor will be in an iframe or not... all of this is transparent from
  the outside.

* Regarding iframes, all controllers related to editing have been
  removed: the new API no longer needs them. This speeds up loading,
  eases testing and removes complexity for the same
  features.

PUBLIC FEATURES

There are several public methods on the Wysiwyg class:
* Wysiwyg.prepare (WidgetParent): returns a deferred resolved when the
  library (xml, lazy, assets...) is loaded.
* Wysiwyg.getRange (DOM): returns the range (selection in the dom)
* Wysiwyg.setRange (startNode, startOffset, endNode, endOffset): creates
  a range (selection in the dom)
* Wysiwyg.setRangeFromNode (DOM, options) that creates a range from an
  element (option available to select all, start or end)

A jQuery selector was added: :o_editable, which indicates whether the
current element is editable. That is, if it is contained in a tag with
the attribute 'contentEditable = "true"' or in a tag with the class
o_editable.
Several methods are also present:
* focusIn: makes a focus and places the cursor at the beginning of the
  element
* focusInEnd: makes a focus and places the cursor at the end of the
  element
* selectContent: makes a focus and selects the content

HTML FIELD

The HTML field can receive different options:
* style-inline: {boolean} transforms a class into an inline style when
  saving and vice versa when reading.
* no-attachment: {boolean} prevents the use of attachments (in media
  dialog)
* cssEdit: {xml_id} to use a template containing the css to loaded in
  an iframe when editing
* cssReadonly: {xml_id} to use a template containing the css to load
  into an iframe when viewing in readonly
* snippets: {xml_id} snippets template (can be used with or without
  cssEdit)
* wrapper: {template} qweb static template (containing a tag:
  id = "wrapper") that will include the content during editing (removed
  on save)

MASS MAILING

A widget was created for mass mailing. There are now two fields:
body_html and body_arch.
body_arch contains the code with the class without conversion into
inline style, useful when editing and one with the inline style that is
visible in readonly mode and sent by email.
Advantage: no spreading errors, able to update css/theme, able to do
more changes when converting to inline style so that a maximum of mail
clients have an impeccable rendering.

Co-authored-by: Antoine Guenet <age@odoo.com>
2019-01-17 08:40:21 +00:00
Christophe Simonis 99d0e1b80e [MERGE] forward port branch 12.0 up to a403155dec 2018-11-12 13:06:48 +01:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Christophe Simonis b106b7ce0b [MERGE] forward port branch 12.0 up to dd70c68426 2018-11-06 16:40:07 +01:00
Odoo Translation Bot 790bd62f14 [I18N] Update translation terms from Transifex 2018-11-04 01:27:12 +01:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Christophe Simonis 9dbb7d199c [MERGE] forward port branch 12.0 up to b81c2bce84 2018-10-22 17:57:08 +02:00
Xavier Morel de86da2417 [FIX] *: remove id from various function tags 2018-10-11 15:01:04 +00:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Thibault Delavallée 0c452d51ad [IMP] note: add activity view on main actions
Purpose is to extend the use of the newly-introduced activity view allowing
to see at a glance activities to perform on a given model. It eases daily
job of people working with activities.

Updated :

  * note main menu action

This commit is linked to task ID 1889413.
2018-10-02 17:09:23 +02:00
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Xavier Morel e1837721a8 [FIX] *: reassociate various demo data to admin instead of root 2018-09-24 15:55:06 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Alexandre Kühn e962f2bb77 [FIX] mail: add new note without date from activity menu
Before this commit, it was not possible to add a note
from the activity menu when no datetime has been selected
from the datepicker.

This is due to the server-side code that requires a deadline
date to be set, otherwise no note is created. Even though
the placeholder of the datetime tells 'Today', no datetime
was provided to the server, thus the problem mentionned above.

This commit fixes the issue by ensuring that a deadline date
is always provided to the server from the `/note/new` route.
In particular, if no datetime has been selected, it still
displays 'Today' and sets the current datetime before the
RPC.

Task-ID 1875668
2018-09-20 17:19:02 +02:00
Odoo Translation Bot 53908da50c [I18N] Update translation terms from Transifex 2018-09-18 18:08:33 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00