Commit Graph
8839 Commits
Author SHA1 Message Date
Christophe Simonis e00a447e2c [MERGE] forward port branch saas-11.1 up to 7e469eb77a 2018-02-01 18:20:28 +01:00
Christophe Simonis 7e469eb77a [MERGE] forward port branch 11.0 up to f5e7b86686 2018-02-01 18:15:21 +01:00
Christophe Simonis f5e7b86686 [MERGE] forward port branch saas-16 up to 920aa6174c 2018-02-01 17:02:19 +01:00
Christophe Simonis 920aa6174c [MERGE] forward port branch saas-15 up to e0422bfd6c 2018-02-01 16:40:13 +01:00
Géry Debongnie 20bd730353 [IMP] web: display no content helper in grouped kanban view
Before this commit, it was not possible to display a help message in a
kanban view, if it is grouped.  This is an issue, from an onboarding
point of view.  Imagine a new user, creating a project.  After it
creates a few columns, it is not clear what to do.

With this commit, we display the nocontent help message in a grouped
kanban view, if the user is not currently creating a new column. This
allows the user to focus on its work, by working in phases: first, he is
prompted to create project column, then when he decides that he is done,
the user interface shows the nocontent help message, which guides
her/him to the process of creating a task.
2018-02-01 15:48:09 +01:00
Christophe Simonis e0422bfd6c [MERGE] forward port branch saas-14 up to 7d465aa56c 2018-02-01 15:39:39 +01:00
Arnold Moyaux 17f5f74af9 [IMP] mail: redirect on mail activity
Allow to redirect on a form view when the user click
on a html tag a with data-oe-model and data-oe-id specified.

In order to avoid code duplication the do_action already existing in
mail_thread is moved in the action_manager and mail_thread and mail_activity
use a trigger_up in order to call it.
2018-02-01 15:26:59 +01:00
Aaron Bohy 02ec09cb1c [REF][IMP] *: mail js refactoring
This commit improves the JS code of the mail module,
which comes maily from the new coding guidelines
and the addition of "JS services".

JS services are important objects that do not fit
well in the component tree, such as chat_manager
or ajax.

The benefits of JS services are improved readability
of the code, reduced coupling, and more testable
modules. In particular, discuss was hard to

Summary of the changes:

- ClientAction has been renamed into Discuss
- Clear instantiation of chatManager
- New coding guidelines in most mail modules
- JS Services can interact with each other
- Chat Manager and Window Manager are services
- Window Manager renamed to Chat Window Manager
- bus.bus is now encapsulated in Bus Service (a service)
- The test infrastructure has been tweaked with JS Services
- Chat Mixin has been removed

A future improvement would be to translate some 'trigger' into 'trigger_up'.
2018-02-01 14:51:58 +01:00
Lucas Perais (lpe) 9fa597c7ec [FIX] web: sequence handlers on modal's one2many list
From a form view (say Bill of materials)
Edit the form
Click on a bom line
Click on the external button that makes the product form pop up
change the order of suppliers on that product

Before this commit, a JS traceback was raised
This was because the changing object was not present in the localData that the Model object holds
or more accurately, it was not the **right** model object that was targetted
and this was due to the propagation of the resequence event

After this commit, no error is thrown, and the resequencing works as expected

OPW 807196
2018-02-01 13:53:52 +01:00
Alexandre Kühn 0cd656b5af [IMP] mass_mailing: onboarding
Lots of small usability improvements on the mass_mailing app.
2018-02-01 13:34:29 +01:00
qsm-odoo 126850e9bd [IMP] web: update bootstrap to 3.3.7
Before this commit the bootstrap version we used was inconsistent.
Indeed, the javascript files were the 3.3.4 ones and the less files
were the 3.3.5 ones. This was due to a failed merged resolution in 9.0.
This should however not cause any issue as the difference between
3.3.x versions are very minor.

Basically, this commit is more of a fix than an improvement and may
even be backported if we find reasons to do so. This commit is mainly
made to prepare the transition to version 4.0.0, which requires to
switch our LESS files to SCSS first (and it will be easier to go by
bootstrap 3.3.7 with SCSS files first).
2018-02-01 11:03:05 +01:00
Goffin Simon 695bd75a13 [FIX] web: invalid domain in DomainSelector
Backport of this commit: c13c9e0b5c
Steps to reproduce the bug:

- install application MRP Maintenance
- open maintenance request form view, and from top right corner click Studio icon
- click on Equipment field while you are still in studio interface
- It will show left side studio panel, click Domain box and it will throw an error

opw:813594
2018-02-01 10:31:14 +01:00
Nicolas Martinelli eeebd4ad85 [FIX] web: kanban containment
Set up the following kanban columns:

| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | F |
|       |       |       |       |       |  Card |   |

<------- Screen width ---------->

Col x are unfolded columns.
F is a folded colum.

Moving the Card from Col 6 to F is impossible: the card won't go 'out of
the screen' on the right, which prevents its center to reach F.

Commit 5ba6d93810 deactivates the drag & drop on read-only fields.
In order to restrict the kanban cards displacements, the `containment`
attribute is used to either restrict the displacement:
- in `o_kanban_view` if draggable
- in the parent if not (to allow the resequence)

The class `o_kanban_view` is too restrictive: when movind the card to
the folded column F, the card must go out of `o_kanban_view`.

opw-803929
2018-02-01 10:12:46 +01:00
Lucas Perais (lpe) e6cccbf441 [FIX] web: less boolean_toogle
Before this commit, the boolean_toggle widget was rendered
but the less contained errors that prevented it from displaying correctly
This was due to commit 9dead7e3d3

After this commit, the widget displays correctly

There might be an issue in the future because of
field_utils.formatBoolean, when this function decides to pass the full options dict

OPW 80782
2018-02-01 09:32:46 +01:00
Géry Debongnie 31a99ed5b7 [IMP] web: add better message in column quick create
This commit add a help message in the column to indicate that pressing
escape will discard the current column creation. Note that some JS had
to be added to make the message disappear when the input is no longer
focused. The reason is that the create column widget may still be visible when
the input is no longer focused (for example, because the user clicked on
the fake records, or clicked on the example link)
2018-01-31 16:46:56 +01:00
Gorash cd30db60e6 [IMP] web: allow to use m2m_tags outside a form view 2018-01-31 15:53:04 +01:00
Nicolas Martinelli a4c7481f24 [FIX] web: auto-refresh of time
When a TZ mismatch is detected, the datetime value is displayed in the
widget. However, on MacOS, this forces the dropdown list to close at
each refresh of the value, which occurs every second.

The refresh interval is set to 1 minute in case of MacOS.

opw-804035
2018-01-31 14:40:23 +01:00
stefanorigano 139737dbeb [IMP] web: tables :hover state
Properly style table’s rows ‘:hover’ state to let people understand
that it’s clickable
2018-01-30 16:09:04 +01:00
fda-odoo 6fc2cc65d9 [IMP] web: rename o_project_kanban_colorpicker to generic name
o_project_kanban_colorpicker had its less file in web module. As we need it in helpdesk too, I rename it to o_no_padding_kanban_colorpicker.
2018-01-29 16:54:39 +01:00
Nicolas Lempereur 5b230c34cb [FIX] web: noshow list view aggregates w/ currency
In df69b5bb the aggregates of a column with currency was shown only if
records were of the same currency when a grouping was closed.

But when the list view is grouped, this would cause a number of issue:

- error if with first grouping is opened, another one is closed
- if the first grouping was closed aggregates were always shown
- the code only acts when closing a grouping
- aggregates could be shown when they should not
- aggregates could be not shown when they should

So this commit change things so this feature is ignored when the list
view is grouped.

There is also a fix so `currency_field` of the column is used instead of
just using `currency_id` that may be wrong.

note: only for saas-14 and saas-15 (feature is not present in saas-16)

opw-810835
closes #22598
2018-01-29 13:37:22 +01:00
Suraj Shukla 27b30daea5 [IMP] calendar: get first day of week from user's current language.
The first day of week is a cultural habit usually linked to the language. An additionnal option could be added later on the user preferences to allow a user to change the first day of the week in his calendar view.
2018-01-29 12:21:11 +01:00
Fabien Pinckaers ccc1764c7c [IMP] web: LESS: reduce kanban col padding: cleaner + avoid larger right than left (folded cols) 2018-01-29 08:56:38 +01:00
Parth Patel b96a4f6296 [IMP] web,project: Kanban onboarding
The goal of this rev. is to improve the user onboarding on the
Project app: when the user creates a new project, he is now guided
to properly configure the stages of its project.

To do so, we added a new mechanism in the Kanban view, allowing to
define examples of processes that can be used in the corresponding
view.

The style of the ColumnQuickCreate widget has also been changed.

Part of task #38740
2018-01-26 19:26:03 +01:00
Aaron Bohy 36a9cb2059 [IMP] web: Kanban open ColumnQuickCreate if no column
Part of task #38740
2018-01-26 19:26:03 +01:00
Aaron Bohy 563c31fe49 [IMP] web: Kanban: hide Create button if no column yet
Onboarding process: the user has to create a column first.

Part of task #38740
2018-01-26 19:26:03 +01:00
Aaron Bohy 6ea347a490 [REF] web: Kanban: move quick create widgets
... in their own file.
2018-01-26 19:26:03 +01:00
Aaron Bohy d18d08f01a [IMP] web: Kanban: quick create record with more fields
This rev. improves the QuickCreate widget for grouped Kanban views.
It allows specifying in the Kanban arch a form view xmlid, e.g.:

    <kanban quick_create_view="some_form_view_xmlid">
	...
    </kanban>

When this attribute is set, the referenced form view is loaded and
rendered inside the QuickCreate widget. A real FormView widget is
instantiated, meaning that all form view mechanisms are available
in the QuickCreate (modifiers, default_get, onchanges, widgets...).

Task #27475.
2018-01-26 19:26:03 +01:00
Aaron Bohy af2686fee5 [IMP] web: Kanban: cancel column quick create on ESC
Record quick create can be cancelled by pressing ESC, so this rev.
ensures that the same behavior applies for the column quick create,
for the sake of consistency.
2018-01-26 19:26:03 +01:00
Aaron Bohy cf178a2f06 [IMP] web,*: config: add XXS size to config.device
In Less, the size_class XXS is defined and used in media queries.
This rev. adds it in JS for sake of consistency.

Code in addons comparing the size_class needed to be adapted due
to the new XXS size_class.

Moreover, we now use the helper 'config.device.isMobile' everywhere
we should, instead of manually comparing the size_class.

Finally, we changed the way the config.device has to be specified
in the test environment. From now on, only the size_class should be
set, and the isMobile flag is computed automatically.
2018-01-26 19:26:03 +01:00
Géry Debongnie cb339842d4 [REF] web,*: move fvg processing from DataManager to Views
*: mail, web_diagram
2018-01-26 19:26:03 +01:00
Géry Debongnie 12fa4e565a [REF] web: move _loadSubviews() from FormView
... as this function is only used by the FormView.
2018-01-26 19:26:03 +01:00
Martin Geubelle 4a409fb4bf [FIX] web: pass additional_context in load_action
The `additional_context` key was missing from the mock function of `load_action`.

This was causing an issue when testing a use case (the context was correctly
passed in Studio).
2018-01-26 13:13:27 +01:00
Christophe Simonis 88a87240a6 [MERGE] forward port branch saas-11.1 up to 8613724bfc 2018-01-25 17:38:41 +01:00
Géry Debongnie 21c1b1acd3 [FIX] web: add target=_blank to url field widgets
Url in the web client are supposed to open in a new tab.  This was the
way it worked in v10.0 and was lost with the refactoring of the new
views.

We just reintroduce that behaviour with this commit.

Closes github issue #22389
2018-01-25 16:31:06 +01:00
Christophe Simonis cb50970f3f [MERGE] forward port branch 11.0 up to eefe879a37 2018-01-25 15:41:45 +01:00
Prakash Prajapati eb2cf11904 [IMP] web: hide group by option in search view for calendar view 2018-01-25 13:14:00 +01:00
Christophe Simonis 0c97be858c [MERGE] forward port branch saas-14 up to 4ea4f99df9 2018-01-24 18:12:53 +01:00
Christophe Simonis 6f2d1b8261 [MERGE] forward port branch 10.0 up to 34bfadb2f2 2018-01-24 15:50:56 +01:00
Nicolas Martinelli 34bfadb2f2 [FIX] web: suggested date
- Set the OS to a GMT- timezone (e.g. 'America/Los Angeles')
- Set the format of the date to '%d/%m/%Y'
- Go to 'Account > Adviser > Journal Entries'
- Type '02-01-2018'

The suggested date is 31/01/2018.

Setting the moment object as UTC will lead to a conversion of the date
to the OS timezone when calling `toDate`, e.g.:
Mon Jan 31 2018 16:00:00 GMT-0800 (PST)

UTC should only be used in case of datetime, not date.

opw-803466
2018-01-24 14:11:55 +01:00
Martin Geubelle 2d3ecf29b3 [FIX] web: handle nested x2m default values
A `default_get` for a x2many field can return a new list of commands for one of
its x2many field, like

[[0, 0, {
    'groups_id': [[6, 0, [1, 2, 3]]],
}]]

where [1, 2, 3] is a list of existing ids.

This use case was not correctly handled by the BasicModel because
`_makeDefaultRecord` was not recursive.

Closes #22401
2018-01-24 10:59:45 +01:00
Nicolas Lempereur 070babf7e2 [FIX] web: css long word breaking out kanban tile
When words are too long this may break out of a kanban tile and getting
everywhere.

This is not wanted and the content should be:

- hidden if overflown or
- long words should be wrapped or
- too long content should be ellipsed

The ellipsis is probably the best but this would affect the current
behavior (we would have to specify a max-height which unexpectedly
may be bothersome to currently existing data).

So breaking long words has been choosen in this change.

opw-806278
closes #22435
2018-01-23 11:04:40 +01:00
Aaron Bohy 1c1f6ef557 [IMP] web: Kanban: keep loaded records when reloading
In a grouped Kanban view, when the user clicks on 'Load More' to
load more records of a given column, then opens one of those
records in the form view, and goes back using the breadcrumbs, the
formerly loaded records should be reloaded, so that the user does
not have to click again on 'Load More' to get to the position he
was previously.

This rev. increases the limit of the given column when the user
clicks on 'Load More' to force this behavior.
2018-01-22 20:07:05 +01:00
Aaron Bohy cf6697dfbd [FIX] web: ActionManager: honor action's groupBy
Before this rev., the group_by specified in the action context was
completely overridden by the group_by specified in the search view,
even if it was []. In other words, it was completely ignored.

Moreover, it was only took into account (before being overridden)
at the first load of a view, not at reload.
2018-01-22 20:00:53 +01:00
Aaron Bohy f68ad51520 [FIX] web: honor action's groupBy on reload
Let's assume an action with a 'group_by' specified in its context.
Unless another groupby is specified in the search view, the action
groupby must be used. For list views, it was only working for the
first rendering of the view. As soon as it was reloaded, the action
groupby was lost.

For instance, go to Project, click on a project in the dashboard
[the action has 'group_by': 'stage_id' in its context], switch to
list view [the list is correctly grouped by 'stage_id'], reload by
clicking on the view switcher -> the view isn't grouped anymore.

It was actually working by chance on other views because they have
specific handling of the groupby (e.g. the kanban view allows the
attribute 'default_group_by' on its arch), but by default, the
action groupby must always be used at each load/reload if there is
no other groupby specified.

This rev. restores the behavior of saas-15, before the new views.
2018-01-22 19:59:23 +01:00
Christophe Simonis 1d394bbee3 [FIX] web: adapt test 2018-01-22 19:19:59 +01:00
Christophe Simonis a98b46b8f5 [MERGE] forward port branch saas-11.1 up to fa1f2132e7 2018-01-22 18:44:05 +01:00
Christophe Simonis fa1f2132e7 [MERGE] forward port branch 11.0 up to 950d9b2369 2018-01-22 17:47:32 +01:00
Nicolas Lempereur bb833825f2 [FIX] web: set default you/all option flipped
In 60d9f6fe the ir.default replaced uses of ir.values.

But the [ir.default].set user_id has opposite meaning to
[ir.values].set_default for_all_users.

This was not taken into account when adapting javascript in 791152a87
and this commit fixes that.

opw-805871
closes #22437
2018-01-22 17:40:56 +01:00
Aaron Bohy ca323c51b2 [FIX] web: Kanban: quick create in folded column
With attribute 'on_create="quick_create"' on the arch's root node,
kanban views open the quick create widget in the first column when
the user clicks on 'Create' (in the control panel), if the view
is grouped and if there is at least one column. However, this
column may be folded.

Before this rev., the quick create was inserted into the folded
column, which didn't look amazing. This rev. first toggles the
column before inserting the quick create.
2018-01-22 08:32:57 +01:00
Priyanka Kakadiya 33d43c5af1 [FIX] web: traceback when exporting from list view
Former code of list controller used the searchView of its parent,
which was the ViewManager. However, this has been changed by rev.
32b8cec53, where the ViewManager was removed, and the list
controller now has the reference of the searchView, so this code
had to be adapted. Tests have been adapted accordingly as well.
2018-01-22 08:28:44 +01:00