Commit Graph
12 Commits
Author SHA1 Message Date
Martin Geubelle c13c9e0b5c [FIX] web: invalid domain in DomainSelector
A domain could contain the key `parent` (in an embedded subview), like:

    domain="[('display_name', '=', parent.display_name)]")

This is currently not handled by the DomainSelector.

This will probably be handled in a future version but for this stable version,
this case that triggered an error is now catched and an error message is
displayed in the widget.

This was causing a traceback when opening a domain with `parent` in the edition
of a subview with Studio.
2017-11-08 17:19:28 +01:00
Martin Geubelle 3e63f01cf1 [FIX] web: FieldSelector: add model in field attributes
The key `model` was missing in the FieldSelector selected fields.
The model can be useful for example to create a one2many related field.
2017-11-02 16:02:11 +01:00
Martin Geubelle 81a5c1563a [FIX] web: FieldSelector: always keep first page
In the FieldSelector, after clearing the chain and closing the popover,
the very first page was removed from the widget `pages`. This was causing
issue when trying to select a new field again.

This commit ensures that the first page is not sliced.
2017-10-31 11:38:29 +01:00
Christophe Simonis 6c2ab192ea [MERGE] forward port branch saas-16 up to 88a9980b0c 2017-10-10 16:49:59 +02:00
qsm-odoo 9241f7ea63 [FIX] web: allow strings as m2o values in domain selector
Since the new views, the field parsing for m2o returns an object with
id and display_name. If the given value to parse is a string, it is
supposed that this is an ID. This was breaking the domain selector
widget which should allow strings as name-strings of m2o values.
2017-10-09 12:22:38 +02:00
Christophe Simonis bf4ccb21f6 [MERGE] forward port branch saas-16 up to 88395bdb8e 2017-09-21 17:18:49 +02:00
qsm-odoo b51b0d66c2 [FIX] web: open domain selector's datepicker at the right position
Before this commit, and since the combination of new views + datepicker
library update, the datepicker opened at the top left of the window
when using it in a domain selector. It also could not be used at all.

This was because the current scenario occured:
1) Click on the datepicker
2) The datepicker triggers that it has changed on opening
3) The whole domain selector is rerendered
4) The datepicker computes where it should open... on basis of the
   old destroyed domain selector

As the main cause of the problem here was the (2), this commit changes
the datepicker odoo widget to only notifies that it has changed when it
has really changed.
2017-09-21 14:51:12 +02:00
Christophe Simonis 30bd5ac0e9 [MERGE] forward port branch saas-16 up to aec6248bb3 2017-08-23 16:44:58 +02:00
Khoi Nguyen 1e65cd3d4e [FIX] web: fix traceback when saving fields list during data export
The traceback was caused by an occurence of this.dataset, which was left
out in the new views refactoring (this.dataset has been replaced by
this.record).
2017-08-11 17:44:30 +02:00
Dharmraj Jhala 4330ea0267 [ADD] web, *: add rainbowification
This commit introduces the 'rainbowification' feature to the web client
(and to some affected addons).  This feature is essentially a way to
display a nice friendly message when some business event happens.  For
example, a encouraging message is displayed when the user clear her/his
inbox, or when a salesman closes a deal.

The mechanism currently only displays a 'rainbowman', but could be
extended later to add other kind of animation.

There are a few different ways to display a 'rainbowman':
- any JS code can simply trigger_up an event ('show_effect') with some
  options: for example
    this.trigger_up('show_effect', {
        type: 'rainbow_man',
        fadeout: 'no',
        message: $done,
        click_close: false,
    });
- an action returned by the server can have an 'effect' key, with some
  options
- the do_execute_action method accepts a 'effect' option.  This is
  useful when one wants to specify a rainbow on an action button in a
  form view

Joint work with: dbh <dbh@odoo.com>, ged <ged@odoo.com>
2017-07-12 13:43:08 +02:00
Géry Debongnie 5788ee8a1c [FIX] web: prevent crash when exporting all data
In the list controller, some code to determine the active domain to
export was causing a crash.  It was easy to see: just select all records
in a list view, then click on 'Export' in the sidebar.

Note that the data_export code is still quite old, and did evolve
organically.  It does not conform to our new design principles, in
particular, the way component should communicate. But this is a task for
another day.
2017-05-29 16:20:45 +02:00
Géry Debongnie 875ea7964c [REF] account, web, web_diagram: rename static test folder
For consistency, every static test folder should be named 'tests', with
a s.
2017-04-11 19:44:38 +02:00