Commit Graph
12325 Commits
Author SHA1 Message Date
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Christophe Simonis 6faf9b76cd [FIX] web: adapt new test to new version
Oversight of previous forward-port.
2019-03-19 17:40:56 +01:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Christophe Simonis 9b6e37a983 [MERGE] forward port branch 11.0 up to 7e33b54771 2019-03-18 16:51:57 +01:00
Christophe Simonis 2940ee6b35 [MERGE] forward port branch saas-15 up to c6353942ff 2019-03-18 14:17:54 +01:00
Nicolas Martinelli 7dfcea0655 [FIX] web: previous
Wrong label.

opw-1958313

closes odoo/odoo#32008

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-21 10:37:41 +00:00
Christophe Simonis c6353942ff [MERGE] forward port branch saas-14 up to 5162ca7be7 2019-03-18 10:53:01 +01:00
Christophe Simonis 5162ca7be7 [MERGE] forward port branch 10.0 up to 36ba37a7a1 2019-03-18 10:20:06 +01:00
Pierre Paridans bdc0b4b892 [FIX] lunch: make it work on mobile
This module didn't worked on mobile: user cannot select the products or
see their cart.

This commit reworks the LunchKanbanWidget template and introduces a
dedicated template for mobile. This template introduces a button at the
bottom of the screen to toggle the "cart" widget on mobile (hiding it by
default).

It tries to make the best use of the existing Bootstrap classes allowing
to have a more responsive layout and reducing the custom CSS required by
this module (both in desktop and in mobile).

This commit adds a decent JS tests-suite (mobile & desktop) to this
module as the existing one left substential parts of the UI untested
(opening wizard when clicking on a kanban record, cart's lines content,
clear cart button, widget structure and content based on the state...).
Those tests are also less based on DOM nodes order/tag names and use
instead dedicated classnames.

It also modifies the LunchKanbanRecord click handling to had a dedicated
event handler instead of overriding the default _onGlobalClick() and
make it more testable.

Task ID: 1945032
2019-03-19 09:26:08 +00:00
Christophe Simonis bd63913326 [MERGE] forward port branch saas-11.3 up to 4e39328a76 2019-03-18 20:03:24 +01:00
Christophe Simonis ff1bca32f3 [MERGE] forward port branch 12.0 up to a26496b6e7 2019-03-14 17:43:32 +01:00
Odoo Translation Bot 6b4a35facd [I18N] Update translation terms from Transifex 2019-03-17 03:13:11 +01:00
Nans Lefebvre a26496b6e7 [FIX] mail: set message_main_attachment_id when the attachment is added via widget
Create a record.
Add an attachment, using the widget (aptly named 'add an attachment').
It is not set as message_main_attachment_id.
If you add the message through 'log note', then it is.

We add a hook to make sure that it is set as message_main_attachment_id
when added through the widget.

opw 1950403

closes odoo/odoo#31847

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-14 12:50:51 +00:00
Christophe Simonis ac4ef455c4 [FIX] web: correct view definition in new test 2019-03-14 15:01:09 +01:00
Christophe Simonis 9a4e84ae66 [MERGE] forward port branch saas-11.3 up to f5ab04ce50 2019-03-14 14:13:47 +01:00
Christophe Simonis bbedcdb190 [MERGE] forward port branch saas-12.1 up to ff1bca32f3 2019-03-14 19:44:55 +01:00
Sébastien Theys fec83667bb [FIX] web: fix kanban_image when called for a different record
The issue is manifesting for example in the Contact kanban view where the
company image should be displayed in small. Before this fix, the person image
was displayed twice instead.

Following PR #30881 and commit: f78b7a76d6

The fix introduced by the above commit highlighted another issue with the
method: if the `model` and `id` given in parameter are different than the
current record, the method returned the url for the current record instead of
the requested record.

To fix the issue, we return the `raw_value` only if the requested record is the
current record. Otherwise, we return the manually built url.

PR: #31842

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-14 14:10:54 +00:00
Christophe Simonis f5ab04ce50 [FIX] web: adapt new test to extra rpc call made on view loading 2019-03-13 17:55:13 +01:00
Christophe Simonis afe8e97800 [MERGE] forward port branch 11.0 up to c23d1186e7 2019-03-13 16:52:40 +01:00
Martin Geubelle 170c7632f2 [FIX] web: hide handle on readonly x2m
The widget handle was displayed on x2m fields in form views, even when
the field was readonly, which makes no sense.

It is now correctly hidden.

Fixes #30580
opw-1937833

closes odoo/odoo#31743

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 09:31:37 +00:00
Denis Vermylen 791a38a655 [FIX] web: qweb2: allow null values in a foreach iteration
Before this commit iteration in a t-foreach containing null or
undefined values crashed because they have no attributes.

closes odoo/odoo#31828

Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2019-03-12 16:15:39 +00:00
Martin Trigaux 7e2f9634d2 [FIX] web: do not use t-if inside assets
This makes the assets to be recomputed everytime somebody with a different
language load the page.

closes odoo/odoo#31782

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-12 10:58:53 +00:00
Christophe Simonis ecd8c023b7 [MERGE] forward port branch 11.0 up to e5f93b83c6 2019-03-08 15:08:16 +01:00
Lucas Perais (lpe) 6b676f6235 [FIX] web: record datapoint context without group_by or orderedBy
Have a list view, apply a group_by and a filter with a sort parameter

Click on one record to access the form view
Have a x2m within it

Before this commit, the x2m records were loaded with a context containing
the keys orderedBy and group_by
It seems harmless at first, but even conceptually those keys should not be here
- they apply on a list of records, and not to individual ones
- they may contain field names not existing in the x2m model
Hence, when accessing another list view through an action button, the list
will try to be orderedBy or group_by with the given context
Which is plain wrong in the first place and may cause crashes

After this commit, the context of a record datapoint (representing a single record)
is stripped from the keys

Read the opw for a concrete use case
OPW 1943583

closes odoo/odoo#31706

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-08 13:30:30 +00:00
Florent de Labarre 5aa00c3362 [IMP] web: allow to override the number of buttonbox buttons
See odoo/odoo#31546

closes odoo/odoo#31698

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-08 09:38:23 +00:00
Nans Lefebvre 245286949f [FIX] web: fix kanban css for overflows
If the content is too long, it overflows badly.
Since the height is fixed, the flex doesn't work well.

opw 1924145

closes odoo/odoo#31717

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-08 16:07:34 +00:00
Martin Geubelle 590c9d8e33 [FIX] web: add a fallback for kanban_label_selection
Before 11.0 the kanban view used to have its own widget registry. It is not the
case anymore, but there are still leftovers from the past. For example, the
widget `kanban_label_selection` is still used in many views, even though it is
now called `label_selection`.

As we are in a stable version, a fallback has been added for it in the field
registry.

Similar to odoo/odoo@5401c15

Closes odoo/odoo#30904
Closes odoo/odoo#25928
2019-03-07 08:45:41 +00:00
Aaron Bohy abf3506543 [FIX] web,hr: don't display dept complete_name in searchpanel
The departments being already rendered according to the hierarchy,
only the name of the department should be displayed (e.g. 'Direct
Sales' instead of 'Sales / Direct Sales'.

closes odoo/odoo#31353

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-07 07:51:44 +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 2b3296bbf8 [FIX] web: use stricter css selector in new test
It allow not matching the dropdowns of the search view.

closes odoo/odoo#31738

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-11 10:16:53 +00:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Christophe Simonis c023d0784f [MERGE] forward port branch saas-11.3 up to ecd8c023b7 2019-03-08 16:10:55 +01:00
Nicolas Lempereur ee5f1e277d [FIX] web: pivot no result no remove groupbys
Since f8b38f64d dictionaries "groupbys" are the same object between the
pivot model instance and the headers menu.

But this causes an issue in 12.0 since when there is no results, the
headers menu groupbys is truncated and now being the same object, the
pivot model instance is also truncated.

So succedding search that find results would possibly have lost the
groupbys which is unexpected and breaks some 12.0 tests not expecting
it.

With this changeset, the groupbys are not truncated anymore.

Without the change, the added test fails with:

 Column groupby not lost after reload after empty results
  expected: { "pivot_column_groupby": [ "customer" ],
              "pivot_measures": [ "__count" ], "pivot_row_groupby": [] }
  result:   { "pivot_column_groupby": [], "pivot_measures":
              [ "__count" ], "pivot_row_groupby": [] }
closes #31644

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-06 17:02:35 +00:00
Martin Geubelle 1793d6d138 [FIX] web: update breadcrumbs when switching view
To reproduce:
 1. go on list view
 2. open record in form view
 3. come back on list view
 4. switch to kanban
 5. open record in form view
 6. click on breadcrumb

Before this rev. we were back on the list view, and not the kanban view.

This is due to the fact that the breadcrumb was not updated when switching view,
(if a controller was already existing) so the form view control panel breadcrumb
was still referencing the wrong (list) controller.

This bug appeared with the control panel refactoring, which is now managed by
the view itself (and not the action manager as previously).

Task 1932646

closes odoo/odoo#31598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-06 10:28:01 +00:00
Christophe Simonis 3e54704e66 [MERGE] forward port branch 11.0 up to 27081bf6f5 2019-03-05 17:26:04 +01:00
Odoo Translation Bot 29423872b1 [I18N] Update translation terms from Transifex 2019-03-17 01:22:27 +01:00
Nicolas Lempereur b8d4fe6d38 [FIX] web: keep col group by on 2nd reload+after 0 result
In 11.0 f8b38f64d improved the column group by managment when reloading
several times by having the same "groupbys" dictionaries between the
pivot model instance and the header menu.

This has been reverted in 12.0 (with c6e7adfb95) because the following
pivot tests failed with the change:
- 'rendering of pivot view with comparison'
- 'export data in excel with comparison'

The failure is because now that the "groupbys" dictionaries are the same
object, the truncated dictionary of a header truncate the one of the
model instance.

So if we search something that has no results, then something with
results, the groupbys could be lost.

This behavior has no reason to be and is changed in 11.0 with #31644,
this commit is the forward-port of f8b38f64d and #31644.

closes #31627

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-06 17:04:42 +00:00
Christophe Simonis 1c712986c4 [MERGE] forward port branch saas-15 up to 1f1fa35c07 2019-03-04 15:49:35 +01:00
Christophe Simonis 1f1fa35c07 [MERGE] forward port branch saas-14 up to 232da9a0ec 2019-03-04 13:40:44 +01:00
Aaron Bohy df7fcfb3fd [FIX] web: remove duplicated entry in field_registry
Commit 4960453d added the field signature in field_registry.js and
in signature.js.

closes odoo/odoo#31434

Signed-off-by: =?utf-8?b?R8OpcnkgRGVib25nbmllIChnZWQp?= <ged@openerp.com>
2019-03-05 09:11:37 +00:00
Odoo Translation Bot f014204447 [I18N] Update translation terms from Transifex 2019-03-03 03:15:43 +01:00
gustavovalverde c812cc4ebc [I18N] *: remove es_DO translations
Include commit 572d628 again, as it was lost with a forward port.

closes odoo/odoo#31479
2019-02-28 12:39:03 +00:00
Odoo Translation Bot 9d4aad2d67 [I18N] Update translation terms from Transifex 2019-03-10 01:36:03 +01:00
Martin Geubelle 8316c2d210 [FIX] web: correctly handle (no result) selection in search
In the recent control panel refactoring, selecting '(no result)' (when using the
autocomplete on a many2one for example) was no correctly handled and was leading
to a traceback.

It is now correctly handled and the search bar is correctly re-rendered.

Task 1936745

closes odoo/odoo#31438
2019-02-27 10:33:41 +00:00
Christophe Simonis 4c46dd4f9d [MERGE] forward port branch 10.0 up to 2f139632d6 2019-02-27 10:42:03 +01:00
Nicolas Lempereur f8b38f64d3 [FIX] web: keep col group by on 2nd reload
In 187c32c2 some improvements were made for conserving/restoring group
bys on the pivot view.

This introduced an issue on the column group by:

- before reload, if we set manually a column group by (+ icon in the
  header) it would be saved and not lost (unless a context or filter
  in the search view override it)

- after reload, the following manually set column group by are not saved
  anymore on subsequent reload (the column group by at the first reload
  are set back)

This behavior is not normal since the behavior (conserving or losing
column group bys) should be the same at first reload or second reload.

The issue was caused by the duplication of group bys that were not
synchronized (one on the column root header, one on the pivot model
instance).

Without the change, the added test failed with: "Column groupby not lost
after second reload" and product_id is hidding from the object
pivot_column_groupby dictionary (having only "customer").

Using _.clone on initialRowGroupBys was necessary change because without
duplication of "groupbys", the initialRowGroupBys would be changed on
expandHeader which is unexpected.

opw-1941095
closes #31407
2019-02-26 14:54:46 +00:00
Aaron Bohy 6a8e1b53e3 [FIX] web: search more in many2one: filter on ids
Let's assume a many2one field with a lot of possible values. The
user clicks on 'Search More...'. In the opened dialog, only 160
records are available (their ids have been obtained with a
name_search, with the optional text the user could have typed in
the many2one input).

Before 4cd379cf, that extra domain on ids was removed automatically
as soon as the user interacted with the search view in the dialog.
This was especially useful when there were more than 160 records.
However, this was rather an happy coincidence than a designed
feature.

From 4cd379cf, the ids selection was added to the initial domain
of the list, so they couldn't be removed from the domain
afterwards. The user was thus stucked with its preselected 160
records.

This rev. doesn't restore the former behavior, but rather improves
the current one, as follows:
 - when there is no text in the many2one input (i.e. no value to
   filter on), we bypass the name_search, s.t. all records are
   available in the dialog
 - when there is some text in the input, we perform a name_search (as
   before) to get a list of record ids, and we add a special filter
   to the search view in the dialog (the filter on those ids), s.t.
   the user can remove it if he wants to access the remaining records.
 - finally, the limit is now set to 320, to mitigate the problem

Issue reported on the saas-12.1 migration pad.

closes odoo/odoo#31232
2019-02-26 08:26:51 +00:00
Pierre Paridans c0f8690d1b [FIX] lunch,web: display correctly list's cell with text overflow
Installing the 'lunch' module add css rules to the generic list view
styling, modifying the styling of all the list views by the simple fact
of being installed.

The goal of those rules is that in list view a table cell with the
o_text_overflow class should still be displayed as a table-cell (and not
a block/inline-block).

Without the lunch module a list view's cell with the o_text_overflow
class is narrower and break the alignment between this column and the
headers.

This commit moves the necessary rule (display property) to the web
module and apply them globally.

Remark: module's css rules shouldn't override globally the one from
'web'.

Original commit: https://github.com/odoo/odoo/commit/855c6dac25fccaf9312543022001ed0b360d6e13

closes odoo/odoo#31506
2019-02-28 15:08:15 +00:00
Christophe Simonis 06898fac3c [MERGE] forward port branch saas-12.1 up to f9d3b5b7df 2019-02-28 13:47:09 +01:00