Commit Graph
13451 Commits
Author SHA1 Message Date
2c102c292f [IMP] web: search panel counter changes
This commit introduces several changes in the search panel with
respect to record counts:

    - the record counts are now also available for
      the fields with select="one" attribute
      (if not disabled explicitely).
    - the record counts are better computed using the idea that
      selected values within a group should not impact the counts
      for the group values but only the counts for the other
      group values.

On the way we have changed two keys in the values returned
by the server:
    - 'count' becomes '__count'.
      It has been done to avoid a possible clash in case a model would
      have a field named 'count' and that the field values would be
      wanted for some reason.
    - 'name' (multi case) becomes 'display_name'.
      It has been done in order to make the select one and multi cases
      more similar and factorize some code.

TASK-ID: 2166814

Co-authored-by: Raphaël Collet <rco@openerp.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Alexis Lacroix <laa@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-05-05 19:23:20 +00:00
Mathieu Duckerts-Antoine c19dcf3983 [REF] web: search panel goes ESNext 2020-05-05 19:23:20 +00:00
Julien Mougenot d21c412985 [IMP] web: Standardize FALSE and TRUE leaves/domains
Add four static properties on the Domain.js class: (TRUE|FALSE)_(LEAF|DOMAIN).
This increases consistency for domains using these concepts.
2020-05-05 19:23:20 +00:00
Julien Mougenot 26491fcb4c [IMP] web: add sortBy to core.utils
Add a "sortBy" helper to core utils. This function takes an array and
an optional criterion as arguments and returns a new array sorted
according to the given criterion.
2020-05-05 19:23:20 +00:00
Dhruv Patel a599f1402e [IMP] web: FieldMany2one: reword and simplify dialog
This commit improves the dialog that opens when a user clicks out
of an 'un-commited' many2one. It is no longer possible to edit
the value, and the sentence has been reworded.

closes odoo/odoo#49528

Task: 2234212
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-05 15:19:45 +00:00
Mathieu Duckerts-Antoine 9c2a0f1db7 [FIX] web: no confusion betweed false and 'false'
In the search panel, if a select multi was grouped by a field that can
take the value 'false' (like a char field), that value would be confused
with the value false and the group 'false' would never be
displayed (its values would be put in the group false).
This commit avoids that situation by using JSON.stringify instead of
the implicit stringification done when using a value as an object key.

closes odoo/odoo#50647

X-original-commit: 5b19e6c13b636d108e8aa1a09f01124fdb38a577
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-05 12:04:19 +00:00
Aaron Bohy a0c7284b66 [IMP] web: add 'label' attribute on AbstractField
If set, this value will be displayed as column name in list views.
This attribute could be used in the future in form view for the
same purpose.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy 59641325c7 [IMP] mail: add Many2OneAvatarUser field widget
This widget is an extension of Many2OneAvatar, designed for
many2one fields pointing to the 'res.users' model, or a model having
itself a many2one field pointing to 'res.partner'.

With this widget, when the avatar is clicked, we open a DM chat
window with the corresponding partner. If the user clicked on itself,
we open a blank chat window for the sake of consistency.

In kanban views, this widget only displays the avatar.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy df4693e7ff [IMP] web: add Many2OneAvatar field widget
In readonly, this widget displays the image of the related record
next to its display_name. In edit, it behaves exactly like the
regular many2one.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Aaron Bohy 4f8860e503 [IMP] web: add RemainingDays field widget
This widget can be used on date and datetime fields. In readonly,
it displays the delta (in days) between the value of the field and
today. In edit, it behaves like a regular date(time) widget.

Part of task 2195254
2020-05-05 08:48:34 +00:00
Aaron Bohy a3c0d6ee71 [FIX] web: list: prevent flickering
Have a list view with "badge" field component and 'decoration-xxx'
attributes (on that field). Before this commit, it flickered when
the user refreshed the list (for instance, by clicking on the list
icon in the view switcher). The badges were displayed with a grey
background (i.e. no decoration) for a brief moment, before their
style was applied.

Their style is applied in the mounted hook, which is called by
'on_attach_callback' (legacy version of mounted). However, the list
renderer computes its column widths in 'on_attach_callback', which
produces a repaint.

This commit moves this operation to the end of on_attach_callback,
such that other processing (like applying the badges style) is done
before the repaint.
2020-05-05 08:48:34 +00:00
Aaron Bohy 1d6e4948d2 [IMP] web: add BadgeField component
This new field component displays the field's value inside a
bootstrap pill badge. Supported field types are 'char', 'selection'
and 'many2one'. The background color of the badge can be customized
by using the decoration-xxx mechanism, e.g.
 <field name="state" decoration-danger="state == 'cancel'" widget="badge"/>

Part of task 2195254
2020-05-05 08:48:34 +00:00
Aaron Bohy 56787d5878 [REF] web: field decoration
This commit refactors the way the decoration-xxx attributes are
applied to field widgets/components, in a way that it can be
overridden in a given field or component to generate the approriate
className. By default, 'decoration-x' applies className 'text-x'.

This will be necessary for the new 'FieldBadge' component, which
needs to apply 'bg-x' classNames instead of 'text-x'.

Part of task 2195254
2020-05-05 08:48:34 +00:00
Aaron Bohy a1d3e224d8 [IMP] web: list: allow to add decorations on field nodes
In list views, one can specify decoration-XXX attributes on the
arch root node. Those decorations are evaluated for each record,
and the corresponding style is applied on rows for which the
condition is true.

This commit allows to specify those decoration-XXX attributes on
field nodes as well. In this case, when the condition is met by a
record, only the field on which the attribute is set will be
impacted.

Part of task 2195254
2020-05-05 08:48:34 +00:00
Aaron Bohy 47144b9ee4 [IMP] web: list: improve style of icon buttons
Buttons with icon and string attributes now have both their icon
and string displayed, whereas before only the icon was displayed
(the string was available as title).

We also force class btn-link to style buttons with icon, except if
another btn-xxx class is explicitely provided.

Part of task 2195254
2020-05-05 08:06:33 +00:00
56e63ebae3 [IMP] web: ControlPanel: remove dropdown carets
Part of task 2234547

closes odoo/odoo#49793

Related: odoo/enterprise#10059
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 18:15:28 +00:00
067e8c88fe [IMP] web: hide export button when selected records
Part of task 2234547

Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 14:31:11 +00:00
c80fa71adb [IMP] web,*: search menus always visible
Part of task 2234547

Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 14:31:11 +00:00
93c01a231a [IMP] web: FavoriteMenu: move 'Save Current Search'
Move it above the separator.

Part of task 2234547

Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-05-04 12:05:38 +00:00
Mathieu Duckerts-Antoine d57e500081 [FIX] web: keep server group order in pivot
In the pivot view, groups comming from many read_group are assemble
to create the header hierarchies and the table.

Groups returned by the read_group may be already sorted by the server
using the order set on the model for instance and that order should
be reflected in the header hierarchies (and in the table).
It is important to keep that order since it might not be possible
to recreate it in the interface. Even if possible it might not be a
good idea for performance reasons.

Before this commit:
The groups are added in a JS object, whose keys are the group ids
(when grouping on a many2one at least). Then, to generate the table,
we iterate over the keys of that object, but those keys are sorted
according to the numerical order (not the insertion order),
because keys are kind of numeric.
See https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order.

After this commit:
Instead of a JS object, we use a Map for which the insertion order
is used (official spec).

Task ID: 2243416

closes odoo/odoo#50551

X-original-commit: 1a9a85c8b8d0f47c3c6f3878cd6d9401ddc3ad75
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-04 09:36:01 +00:00
jvm-odoo a7ee8bc79b [FIX] web: fix can't open date picker on graph views
Issue

	- Install CRM
	- CRM > Reports > Activities
	- Add a custom filter > Created on
	- Select the date

	You can't, the date picker is not shown

Cause

	Actually, the date picker is shown but
	very quickly and it is closed by a scroll
	event thrown by Chart.js.

Solution

	Close the date picker only if the user
	scrolls manually.

OPW-2245019

closes odoo/odoo#50482

X-original-commit: bda320052ac937f5bc17c7da81d84633d72a8370
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-30 14:35:08 +00:00
Alexandre Kühn 6401ad56ab [FIX] web,base: correctly display activity widget in partner kanban view
Revision on 7ecae33571

Commit above introduced activity widget on partner kanban, but
unintentionally affected style of all other kanban views that have
details on kanban record.

This commit fixes the issue by applying special CSS rule only on
partner kanban view, so that other kanban views remain unaffected.

Task-Id 2237638

closes odoo/odoo#50474

X-original-commit: b0ef12bc0bcdb29ffc7e61f1a1a185248650283c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-04-30 13:27:24 +00:00
Alexandre Kühn 93e8435890 [REV] "[FIX] web: fix rating kanban card layout"
This reverts commit 715ef9fc2684dc875cf82ee312f20575ed42f94d.

Purpose of commit above was to fix an issue in kanban view
CSS introduced by 7ecae33571

This commit, however broke more kanban views. This happened
because the original commit changed a CSS rule with flex, and
commit above attempted to fix the issue by turning problematic
UI elements to their flex equivalence.

This change is too broad and unsafe, so the better decision is
to revert them.

Task-Id 2237638

X-original-commit: 6badf3839147c0b9a475247699227ed304bd402d
2020-04-30 13:27:24 +00:00
dmonzonis 56835877d2 [IMP] web: Fold column quick create on load examples
Before this commit, after adding a column or loading examples in a
kanban from the quick create column, it stays open. After this commit,
it will stay open if adding a column through it, but it will fold if the
user has loaded a set of columns from an example.

Task ID 2047369
PR #48299
2020-04-30 09:09:23 +00:00
dmonzonis 59a0b92995 [IMP] utm: Add kanban examples for UTM campaigns
Inspired by what is done in the task kanban of the project module,
add examples of kanban stage setups for UTM campaigns, and allow users
to load them.

There have also been some minor changes to the campaigns view:

- The helper message when there are no UTM campaigns has been changed
  to a more descriptive message.
- All stages that existed by default (hardcoded in the data XML) have
  been removed except default New one. An user with a fresh database will
  have no stages in their kanban. The old hardcoded stages have been moved
  to the demo data instead, so they will still be added by default if the
  user installs demo data.
- The ghost columns that appear in the kanban when no stages exist have
  been renamed to match the old stages that were hardcoded.
- When the user opens the view to create a column, the 'See examples'
  link will appear below the 'Column title', just like in the project
  addon, and clicking it will open some examples specifically made for UTM
  campaigns. Clicking on the 'Use This For My Kanban' button will load the
  stages of the selected example.
- A min-height property has been given to the example modal view so that
  the view does not change size depending on the number of rows in the
  ghost columns.

Task ID: 2047369
PR #48299
2020-04-30 09:07:28 +00:00
dmonzonis 897724e5c7 [IMP] web: Allow customization of text in button to apply kanban example
Before this commit, the only module that allows for selecting and
applying kanban column examples is the project module, for its tasks
kanban, so the message in the button to apply the example is hardcoded
as "Use This For My Project".

After this commit, the text in this button can be customized to make
this more generic, so a different module could use a different message
like "Use This For My Campaigns". If no text is specified, a generic
"Use This For My Kanban" is used instead.

Usage

```
kanbanExamplesRegistry.add('utm_campaign', {
    applyExamplesText: _lt("Use This For My Campaigns"),
```

Task ID: 2047369
PR #48299
2020-04-30 09:06:26 +00:00
vho cb55b30293 [IMP] sales_team, web: add and improve color widget to improve UX on crm.tag
The color picker help the user to choose a color instead of picking it
by id.

The title and arial-label "no-color" default value are removed from the
picker_preview because they are not accurate. Instead name of currently set
color is used.

Task ID 2128166

closes odoo/odoo#47474

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-30 08:29:57 +00:00
Aaron Bohy 4b289bfd3f [FIX] web: list: fix confirmModal template
Replaces unnecessary (harmless in this case, but still), 't-raw'
by 't-esc'. Also replace a t-raw used in the SwitchCompanyMenu
(unnecessary and harmless as well).

closes odoo/odoo#50411

X-original-commit: 691c9d2d2868885124749482aa8954322a40f130
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-29 15:35:21 +00:00
Julien Mougenot 6fc3bee255 [FIX] web: search many2one fields with correct value
Before this commit, searching a many2one field in the search bar would create a
domain with a parsed version of the input string. However the parser of m2o fields
returns a number (ID) and would consistently return 'NaN'.

Now, raw values are taken as is when searching with many2one fields.

Task 2239254

closes odoo/odoo#50410

X-original-commit: bac74010daae868da474de9439bc7027d9206e38
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-29 15:30:27 +00:00
Alexandre Kühn ea143795e9 [FIX] web: fix rating kanban card layout
Revision on 7ecae33571

Commit above introduced schedule activities on partner kanban view,
and also made slight CSS change in order to position next activity
nicely at the bottom of the card.

This change broke the layout in Rating kanban view with a groupby
filter. This happens because some CSS rules made use of a combination
of inline-block/float/margin-compensation to display image next
to kanban textual information.

This commit fixes all above issues by using flex.

Task-Id 2237638

closes odoo/odoo#50386

X-original-commit: e7e3d14f980b221158042097568061363f6f1468
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-04-29 12:40:03 +00:00
Hardik Prajapati c2d5a4beaf [FIX] web: pivot view nocontenthelp message
Since the commit https://github.com/odoo/odoo/commit/46cf65d68e9c13193dff4b563b9b0bbb2199dfc1
when help is not defined in action then nocontenthelp is displayed as
[object, object] due to the desciption passed from renderder of the
pivot view.

So in this commit while calling the NoContentHelper pass the
descitption as string instead of jquery element.
we can use the t-value in template but that string will create
issue for transalation so pass the desctiption from the pivot render.

closes odoo/odoo#50347

Taskid: 2240167
Closes: #49859
X-original-commit: c7cc672aba669175280d619ad39b14daefd7733f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-29 07:08:15 +00:00
Xavier Morel f08b5d22a4 [IMP] web: handling of escaping in literals
Handling of escapes (`\`) was performed during evaluation rather than
parsing, so strings in the AST stored the escaped form (rather than
the proper one), and _formatAST had to mess around in order to try and
get it back into a semblance of relevance (especially as the AST would
store the escaped string without delimiters).

Fix: perform the escapes handling (aka normalisation) during
tokenization where it belongs. This means the AST formatter can now
just JSON.stringify the data. Until and unless we decide to produce a
cpython-compliant
repr (https://github.com/python/cpython/blob/0169d3003be3d072751dd14a5c84748ab63a249f/Objects/unicodeobject.c#L12902-L13006)
which is unlikely.

closes odoo/odoo#50236

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-27 13:59:49 +00:00
Mathieu Duckerts-Antoine 7b402c5e59 [FIX] web: limit on search panel values
Before this commit, if a many2X field with a big comodel was added
in a search panel, the view using it would crash. For instance that
problem occured in the kanban view for hr.job, where res.users
appears as the comodel for the field user_id.

Now, we fix an arbitrary limit of 200 to the numbers of values to fetch
for each many2X fields in the search panel. This avoid the problem
mentionned above.
Furthermore, in case the limit is attained for a field used
as select="one", the values are displayed without being hierarchized.
Indeed the limit can leads to gaps in the knowledge of the hierarchy
and consequently to a bad representation of it.

Task ID: 2154668

closes odoo/odoo#50334

X-original-commit: 8d57153b34c04952a85f6642951cb2697016da84
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-28 14:57:58 +00:00
Lucas Perais (lpe)andJulien Mougenot 6def725c6e [FIX] web: Owl compatibility: remount on same node
Keep a reference to the 'mount' method arguments to ensure that components will
be mounted on the same node and in the same way they were originally mounted.

This fix is related to the following changes in the Owl framework:
https://github.com/odoo/owl/commit/b4ad14edc03d4fb2d7a4622c6c1f63f6df5b4541

Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-04-28 09:29:49 +00:00
Julien Mougenot 03415f08f4 [IMP] web: update Owl to v1.0.7 2020-04-28 07:24:23 +00:00
Martin Trigaux 104ae05e7f [FIX] web: do not translate technical content
Avoid messing up with style by translating it

closes odoo/odoo#50251

X-original-commit: 6151757a8357693e189ff1ab31ece5efdbac65d6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-27 15:58:11 +00:00
Aaron Bohy 797403c0a9 [FIX] web: list: don't call mounted twice on fields
Before this commit, when a list contained owl field components,
the mounted hook was called twice on those components. This may
cause tricky issues like handlers being bound twice, and memory
leaks.

closes odoo/odoo#50127

X-original-commit: 206dd91e78f7896fc6b01020507657e61771787f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-24 09:17:57 +00:00
Nicolas Martinelli 62fbf6e467 [FIX] web: font support for Cyrillic in sign report
Forward-port of https://github.com/odoo/enterprise/pull/9996

closes odoo/odoo#50110

X-original-commit: d4bef0aaa5f208c6092df71f2312c0ff4b6c8396
Related: odoo/enterprise#10181
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-24 08:21:22 +00:00
Aaron Bohy a3a415b130 [FIX] web: tests: detect failed modules in small suites
Before this commit, we waited for 10 seconds before defining the
boot test (checking that all JS modules have been correctly
loaded). However, small test suites (like the mobile one) ended
before this test was defined. So we could end up with a green
branch with tests not being executed (e.g. if a testing module
had missing dependencies, and was part of a small suite).

This commit removes the boot tests and instead does the check
at the end of the suite, before logging that the suite passed.

closes odoo/odoo#50109

X-original-commit: 048557eef32df94715ab464614c9d9d34c4a2689
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-24 08:11:17 +00:00
Julien Mougenot 85eef1ec4d [FIX] web: properly define control panel layout
Before this commit, some elements in the control panel were not properly encapsulated
in layout-related parent elements and this caused some inconsistencies if some of
the control panel components were not displayed. For example: if the breadrumbs
were missing, the search bar went to the left side instead of the right.

Now, all components are in a grid-like structure (in desktop mode) and should not
overstep their given boundaries. The layout in mobile remains unchanged since the
top part behaves quite differently.

closes odoo/odoo#50057

X-original-commit: 533db5991a5bb871198485cd71a63f75a8c6becf
Related: odoo/enterprise#10148
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-23 10:32:25 +00:00
Martin Trigaux 2d00263127 [I18N] *: export saas-13.3 translations
closes odoo/odoo#50031

X-original-commit: 15a7a9f9d71a0b9c46d7caf2f4fbf09a5a4c63fe
Related: odoo/enterprise#10140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-23 07:13:48 +00:00
Julien Mougenot dd96271208 [FIX] web: handle empty notebooks in form views
Before this commit, when re-activating a previously active notebook tab, the form
renderer would assume that a tab was actually active. However this does not happen
if no tab is visible or defined and it results in a crash instead.

Now, if no active tab is found, a default active tab (0 = first) is set. This only
helps to prevent the crash and does not affect the current behaviour.

closes odoo/odoo#50006

X-original-commit: 73e0c0a1395ebd0e2b4ac7f857c863a0358c5e17
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-22 15:11:02 +00:00
qsm-odoo 9340f7460e [IMP] website, web: add "h" accesskey for home menu in community
Following the work on accesskeys on the website side with [1], there is
in fact no reason to have this in enterprise and not in community.

[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660

closes odoo/odoo#49717

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-22 12:48:31 +00:00
Aaron Bohy ae4c9d1eca [FIX] web: toggle optional column in list with owl component
Have a list view with an Owl field component (e.g. widget="badge"),
visible. Open the optional field dropdown and make another field
visible.

Before this commit, the '_onToggleOptionalColumn' handler was
executed twice, because two click events where triggered: one on
the label, and one on its associated input (because of the for
attribute, see [1]).

As a consequence, the new field was added, and directly removed
from the view. This could even cause subsequent crashes.

The difference between an Owl component and a legacy widget is
that the Owl component is async (more than a nextTick) as we wait
for the nextAnimationFrame to render. When the rendering is fast
enough (e.g. without Owl components), the click event isn't remap
to the input yet (because we empty the list HTML node), so the
handler is executed only once.

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label

Issue reported on task 2204306

closes odoo/odoo#49920

X-original-commit: b02d347e8770835ad28a6487071930a904bce101
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-22 07:50:00 +00:00
Christophe Monniez cc871698fa [FIX] web: improve click_everywhere timeout message
When an element is clicked during the test and a tiemout occurs, message
that appears in Odoo logs is not really clear.

closes odoo/odoo#49907

X-original-commit: 0e1545c52fdca6d311a18533d3d4efed984df329
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-22 06:45:42 +00:00
Aaron Bohy 5a4a779faf [FIX] web: qunit assert: doesNotHaveClass
Before this commit, the result of our custom qunit assert
'doesNotHaveClass' was incorrect when it was called with
several classnames.

For instance
  assert.doesNotHaveClass(<span class="a"/>, 'a b');
passed, whereas it shouldn't.

closes odoo/odoo#49892

X-original-commit: c40fc67a130ae8e0f061a89d3a21d2507a0f9ae3
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-21 17:01:01 +00:00
Prakash Prajapati edeb86705b [FIX] web: fix the scroll issue of kanban view with search panel
Currently in kanban view which contains search panel when user click
on kanban dropdown menu then a dropdown menu will be hidden due to
scrollbar of kanban view.

This issue arises from this commit:
https://github.com/odoo/odoo/commit/a95cbbd631a2fa9be62eb42cba43e853fdf4b789

closes odoo/odoo#49791

Task-id: 2204306
Closes: #47586
X-original-commit: d613bb8ba4f5a4d818592a80f4aee2ef67916bc0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-20 12:15:03 +00:00
Julien Mougenot f50c3298bb [FIX] web: set selection fields' default value in custom filters
Before this commit, the 'selection' fields were treated like 'char' fields in the
"Add Custom Filter" menu of the control panel's filter menu. This meant that their
value was defaulted to "".

Now, the default value of a selection field is its first selection value.

closes odoo/odoo#49772

X-original-commit: 62b62570725bc8eb3d3fa77fd1e8efd7a4fb5d2b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-04-20 09:28:21 +00:00
Lucas Perais (lpe) 4c1feefd13 [IMP] web: Numeric fields can be non-formatted
This commit introduces a new option in fields inheriting from type Numeric
which is `format`.

By default, Numeric fields are formatted according to their subtypes and locale
Adding, in a view, the option format set to a falsy value
will prevent the field's value from being formatted.

```
<field name="int_field" options="{\'format\': false}"/>
```

Task 2050119
2020-04-17 13:56:08 +00:00
Julien Mougenot 7ace5a986a [FIX] web,lunch: separate search panel domain
Before this commit, the SearchPanel widget was given a single unified domain coming
from the view/controller. The issue was that some modules injected additional leaves
in this domain and there was no way to remove them/separate them from the original
view/controller domain.

Now, another paramater (the `viewDomain`) is given to the SearchPanel, containing
the distinct domain related to the view. The Lunch module has been adapted to give
the `location` domain through this new key.

Note that some tests steps had to be inverted since the method retreiving the
domain of the view/controller is asynchronous (needed by Lunch to give time to the
model to be loaded). It mainly concerns the RPC order which does not matter in this
case.

Task 2239706

closes odoo/odoo#49720

X-original-commit: e895e553899933be14c8abfd8c676b44a7f534d8
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-17 14:21:02 +00:00