Commit Graph
9525 Commits
Author SHA1 Message Date
XavierDo a4dfa6e354 [FIX] web, website: fix tests giving 404 error
-Some tests where moved without addapting the path to them:
path is now update and tests fixed.

-A picture was removed in commit 4dce6cc98b but
still referenced in template website_twitter_snippet.

-A test was missing a data leading to the wrong path to image beeing loaded
2018-08-22 14:41:02 +02:00
Sébastien Theys 416b810eb5 [FIX] web: prevent textarea vertical resize on chrome
Since we correctly compute the height of the field, we don't want to let the user resize it vertically.

This was already working on Firefox because it doesn't require the field to be in the DOM to read the resize attribute, but Chrome does require the field to already be in DOM.

Task: 1869469
PR: #26518
2018-08-22 14:10:06 +02:00
Christophe Simonis 4f62d6dd8f [MERGE] forward port branch saas-11.4 up to ef6b574eda 2018-08-22 12:02:30 +02:00
Sébastien Theys 14b9e9c92d [FIX] web: give correct size to o2m textarea at init
Before this commit, a textarea inside a one2many would only have the correct size after focus or on change.

When we select a line, we want all of the textarea of the line to have the correct size even if they are not directly focused.

Task: 1869469
PR: #26430
2018-08-22 11:51:30 +02:00
Sébastien Theys 289adeb63f [FIX] web: properly resize textarea when its value changes
Before this commit, a textarea would not resize when its value changed if the event was different than "input" or "focus".

This commit fixes it by also listening to the "change" event, and by triggering it at appropriate times.

PR: #26430
Task: 1869469
2018-08-22 11:51:30 +02:00
Sébastien Theys 4310b11df5 [FIX] web: compute the correct height for textarea autoresize
The box-sizing property was not correctly taken into account.

- content-box is the standard behavior: border and padding are added after the height
- border-box needs attention: border and padding must be included into the computed height

Task: 1869469
PR: #26430
2018-08-22 11:51:30 +02:00
Sébastien Theys 241704536d [FIX] web: allow o2m navigation to work from required inputs
In a one2many, pressing ENTER or TAB from a required input (of type text or char) that is on the last editable column of its line would fail to navigate to next line.

The issue was that the validation of the required field would happen before the change to its value was actually applied.

This commit fixes it.

PR: #26430
Task: 1869469
2018-08-22 11:51:30 +02:00
Demaret Rivarola Johan 46bfe9ad65 [FIX] project: kanban examples modal
- tab not showing: fade animation was causing the issue.
- redirection to home: button instead of anchor to avoid
redirection to target href

Task #1878160
2018-08-22 11:23:26 +02:00
Christophe Simonis ef6b574eda [MERGE] forward port branch saas-11.3 up to 6cc7d3f945 2018-08-21 18:48:13 +02:00
Christophe Simonis 6cc7d3f945 [FIX] web: correct test view option name 2018-08-21 17:36:34 +02:00
Christophe Simonis 70d0148d0d [MERGE] forward port branch 11.0 up to fbfb91799e 2018-08-21 16:58:17 +02:00
Vandan ShahandMohammed Shekha f4ee61f950 [IMP] web: mobile: add swipe support in form views
This rev. allows to navigate, in mobile, through records in form
views by swiping.

We also moved mobile-specific tests involving a form view to the
mobile test suite, since those tests became async because of the
lazy loading of the swipe lib (in the mobile suite, that lib is
already loaded).

Related to task #34727

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-08-20 21:11:54 +02:00
qsm-odoo 340d1654f2 [FIX] web: BS4, add a btn-secondary border for community style 2018-08-20 17:46:46 +02:00
Adrien Dieudonne 634de21b76 [FIX] web: graph_renderer: check graph data before rendering
Before this commit, we had two different errors when data was
unavailable:
The first one is generated by Odoo: "No data to display, try to[...]"
The second one is generated by nvd3: "No Data Available".

We always want the same message.
So now, we always make some checks before rendering
the graph by calling _render.
2018-08-20 16:10:25 +02:00
Aaron Bohy fd2ff51ba3 [FIX] web: Dialog: do not open fullscreen by default
Introduced by a105e5f2. Doc was ok, code wasn't. This feature is
for mobile only, and for now it is restricted to ViewDialogs.
2018-08-20 14:45:49 +02:00
Deep Patel 287501abbc [FIX] web: restore many2manytags colorpicker dropdown
Bug revealed with BS4.
2018-08-20 13:40:20 +02:00
Adrien Dieudonne fb35180ee8 [FIX] web: test in graph_tests
previously added in 102a63b815
2018-08-20 12:53:40 +02:00
Adrien Dieudonne 102a63b815 [FIX] web: graph_renderer: check graph data before rendering
Before this commit, a crash occured when you tried to load
a bar chart without any data.
Example in Purchase -> Reporting.

Since this commit 3d2ca810, we do some data processing without
checking if data exists.
To fix this, we have to always makes some checks before rendering
the graph by calling _render.
2018-08-20 11:11:59 +02:00
Siddarth Gajjar c0629cd757 [FIX] web: BS4, restore statusbar "more" dropdown 2018-08-19 16:57:14 +02:00
Dharmraj JhalaandMohammed Shekha a105e5f208 [IMP] web,various: Add 'Remove' button to view dialogs opened from x2m fields
Currently, to remove link of x2m field from any record, sometimes there's no way.
For example, if we are on mobile and open any Quotation, it's linked quotation lines
are automatically converted in kanban, and there is no way to delete a line from
that quotation. However, in some of the manually designed kanban, there is special 'x'
for removing / unlinking x2m record, for example, Contacts of Partner.

This commit makes the behavior more consistent. During edition (mobile and desktop), if
a view dialog is opened on click of x2m field, it will have one 'Remove' button (based
on user rights) on right side of dialog footer, allowing users to delete / unlink the
record. Moreover, in mobile, the modal is opened fullscreen, with sticky header and
footer.

Related Task# : 31641
Closes PR #15857

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-08-17 18:18:53 +02:00
Alexandre Kühn ccd94a1588 [REV] "[FIX] web:tests: do not rely on testUtils.patch in tests"
This reverts commit f1a0a32e46.

This utility function has been fixed with commit 1edea9326c
2018-08-17 16:21:39 +02:00
Alexandre Kühn 1edea9326c [FIX] web: tests: correctly unpatch classes
Before this commit, `testUtils.unpatch` was incorrectly
unpatching a class' properties.

That is caused by restoring the properties on the class
function itself, instead of the prototype of the class
function.

This commit fixes this issue by restoring properties on the
prototype function of the class on `testUtils.unpatch`.
2018-08-17 16:20:06 +02:00
Nicolas Lempereur d409ab6f32 [FIX] web: open group in list => keep line selection
You:

- open a grouping in a list view
- check a line of this grouping
- open another grouping

=> all checkbox are unchecked

With this commit, 0982ceaa is improved so the selection is only reset
when the list has been reloaded.

opw-1865736
closes #26213
2018-08-17 15:33:40 +02:00
Mehul Patel dc5462db51 [FIX] web, google_spreadsheet: BS4, fix arrow issue in search filters 2018-08-17 12:46:14 +02:00
Hiral Bhavsar b0c4245df7 [FIX] web: BS4, restore calendar view's sidebar filters checkbox
Currently cross sign not appearing inline to checkbox while hovering
sidebar filters and checkbox tick/untick not working properly.
2018-08-17 12:46:14 +02:00
Deep Patel 0bcd71a54a [FIX] web: BS4, fix stat button color issue 2018-08-17 12:46:14 +02:00
qsm-odoo 9d30113356 [FIX] web: BS4, restore dropdown active colors 2018-08-17 12:46:14 +02:00
Alexandre Kühn ff4901e429 [DOC] web:tests: add docstring for testUtils.patchDate 2018-08-17 12:37:36 +02:00
Simon Lejeune 3fa2ca0779 [FIX] web: no_open in field options no longer working
example: <field name="product_id" options="{'no_open': True}" readonly="1"/>

This has been broken by rev. 43d21dd9c due to misplaced parentheses
(an empty object in javascript being truthy).
2018-08-17 11:24:27 +02:00
Mathieu Duckerts-Antoine 3ec6624754 [FIX] web: time range menu flickering
The search view always instantiates a time range menu but hides it
when it is not used.

Now, when the time range menu is not used, every time the search view
facets are rendered, the time range menu is also rendered entirely
and becomes visible shortly before being hide again. This caused
a bad screen flickering.

This commit fixes that problem by avoidind the unnecessary rendering of
the time range menu.
2018-08-17 10:26:31 +02:00
Alexandre Kühn f1a0a32e46 [FIX] web:tests: do not rely on testUtils.patch in tests
Revision on https://github.com/odoo/odoo/commit/10f43955d81ff3e7b5ab050656b312ec19f927c5

Commit above uses `testUtils.patch` in the test.
However, this utility function does not seem to work.

That sucks...
2018-08-16 18:38:49 +02:00
Alexandre Kühn 10f43955d8 [FIX] web: render JournalDashboardGraph when in DOM
The lib 'nvd3' renders graph when they are attached to the
DOM. However, widgets are rendered in fragments and
appended to the DOM when ready (to prevent flickering).

Before this commit, we used a `setTimeout(0)` and cross
fingers that the widget was attached to the DOM when the
`render` method was called.

With this commit, the render method is called when it is
attached to the DOM.

Task-ID 1868252

Closes #26410
2018-08-16 16:52:56 +02:00
Mathieu Duckerts-Antoine db1eec2851 [FIX] web: tooltips in filters menu
There were tooltips on period options in the submenus of
filters menu. With the switch to Bootstrap 4, the html
structure of filters menu has changed (no more 'ul') and has
altered the way the menu items are rendered causing the
disparition of tooltips. With this commit, the tooltips come
back.
2018-08-16 12:11:14 +02:00
David Monjoie 726a356045 [IMP] web: add/remove from favorite outside of i tag
When paced inside the i tag, the text used to inherit from the
style of the star, which means the text was yellow when starred.
2018-08-16 11:19:26 +02:00
David Monjoie d2e2d05f08 [FIX] web: BS4 fix modal footer buttons margin 2018-08-16 11:19:26 +02:00
Fabien Pinckaers 47dd142221 [IMP] hr_expense: misc bugfixes and usability cleaning
Search, form views and menu cleaned
Hide attachment button when you can not attach (record not created)
Allow to submit multiple expenses of different payment mode
list: show creation date on reports, accounting date for accountants
2018-08-15 21:14:28 +02:00
Fabien Pinckaers 810ef6767c [FIX] web: test on mobile view action manager 2018-08-15 00:53:30 +02:00
Fabien Pinckaers 69e38dcf35 [IMP] base: remove carret on debug mode icon 2018-08-14 22:45:13 +02:00
Fabien Pinckaers 7aff231690 [IMP] web: improve mobile view switcher 2018-08-14 22:43:10 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Laurent Smet c99eb1b8fb [ADD] account: import vendor bills files from dashboard
This adds a button to import several bills from the accounting dashboard: will create a new vendor bill for each, with the file attached to it. That file will be visible in the chatter (in enterprise) and allow easilly completion/encoding of it. This task also comes along with the import/export of xml files attached to the PDF files created from the invoice report.

Was task 1859277
Was PR #26339
2018-08-14 16:40:39 +02:00
Adrien Dieudonne 60733264fa [FIX] web: dataComparisonUtils: replace Math.sign ES6 function
Math.sign(comparisonValue) * comparisonValue being equivalent to
Math.abs(comparisonValue) in all the cases that we consider, we use
the latter formulation that is available in ES5.
2018-08-14 15:25:53 +02:00
Nhomar Hernández c77d4effc4 [IMP] web: Better view fields for debug mode.
When you need to fast review all properties of a model, mostly the
fields it is really anoying go to all the technical path which has all
the information already.

The previous "View Fields" action was very messy.

My proposal is simply instead use a dialog which is almost useless open
a normal vie (a little improved) which allow us audit completely
everything.

Remove the previous dialog, this will not be used anymore.

Closes #26364
2018-08-14 13:59:59 +02:00
Dharmang Soni 4dfabb8f7a [IMP] web: FieldSelection: no empty value if required
From this rev., the empty value isn't available in the options of
required selection fields, thus preventing the user to unset it.

Related to task #49262
Closes #24404
2018-08-14 13:51:07 +02:00
Francois Volral 8527b01f23 [IMP] web: Pie Chart Widget
This commit brings a Pie Chart Widget that allows to visualize
simple information on in a single pie chart.

For now it is only used in dashboard view but it could also be
used in another view that uses a basic renderer.

An element with tat widget with attribute name 'pie_chart'
can now be added to the arch view.
Three keys should also be provided in the attribute 'attrs':

	- measure (determines the field to aggregate on)
	- groupby (determines the field used to group data)
	- title (determines the legend of the pie chart)

Task Id: 1835644
2018-08-14 12:37:44 +02:00
Mathieu Duckerts-Antoine ad0a758b75 [FIX] web: autocompletion in the new search view
A lot of new features have been implemented in search view
but autocompletion was forgotten. This commit fixes many
small problems that were introduced:

	- synchronization of facets created through
		autocompletion with filters and groupby menus
	- filters created through autocompletion can be saved
2018-08-14 12:37:44 +02:00
Adrien Dieudonne 89931d1749 [IMP] web: comparisons in graph view
A previous commit [333ac27] has introduced a new widget TimeRangeMenu
that allows to create two sets of data to compare relatively
to a given date or datetime field.

This commit allows the graph view to render appropriately two
sets of data as would be expected in the different modes.

Task Id: 1835644
2018-08-14 12:37:36 +02:00
Adrien Dieudonne d4461cd434 [IMP] web: comparisons in pivot view
A previous commit [333ac27] has introduced a new widget TimeRangeMenu
that allows to create two sets of data to compare relatively
to a given date or datetime field.

This commit allows the pivot view to render appropriately two
sets of data in a unique table. In comparison mode, instead of
one column, three columns are created. One contains the
aggregates from the data of interest, one contains the
aggregates from the comparison data, and the last one contains
information on the data variation (expressed in percentage).

Task Id: 1835644
2018-08-14 12:37:25 +02:00
Mathieu Duckerts-Antoine 333ac27cd5 [IMP] web: new TimeRangeMenu widget in search view
This commit introduces a new widget 'TimeRangeMenu' used in
the search view. It allows a user to easily:

	- search data with a given date or datetime field value
		in a specified period of time

	- compare the data of interest with data of the previous
		period or the previous year.

The time range menu is available in the search view when one
of the four following view types is instantiated:
graph, pivot, cohort, or dashboard.

Task Id: 1835644
2018-08-14 12:30:51 +02:00