Currently tooltip goes out off the screen when the
graph view (in line mode) presents a large number
of groups.
The present commit splits the tooltip content in
three columns when the number of groups exceeds
20. This split is not done in mobile mode because
it is not an appropriate in that situation.
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Related to Task: 1917958
closesodoo/odoo#30288
In graph line mode, min and max abs are
displayed beyond the screen when there are less
than 3 abs.
This is happening because nvd3 fixes their
text-anchor to 'middle'. The present commit fixes
correctly their text-anchors to start and end
respectively by using the '!important' rule (it
seems difficult to do otherwise).
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Related to Task: 1917958
make sidebar filter generic
Adding `res_model` and `res_fields` attributes on a field of
a calendar view adds a filter in the sidebar.
It saves the result as the defined model and should save it
in the defined field.
However `partner_id` has been hardcoded in the rpc call that creates
the record. This breaks genericity, it cannot be used with another
field than `partner_id`.
This commit makes this generic by correctly setting the field name
in the rpc call.
closesodoo/odoo#31858
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Ildar Nasyrov <iledarn@gmail.com>
The widget has been moved in rev. odoo/odoo@15f3bbe but was not very generic.
In particular, there was a traceback when clicking on the button if the field
had no value (the button was displayed for readonly fields in create mode).
The button is now only appended in readonly mode (a `button` inside an `input`
or a `textarea` is not very DOM friendly) if the field has a value.
Task 1941996
closesodoo/odoo#31635
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The style of a link (color) of a many2one is only applied over the
first line (probably for eg. the partner on an invoice that has the
partner name and on following lines the address).
In some instance this make some sense, but on other (the name of a
product is too long from where it is) it makes no sense and seems buggy.
With this change, we have the link style over the whole link which seems
good enough.
opw-1947113
closes#31568
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Switch to French language
- Go to Inventory > Inventory Adjustment
- Launch an adjustment
The field 'Real Quantity' doesn't follow the float formatting.
This is because the widget is set as `field_float_scannable`, which is
not recognized by the formatting function.
Since the widget descriptor has priority over the type descriptor, we
must explicitly take this widget into account, on top of adding the
`format_value` method.
opw-1940884
closesodoo/odoo#31366
On a pivot view with a default filter which has column and row groupbys
Remove the filter
Collapse all columns and rows
Activate another Filter from favorite which has a column groupby at least
Before this commit, the columns were not displayed in the DOM, though RPC's
and internal data were actually correct
This was because we considered the changes had been done "in place"
taking the old tree to build the new one for the columns
when really, we should have recomputed the column tree
After this commit, the columns display the group we want
OPW 1935155
closesodoo/odoo#31247
It has been decided to use Chart.js instead of nvd3 to render charts.
In this commit the graph view has been largely rewritten to benefit
from the options offered by Chart.js.
Task ID: 1946138
This commit extends the support of comparison mode for the graph view
and refine the tooltips and rendering in line mode.
The graph view code has also been slightly refactored.
Task ID: 1946138
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.
Before this commit, the 'on_attach_callback' method of a subwidget of
the form renderer would not be called when the renderer renders
itself but is already in the dom. This can cause problems when a
subwidget has to know if it is in the dom for its own rendering.
This commit fixes that situation.
Before this commit the value of a field (of date/datetime type)
used as a groupby was not correctly formatted in the test environment
when the granularity was 'quarter'. This commit fixes that situation.
Old subwidgets of a widget inhereriting from BasicRender were not
correctly destroyed. This was the cause of various problems when
cycling over this.widgets.
Task #1891970
Original p. configurator commit d3530eb
Purpose
=======
- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
The widget is only used on the added "product_template_id" field on the SO line.
This widget controls the opening of the configuration window and removes the need of a "Configure a product" button.
The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.
The widget is also responsible for handling the configuration provided by the p. configurator form
and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.
- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
- 'MULTI' allows to batch multiple operations at once
- 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field
Spec
=======
- remove "configure a product" from sale order lines
When the product configurator is active, replace the product_product_id by a product_template_id
in the sale order line. When we select a template without variants, it sets the variant automatically,
but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
- Invert image and configuration in the main screen
- If the product doesn't have an image, hide it instead of showing the placeholder (only for first screen?)
- new independent option in sales settings to activate product configurator.
(same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
The attribute is true by default, but when it is set to `false`
in a test, it was not correctly passed in the view.
Note that it has no impact currently in the tests.
closesodoo/odoo#32175
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This feature was already working in the actual version of Odoo but it is now tested. The following
features are supported:
- When the value of one widget is modified, the other ones change accordingly
- The modifiers 'invisible' and 'readonly' are applied correctly if they differ between widgets.
However, the modifiers 'required' must be equal for the several fields, otherwise the behavior
is not guaranteed.
closesodoo/odoo#32158
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Rev. odoo/odoo@5c6a7c9 made a change to reuse an old group datapoint when
performing a read_group, instead of restoring *some* properties of the old
group (so basically a `_.omit` instead of a `_.pick`).
This is a bad idea as some properties were bound to the new datapoint
(`evaluateModifiers` for example) so it doesn't make any sense to update
the old datapoint with theses properties.
closesodoo/odoo#31956
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
A fix attempt for the clickEveryWhere test was made in 39e71353c5.
Unfortunately, the last modification of the fix were not tested on the
runbot and introduced two new issues.
1) The click method on the home menu has been changed to use an enhanced
_click function. This function crash when the jquery element is empty.
As this menu does not exists in community, the test miserably fails.
2) A "focus" event was added in the _click function that simulates a real click.
But the "focus" event is not a mouse event and as nothing to do there.
With this commit, the _click function returns immediatly when the
element is empty.
Also, the "focus" event is removed from the _click
simulation but a focus method is used to give focus to the close button.
Giving the focus to the cancel button is itself a fix for the
DateTimePicker field (see 39e7135).
closesodoo/odoo#32082
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
During the clickEverywhere test, when a modal is opened, the hide method
is called to bypass it. This is not realistic and does not work in some
cases.
For example in Point of sale, menu "Reporting/Sales Details", a modal is
opened with a DateTimePicker (tempus dominus) already opened.
When hiding or closing the modal, the DateTimePicker needs to perform
some cleanup. If the modal is simply hidden, the DateTimePicker is not
cleanly destroyed.
With this commit, a modal is closed by clicking on its close button and
before that, the focus is set on the close button to let the
datepicker widget do its stuff on losing focus.
Also, a more realistic click is done by trigerring more events (code
adapted from tour helper).
closesodoo/odoo#32038
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Since odoo/enterprise@b830ea7ed2, the enterprise home menu is asynchrnonous.
Because of that, the clientActionCount variable is updated too late and
this counter is screwed up, making the test fail.
With this commit a setTimeout 0 is used to click on home menu in the
next tick and then update the current action count.
Also
* the test is adapted to stop immediately when an error is catched.
* the initial click on home menu is moved into debug manager because
the python test launcher uses the correct location already.
Thanks to @VincentSchippefilt and @aab-odoo
closesodoo/odoo#31949
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When the user has not set any image, it now displays the default
user image placeholder instead of the image placeholder in livechat.
Task-ID 1924666
closesodoo/odoo#30821
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This error is there to help developpers realize their view has not
been loaded due to an error.
However, we have cases where we define actions containing views
that only exist in Enterprise to avoid creating an entire bridge
module just to add one view to an action.
The error was triggered in this case which resulted in a red build
for the click all runbot test, even though this was not really a
true error, as it was intended.
This commit changes the error to only appear in debug=assets such
that it will no longer put the click all runbot tour red while
still providing help for the developper trying to debug his view
since he will need to be in debug=assets to debug his view anyway.
closesodoo/odoo#31884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Let's assume the following scenario on an action with two multi
records views (e.g. kanban and list). In the kanban view, activate
a domain or groupby, switch to list view, remove the domain or
groupby, switch back to kanban: the domain or groupby is still
applied (even though it's no longer displayed in the search view).
This is due to the jQuery update (ab56e637b7) and the use of
native Promises (always async) instead of old jQuery 1.11 Deferreds
(which where sync when already resolved). In the new version, the
domain/context/groupby were added to the params a 'tick too late',
so the view was updated without that information (and thus the old
domain/context/groupby were kept).
Issue reported on the jquery update pad.
closesodoo/odoo#31859
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
After the update of jQuery, crashes were no longer displayed (in
dialogs) on browsers using the unhandled-rejection-polyfill lib
(e.g. firefox). This was due to a bad conversion from ES6 to ES5.
Issue reported on the jquery update pad.
closesodoo/odoo#31767
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
It's better to always have a relevant name in the image URL for SEO.
Also make sure there is always an alt on the image.
closesodoo/odoo#31705
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*partner_autocomplete,test_main_flows
In jQuery 3, the active element in autocomplete dropdowns is no
longer identified with class 'ui-state-focus' on the <li/>, but
with class 'ui-state-active' is on its child <a/>. Moreover, the
background color of the active element is now set on the <a/>
instead of the <li/>.
This rev. adapts scss rules accordingly, and selectors in the
main_flow_tour.
Issue reported on the jquery update pad.
closesodoo/odoo#31693
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Following of https://github.com/odoo/odoo/pull/28457. Promises which
are rejected are acting the same way as exceptions and thus have to be
catched. The Odoo `guardedCatch` method is not stopping the exception
though. In the backend, unhandled promise rejections are catched by the
CatchManager, which then ignore them.
This commit makes the frontend act the same way regarding unhandled
promise rejections. We might want to share the crash manager behavior
someday.
Part of https://github.com/odoo/odoo/pull/31664closesodoo/odoo#31664
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
We had to manually convert the unhandled-rejection-polyfill lib,
and we forgot to replace this by self in two arrow functions.
This was causing crashes e.g. on Firefox.
We also forgot some uses of const, which is not really an issue as
const is supported on all browsers, but it is not ES5.
Issue reported on the jquery update pad.
closesodoo/odoo#31658
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This commit adds a 'guardedCatch' function to the Promise API. This function
has to be used when we don't want to swallow real errors (crashes), like
'catch' does (i.e. basically all the time in Odoo). When the promise has
been rejected because of a real error, the rejected Promises chain bubbles
up to the top and triggers the 'unhandledrejection' event (triggered on
all browsers thanks to the unhandled-rejection-polyfill lib). We then add a
listener on that event to display real errors with the CrashManager.
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>