Commit Graph
9502 Commits
Author SHA1 Message Date
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
Mathieu Duckerts-Antoine 3523694b6c [IMP] web: add a patchDate function in testUtils
This function allows to properly mock Dates in js Tests
2018-08-14 12:30:51 +02:00
Cocographique 4dce6cc98b [IMP] website, *: review snippets and colors
* web, web_editor, website_hr_recruitment, website_mail_channel,
  website_mass_mailing

- Review all snippets and add new ones
- Add lots of new options
- Use odoo colors as default theme colors

task-38878
2018-08-13 18:30:01 +02:00
Christophe Simonis b75e007122 [FIX] web: check emptiness of attribute using lodash
Attribute may be undefined.
2018-08-13 17:35:20 +02:00
Martin Geubelle 9030781a51 [REF] web: Kanban: allow to override on_close callback
It could be useful to override this callback to, for example, reload the whole
kanban view.
2018-08-13 17:09:28 +02:00
Christophe Matthieu 9eef25ae0a [FIX] web: can focus out then focus in when currently being selected
Before this fix, in studio when the user select the field then focus out
then focus in and selected a child field, an exception is triggered because
the last page is visible but the data are removed.
A test in enterprise (web_studio) is added with this commit.
2018-08-13 17:09:28 +02:00
Christophe Matthieu 8f7fdb0d99 [FIX] web: fix JavaScript qweb and activate tests
Fix the issue of the t-esc display the content before the tag.
Activate qweb qunit test (same test for the JavaScript and python)
Use the same behavior as python: keep attributes order, and display content
as default value when the variable is falsy.
2018-08-13 17:09:28 +02:00
Christophe Matthieu 61eef73b52 [IMP] base, *: use a many2one for the company report layout
Before this rev. one could set the report layout on the company using a
hardcoded list (background, clean, standard, etc.). Other modules (typically
accounting modules) could add options in this list. The used template was built
on the layout key.

Now, the layout is a many2one field to a newly created model `report.layout`,
which is linked to a view with the layout architecture.

This gives more control to customize reports and create a new layout (without
creating a python module that extend the layout selection).
2018-08-13 17:09:28 +02:00
Christophe Matthieu 79a0f401a4 [IMP] web: add options to dragAndDrop test util function
There is now an option `continueMove` that can be used to extend a previous drag
done in this function.

The option `position` has also been extended to take an object (to precise the
move position).
2018-08-13 17:09:28 +02:00
Christophe Matthieu 4d3a776389 [IMP] web: avoid failed tests affecting the next ones
When using positional clicks (among other examples) in tests, a previous failed
test might affect a next one because the assert failures are displayed on the
top of tests.
2018-08-13 17:09:28 +02:00
Christophe Matthieu 8f216482b8 [IMP] web: propagate many2many attributes to the sub FieldMany2One
The FieldMany2ManyTags uses FieldMany2One in its implementation.
Before this commit, the field attributes were not propagated to the sub field.
In particular, the attribute `can_create` is useful to be propagated.
2018-08-13 17:09:28 +02:00
Christophe Matthieu 6ca026119e [IMP] web: add method to convert JS domain into python condition 2018-08-13 17:09:28 +02:00
Martin Geubelle 7f4b4f86bd [IMP] web: add MutexedDropPrevious in concurrency
This new helper is meant to solve the following use case: serialize a number
of concurrent rpcs while skipping the rpcs that arrive in between the mutex.
2018-08-13 17:09:28 +02:00
Martin Geubelle 971629b9fe [IMP] web, web_tour: handle iframe in tests and tour
In both test util functions (`dragAndDrop`) and tours, using elements in iframe
was not supported.

As a jQuery selector won't work with an iframe, when using a selector like
`div.o_my_class iframe p:first` the tour manager will split the selector, which
will result to `$('div.o_my_class iframe').contents().find('p:first')`.
2018-08-13 17:09:28 +02:00
Christophe Matthieu bae6494520 [FIX] web: apply css border to the table 'th' like the 'td' 2018-08-13 17:09:28 +02:00
Vincent Schippefilt c38290a3c9 [IMP] web: add text decoration classes 2018-08-13 17:09:28 +02:00
Christophe Matthieu 32b269d3d5 [IMP] web: add default option to DomainSelector
This option is used to set a default domain value when creating a new node
(instead of [['id', '=', 1]]).
2018-08-13 17:09:28 +02:00
Christophe Matthieu 061175e598 [IMP] web: add more filtering and sorting options on ModelFieldSelector
A new `filter` option has been added to filter fields with an optional function.
A new `order` option has been added to sort displayed fields.

The `followRelations` options have also been extended to take a function.
2018-08-13 17:09:28 +02:00
sri-odoo 6494d115e5 [FIX] web, mail: navbar & systray colors + badge alignment 2018-08-13 14:46:47 +02:00
sri-odoo 323cfddcde [FIX] web: BS4, main component grayscale
BS4 blue-ish grayscale is ok for text, borders and shadows but it's too saturate for main components with solid background (eg. control panel and body bg).
This commit will use a desaturate version of the same colors.
2018-08-13 14:46:47 +02:00
sri-odoo 0a29522da6 [IMP] web: kanban record, fill image design
Add a new record layout that make the image compensate the record
padding and fill the available space.
2018-08-13 14:46:47 +02:00
jem-odoo 58e4a58427 [MERGE] hr_timesheet: log timesheet in any time UoM
Since uom management has been extract in a separated module, we
can now add the possibility to use it without product.

This commit brings the ability to record the timesheets in
an different UoM than 'Hours'. The user can now set an encoding
UoM for its timesheet on the company. This will display the
timesheet field `unit_amount` with a different widget.
For instance, timesheeting in hours will still use
the traditionnal float_time widget, when timesheeting in 'Days'
will displayed a toggle button with a range of defined possible
values.
The widget used by UoM is customizable on the UoM. The `unit_amount`
field should now be decorated with the 'timesheet_uom' widget.
This one will bind the correct widget (float_time, float_toggle, ...).
If the encoding UoM has no widget associated, the fallback will
be 'float_factor', using the uoM converstion factor.

Everything will still be stored in the database in 'Hours' (the
UoM set on the `project_mode_time_id` field on the company).

For more details, please have a look at the subcommits.

Task #39079
Closes #24893
2018-08-13 14:40:28 +02:00
Nicolas Bayet c410b7b4e7 [IMP] web: Add option on 'Datepicker' to warn when setting date in the future
Purpose
=======

There's no generic way to display a warning message if the user tries to set
a date in the future.

Specification
=============

Add this new feature on the datepicker (in web module), and use it account. For
example for the invoice date on the invoice/vendor bills form view.

TaskID: 1868221
2018-08-13 14:36:36 +02:00
jem-odoo 1f72644c44 [IMP] web: float_factor and float_toggle widgets
This commit provides new js widgets for list, kanban and form
views on float field.

1/ 'float_factor' displays the normal float field, but takes a
conversion factor as option. The displays value is the normal
one multiplied by the factor.

You can use the widget like
<field name="my_float_field" widget="float_factor"
option="{'factor': 2}"/>

2/ 'float_toggle' displays a button (in edit mode) looping on a
range of given value at each click. A conversion factor is optional
(default will be 1) to display a converted value, but sent to
non converted one to the server.

You can use the widget like
<field name="my_float" widget="float_toggle"
option="{'range': [0, 0.5, 1], 'factor': 2}"/>

'range' and 'factor' are put in the options.
In simple read mode, the widget display the value as a traditionnal
text (like a normal char field).

This commit provides tests and documentation for those 2 widgets.

Task #39079
2018-08-13 14:33:48 +02:00