Commit Graph
118506 Commits
Author SHA1 Message Date
Adrian Torres c002e2eb37 [IMP] allow installing demo data post db init
Intended for demo / throwaway databases only

Task-ID: 1856493
2018-07-11 13:06:00 +02:00
RomainLibert 5bf5d45b7d [DOC] dashboard: add help attribute and mention count_distinct
Documentation needed some update
2018-07-11 13:02:54 +02:00
qsm-odoo 6bd601475f [IMP] web_editor, *: edit all pictures on double click
* website_sale

Images which were related to a model's field were able to be edited
by a simple click on them. This prevented the use of the "Customize"
menu and was inconsistent with the edition of "normal" pictures which
occured on double click.

task-1859807
2018-07-11 10:37:16 +02:00
qsm-odoo eb662e6463 [IMP] web_tour: allow simulating double-click and triple-click 2018-07-10 17:51:56 +02:00
RomainLibert aac843df17 [IMP] web: add auto sorting on measures in pivot and graph views
* Split documentation of graph and pivot views
 * Add an alphabetical auto sorting on measures in pivot and graph views

The pivot view should have it's own documentation since it is an
independant view.

We want to improve the user experience with graph and pivot views, the
measures were not sorted in any particular way hence they were displayed
in what looks like a random order. We chose to order them in an
alphabetical, making it more usable.
2018-07-10 12:39:44 +02:00
RomainLibert a1c422d2de [DOC] pivot,graph: add documentation on alphabetical sort
As pivot and graph measures are now automatically alphabetically sorted,
we need to update the documentation
2018-07-10 12:25:52 +02:00
RomainLibert 9509238079 [DOC] split graph and pivot documentation
Pivot view documentation was still inside the graph view documentation
as it was previously only a mode of this graph view.

As the pivot is now an entirely different view, it has the right to have
it's own documentation.
2018-07-10 12:25:24 +02:00
RomainLibert dc75248b89 [IMP] web: sort measures in graph view and pivot view 2018-07-10 12:25:24 +02:00
Rémi Rahir b87a95b6d6 [FIX] sms: proper translation in JS 2018-07-09 15:56:01 +02:00
otakuto fe74610f45 [FIX] base: typo
Closes #25662
2018-07-09 15:34:32 +02:00
otakuto 9bce03612d [CLA] Tact Yoshida signs Odoo CLA
Done at #25662
2018-07-09 15:34:32 +02:00
qsm-odoo 2c966909e2 [FIX] *: fix some side-effects of https://github.com/odoo/odoo/commit/9de1bc0eef6f5bfaa2a8d745431caa361ae91548
- JS Modals were not correctly built anymore, their .modal-body element
  was duplicated and many without-effect JS lines were introduced (as a
  side effect, the form view design was broken when inside modals)

- Tests were changed to make bugs go unnoticed. For example, the media
  dialog functionnality was entirely broken because the .modal-dialog
  element was not receiving the correct class anymore.

- The JS translation function is _t, not _

- Do not use the <title/> tag as a regular DOM element, it is meant to
  be unique, in the <head/> section

- CSS rules were added to the utils.scss file, which is meant to contain
  functions and mixins, otherwise, the rule is duplicated in every asset

- Some icons were still broken, as missed by https://github.com/odoo/odoo/commit/f90cf060a3cfeb37a67bec83264c0aaab8892b56

- Tests were changed to use [role="dialog"]/footer/header in their
  selectors without any reason, this commit restores some of that to
  avoid rebase conflicts with the BS4 work.

- ...

Note: other elements should still be discussed, like the direct use of
the 'o_form_label' class in views definition... but those do not cause
direct problems.
2018-07-09 11:59:30 +02:00
Fabien Pinckaers 49a905321a [IMP] sale_timesheet: remove unnecessary sudo 2018-07-09 10:19:33 +02:00
Olivier Colson a33961f229 [REF] account: recipient bank account available in payments
This field is somewhat generic, as anyone could want to specify it and as it is used by several batch payment methods. It is thus now factorized in the core module.
Enterprise module 'hr_expense_sepa' is thus not needed anymore as its code can be put in hr_expense

Was part of task 33323
Was PR #25562
2018-07-09 09:24:11 +02:00
Adrien Dieudonne a548e77b6f [FIX] web: groups of filters ordered correctly
In the filters menus, the order of groups of filters comming
from the search view arch was not always preserved in the filters menu.
This commit fixes that situation.

forward-port of @4094f755
2018-07-06 15:39:06 +02:00
Mathieu Duckerts-Antoine dc1904d3ab [FIX] web: manage correctly deletion of facets
This commit fixes many synchronization problems between search view bar
and the filters and groupby menus.

forward-port of @94c027efd
2018-07-06 14:30:40 +02:00
Adrien Dieudonne 3ebff1f472 [MERGE] *: Easy date filters
This commit allow to create easily a range of periods (related to a field
of date or datetime type) to select in the filters menu.

Two new attributes on elements with tag 'filter' are now usable
in combination in a search view arch:

- date: string.

		A valid field name with associated type date or datetime

- default_period: string (optional).

		To choose in the following list:
			- 'today'
			- 'this_week'
			- 'this_month' (default)
			- 'this_quarter'
			- 'this_year'
			- 'yesterday'
			- 'last_week'
			- 'last_month'
			- 'last_quarter'
			- 'last_year'
			- 'last_7_days'
			- 'last_30_days'
			- 'last_365_days'

Example:

<filter string="Creation Date" name="period_generator" date="create_date" default_period="this_quarter"/>

Note: the attribute 'domain' can not be used for such filters.
The generated domains are dynamic and can be saved as such
via the favorites menu.

task-10532
2018-07-06 14:22:58 +02:00
Rémi Rahir f9a68d5e77 IMP] sms: improve readability of the widget 2018-07-06 14:15:56 +02:00
Mathieu Duckerts-Antoine 11b7857af6 [DOC] web: improve documentation of search view 2018-07-06 14:09:09 +02:00
Géry Debongnie f9874b2b04 [IMP] *: adaptation of search views
It is now possible to easily filter data using periods of time
(e.g. Creation Date: This Week). This adds greater flexibility to the search
view and has made some old filters become useless. In this commit, we alter
the search views in order to profit of the new framework possibilities.
2018-07-06 14:09:09 +02:00
Mathieu Duckerts-Antoine 097464de6f [IMP] web: easy selection of a period in filters menu
This commit allow to create easily a range of periods (related to a field
of date or datetime type) to select in the filters menu.

Two new attributes on elements with tag 'filter' are now usable
in combination in a search view arch:

- date: string.

		A valid field name with associated type date or datetime

- default_period: string (optional).

		To choose in the following list:
			- 'today'
			- 'this_week'
			- 'this_month' (default)
			- 'this_quarter'
			- 'this_year'
			- 'yesterday'
			- 'last_week'
			- 'last_month'
			- 'last_quarter'
			- 'last_year'
			- 'last_7_days'
			- 'last_30_days'
			- 'last_365_days'

Example:

<filter string="Creation Date" name="period_generator" date="create_date" default_period="this_quarter"/>

Note: the attribute 'domain' can not be used for such filters.
The generated domains are dynamic and can be saved as such
via the favorites menu.
2018-07-06 14:09:09 +02:00
Géry Debongnie 9756109e67 [IMP] web: add tz_offset function in python eval context 2018-07-06 14:09:09 +02:00
Mathieu Duckerts-Antoine 5d3f42a9ad [IMP] web: implement assemble domain utility function
In this commit, we implement a function which allow to combine
a list of domains into a single normalized using a 'OR' or an
'AND' operator.
We also refactor slightly py_utils.
2018-07-06 14:09:09 +02:00
Géry Debongnie 0194d85b67 [IMP] web: implement normalize domain utility function
In this commit, we implement a function which normalize a domain
represented as a py.js syntax tree.
2018-07-06 14:09:09 +02:00
Géry Debongnie 3248498f48 [IMP] web: implement formatAST utility function
In this commit, we implement a function which format a py.js abstract
syntax tree into a string.  This is really useful whenever we need to
manipulate python expressions.
2018-07-06 14:09:09 +02:00
Géry Debongnie eed4d586a0 [REF] *: rename web.pyeval into web.py_utils
The pyeval name is quite confusing, given that there is already an eval
and an evaluate function in py.js, and that the web.pyeval exports two
evaluate functions.

Since this file is more about odoo specific customization to py.js, it
is renamed in py_utils to better express its intended use.
2018-07-06 14:09:09 +02:00
Géry Debongnie dcc4d71623 [REF] web: move some code from pyeval to lib py_extras
Some functions that were in web.pyeval were actually "odoo independant".
To make them easier to manage/understand, this commit move them in the
library py.js, as an extra file.
2018-07-06 14:09:09 +02:00
Mathieu Duckerts-Antoine 64f3580af7 [IMP] web: add support of modulo in pyeval 2018-07-06 14:09:09 +02:00
Mathieu Duckerts-Antoine c71148cc70 [DOC] web: amelioration of inline documentation 2018-07-06 14:09:09 +02:00
Christophe Simonis 8a1dad3da4 [MERGE] forward port branch saas-11.4 up to 8db9865c2d 2018-07-05 20:11:59 +02:00
Christophe Simonis 8db9865c2d [MERGE] forward port branch saas-11.3 up to 2214bffefb 2018-07-05 19:33:14 +02:00
Christophe Simonis 2214bffefb [MERGE] forward port branch saas-11.2 up to 45329c0cf2 2018-07-05 18:53:17 +02:00
Christophe Simonis 45329c0cf2 [MERGE] forward port branch 11.0 up to 84210074e5 2018-07-05 17:21:01 +02:00
wangting d4578794a8 [CLA] signature for tanghulu0608
Closes #25625
2018-07-05 16:30:57 +02:00
Christophe Simonis 84210074e5 [MERGE] forward port branch saas-15 up to b06c09db60 2018-07-05 16:23:47 +02:00
Christophe Simonis b06c09db60 [MERGE] forward port branch saas-14 up to 92e5da6b8f 2018-07-05 15:35:24 +02:00
Martin Trigaux a978a3647a [FIX] mail: multi-company access to TZ
- Create 2 Companies A & B
- Set User B in Company B
- Record some `mail.activity` for User B on a lead belonging to Company
  B.
- With a manager user in Company A, go to Kanban view of leads and
  remove filters => all leads, including leads in Company B, are
  displayed

An access error occurs.

`read_progress_bar` method, tries to access the field `activity_state`
which is: `states = record.activity_ids.mapped('state')`. The state of
a `mail.activity` is using the tz of the partner. To read the
`activity_state` of a lead, one needs to access
`record.activity_ids.user_id.partner_id.tz`
=> multi-company security rules raised

opw: 1850984, 1859470
2018-07-05 15:29:34 +02:00
qdp-odoo 73d664f7f7 [FIX] l10n_generic_coa: bank statement demo data 2018-07-05 15:28:55 +02:00
Christophe Simonis 92e5da6b8f [MERGE] forward port branch 10.0 up to 26e7d5d8ee 2018-07-05 15:05:21 +02:00
len-odoo 7764db7a34 [FIX] web: handle onchange on a on2many with an embedded one2many on multiple pages
Suppose there is a one2many field embedded in a one2many,
(say we are viewing record A with one2many field B itself with a one2many C).
Furthermore, there is a second page of the one2many field B.
If an onchange is applied on B, then the server replies with a 1 command for all
B records attached to the currently viewed object A.
This includes a list of commands [[5], [4, C_id]*] for each B record,
in particular B records that are on the second page.
Since they are on the second page, they might not have been fetched by the
frontend; in that case the corresponding C_ids are thus unknown.
As a consequence, on save the frontend sends a command 0 to create the records
for all unknown C_ids.
Since it doesn't have any value to give to the 0 command, the row creation
usually crash in the backend.

Another wrong behaviour is fixed at the same time: if the server sends an update
on the list of C ids with 4 commands.
In that case, if the record has not been prefetched, we have no way to know
if the list changed or not.

To solve this, when we receive the 4 commands by the server, we send back 4
commands.

coauthored by @aab-odoo

opw 1835936
2018-07-05 15:03:37 +02:00
Christophe Simonis 26e7d5d8ee [MERGE] forward port branch 9.0 up to b5c50fa824 2018-07-05 14:19:33 +02:00
Géry Debongnie a1778ed5a1 [FIX] web: make the kanban view wait on async field widgets
Before this commit, the kanban view ignored the fact that a field widget
could be asynchronous.  Worse, some preliminary support was done in
kanban record, but this would crash if an async widget was used.

With this commit, we properly synchronize the kanban
records/columns/renderer.  If for some reason a widget needs to be
added to the DOM before it is ready, it can simply returns an empty
value in the willStart/start methods.
2018-07-05 14:08:04 +02:00
Alexandre Kühn 7af09db878 [FIX] web: no concurrent reload on basic model
Before this commit, there was a traceback in the following scenario:

Let's have a kanban view with groupby and a domain.
If we clear the domain then clear the groupby, there could be a crash.

This crash occurs because when we clear the groupby, it performs a `reload`,
and assumes that the datapoint contains grouped data. However, if this
computation takes some time, it is possible to overwrite the datapoint so that
there is no longer grouped data.

This commit fixes the issue by enforcing at most 1 execution of the method
`reload` active at any time. Consequently, successive reloads operations are
now much slower.

Note that it uses the single non-reentrant mutex on the basic_model to enforce
this rule, which means:

  - No more concurrent `reload` and `save`.
  - If an execution having the mutex in `reload` come accross the same mutex,
    it is blocked forever. This is hopefully not the case at the moment,
    however a reentrant mutex should be considered in the future.
2018-07-05 14:04:33 +02:00
Nicolas Lempereur b27d009ab4 [FIX] barcodes: documentation in description
The barcodes modules had documentation only available on apps.odoo.com,
following a recent change, odoo modules are not displayed on
apps.odoo.com anymore.

Thus this commit merges the documentation onto the module description so
it is available on the module page.

opw-1846035
closes #25621
2018-07-05 13:00:28 +02:00
Romain Derie 21f1a593a1 [FIX] website: new content links not triggered
Clicking outside the new content options should close the overlay.
Every options are triggering a JS event (mostly opening a modal) that works
fine.

But the 'New Job offer' options is simply a href link which is not going
through anymore since there was a call to `preventDefault`.

opw-1860196
2018-07-05 12:42:01 +02:00
Christophe Simonis b5c50fa824 [FIX] core: set up registry before running migration scripts
As `pre-` migration scripts may use the registry, we must ensure that
all fields are set up before execution in order to have a consistent
registry.

This is required when loading a registry which contains modules to
install/upgrade without `-u` flag. In this case, the setup was only done
*after* module loading.
2018-07-05 12:26:28 +02:00
Pierre Masereel 6bdc654176 [FIX] stock: fix api multi method
Method was using self instead of line in the loop for.

introduced in rev: https://github.com/odoo/odoo/commit/ba5918ffcbe5fe9155308c53e014e5e93c588ca6
2018-07-05 10:54:25 +02:00
jem-odoo ceaa6562a5 [FIX] hr_timesheet: dynamic domain when encoding timesheet
To have a better encoding timesheet, we want for the user:
1/ when selecting project first, the task proposed will be
the ones in the project. When changing project, it reset the
task to empty.
2/ when selecting the task first, the project will be the
one from the task
2018-07-05 10:16:42 +02:00
Gert Pellin b7bcbddccb [imp] fleet: Allow to filter/group by Make on vehicles
Add grouping possibility on model make for vehicles in the fleet.
Deleted redundent controll on make image for vehicles if model changed.
fixed _name_search for FleetVehicle

project : RD for Dummies
task : [Fleet] Allow to filter/group by Make on vehicles
2018-07-05 09:45:17 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

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

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00