Commit Graph
126133 Commits
Author SHA1 Message Date
XavierDo 62591c58f8 [FIX] mail: add ability to mark failure notification as read
The mark as read button was not working for mail failure. More than that,
we wanted a functionnality to be able to massively mark mail failure as canceled,
especially to be able to clean databases from failure after migration.

Task: #1860054
PR: #25622
2018-07-11 12:25:33 +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
Odoo Translation Bot e8fc62ec74 [I18N] Update translation terms from Transifex 2018-07-11 10:16:33 +02:00
XavierDo 1b323e8b17 [FIX] calendar: fix attendee status filter
An event was shown in today's meeting if another attendees wasn't
in decilned state, even if the current user declined the event.

Task: #1858076
PR: #25544
2018-07-11 10:11:14 +02:00
XavierDo dea80d7c9c [FIX] calendar: take user timezone into account for todays meeting
The end of day depends of the user timezone.

Task: #1858076
PR: #25544
2018-07-11 10:11:14 +02:00
XavierDo f74f5edc77 [FIX] calendar: correct domain computation for recurring events
The custom computation for domain applied on recurring event
was assuming that a leaf value was true. This can lead to miscomputation.

Context:
For a domain like
'|',
	('start', '>=', '2018-06-28 23:59:59'),
	('allday', '=', True),

the domain will be transformed into
'|',
	'|',
		('start', '>=', '2018-06-28 23:59:59'),
		'&',
			('recurrency', '=', 1),
			('final_date', '>=', '2018-06-28 23:59:59'),
	('allday', '=', True],
In order to fetch recurring event with date that COULD match the domain.

Then, the custom evaluation will filter the generated virtual ids with
the base domaine, replacing leaf not specific to bounds by true,
leading to a domain like:
'|',
	('start', '>=', '2018-06-28 23:59:59'),
	True,
Also well known as "True"
Therefore, all recurring event virtual ids will be kept.

Solution:
This fix proposes to fetch the leaf values from the database to ensure
the consistency of the domain.

Thanks to RLI for the help.
Task: #1858076
PR: #25544
2018-07-11 10:11:14 +02:00
Martin Trigaux 97dbb8c6af [I18N] l10n_*: correct bad %s
opw-1853119
2018-07-11 09:04:53 +02:00
qsm-odoo eb662e6463 [IMP] web_tour: allow simulating double-click and triple-click 2018-07-10 17:51:56 +02:00
Luis González 2d0621da05 [CLA] fix date format of Vauxoo's agreement
According to the CLA signing instructions, the date of signature must be
expressed in the following form:
> `<date>`: current date in the form `YYYY-MM-DD`

However, the date was wrongly expressed as "9-2-2015". That date not
only was following an incorrect format, but also it was ambiguous,
because it was not clear if the format was following M-D-YYYY or
D-M-YYYY (the latter one being the case).

This fixes the format, so it now fits the required one.

Closes #25665
2018-07-10 17:35:09 +02:00
gmarcon baf6b29d45 [FIX] web: build xls file with maximum size
An MS Excel file can have maximum 32767 characters

Fixes #25653 
Closes #25700 

https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3
2018-07-10 16:25:04 +02:00
Martin Trigaux 00a55f4428 [FIX] service: properly invalidate session of deteled users
If a user A deletes the res.users record of user B while B is connected,
the verification of the session token fails with a comparison of a boolean and
bytes values.
While the check should obviously fail, this patch gracefully inform the user B
its session has expired and redirect him to the login page.

Without the patch, the session is never invalidated in the user browser,
redirecting to a forbidden error page as long as the session has not been manually
cleared from the browser.

Fixes #25530
Closes #25654
Closes #25682

Cherry-Pick of 96f01c08f8
2018-07-10 16:03:23 +02:00
Alexandre Kühn 212ed85ac4 [FIX] mail: upload again a same file on the composer
Before this commit, it was not possible to upload again a file on the
browser from the composer, when it was added then removed from the attachments.

When a file is uploaded on the browser, it writes on a special input
some data to identify this file. In order to detect a new upload,
the code listens on the JQuery event `change` on this input. Since the
value of this input was not cleared after an attachment removal, the
user couldn't reupload the same file, because the value of the input
will be unchanged.

This commit solves this issue by clearing the special input when removing
an attachment, so that adding the same file again will trigger a `change`
on this input.
2018-07-10 15:30:30 +02:00
Alexandre Kühn fb98bb009a [FIX] mail: remove attachment when clicking on white cross icon
Before this commit, we could not remove an attachment in the composer
by clicking on the white-cross icon that is shown on mouse hover.

This was due to the handler function picking the wrong DOM element
as target for reading on the attachment ID: it should pick the target
of this handler function, and not the specific target below the mouse
on click. For instance, let's consider this HTML snippet for the button:

    ```
    <div class='delete' data-attachment-id=100>
        <span class='cross-icon'>X</span>
    </div>
    ```

where the handler function is called when clicking on `div.delete`.

When we click on `span.cross-icon`, it triggers the handler function
of `div.delete`. The MouseEvent object contains the following property
values:

    - `target`: the `<span>` element
    - `currentTarget`: the `<div>` element

The handler function of `div.delete` deletes an attachment by looking
into the `data-attachment-id` attribute of `div.delete`. It should
always pick `div.delete`, even when the user clicks on `span.cross-icon`.
2018-07-10 15:25:02 +02:00
len-odoo ddb68eb1bb [FIX] crm: handle selection fields correctly while merging leads
When merging two or more leads, a traceback was generated when attempting
to merge some selection field, if any.

closes https://github.com/odoo/odoo/issues/25644

opw 1864870
2018-07-10 15:05:56 +02:00
Goffin Simon 371a92fb30 [FIX] hr_timesheet: Removing task on a timesheet line
Steps to reproduce the bug:

- A product is configured as a service + invoicing policy as "Timesheet on task" + Create a task in an existing project.

- Create a SO with this product and confirm it.

- Go to the task, and create a timesheet on it, the delivered quantity on the SO is correctly updated.

- Now, go to the Timesheets app and remove the task from the analytic line.

Bug:

The Delivered quantity on the Sale Order was not updated.

PS: The case where so_line is in the values is already taken into account by the overwrite of
function write in addons/sale/models/analytic.py

But as task implies so line (as explained in addons/sale_timesheet/models/account.py in function _timesheet_preprocess),
the delivered qty of a so line must be recomputed when its task is modified.

opw:1864313
2018-07-10 13:52:31 +02:00
Martin Trigaux 96f01c08f8 [FIX] service: properly invalidate session of deteled users
If a user A deletes the res.users record of user B while B is connected,
the verification of the session token fails with a comparison of a boolean and
bytes values.
While the check should obviously fail, this patch gracefully inform the user B
its session has expired and redirect him to the login page.

Without the patch, the session is never invalidated in the user browser,
redirecting to a forbidden error page as long as the session has not been manually
cleared from the browser.

Fixes #25530
Closes #25654
Closes #25682
2018-07-10 13:49:41 +02:00
Christophe Simonis e354142ce7 [MERGE] forward port branch saas-15 up to c22e479246 2018-07-10 13:21:06 +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
Christophe Simonis c22e479246 [MERGE] forward port branch saas-14 up to 5d8076c842 2018-07-10 12:22:55 +02:00
Lucas Perais (lpe) cd5c10a47f [FIX] website_sale_delivery: we should be able to pay if the order only contains services
Two use cases must work:
Should hide payment AND display errors when order contains deliverable product

Should show payment AND not display errors when order contains only services (event tickets)

Linked OPW 1864744
Linked PR v11.0 #25679
closes #25692
2018-07-10 11:54:01 +02:00
Lucas Perais (lpe) 7384401e63 [FIX] website_sale_delivery: we shouldn't be able to pay if there is no delivery method
Have some delivery method that do not apply to the country of the customer

Before this commit, the customer could access the Pay now button and confirm the sale

In v10.0 this was impossible as the retrieval of errors in python wiped out the variables that would
make the xml element of the payment not to render
In v11.0 this has changed in a more modular manner

After this commit, we hide the element in html.

OPW 1864744

Two use cases are dealt with:
Should hide payment AND display errors when order contains deliverable product

Should show payment AND not display errors when order contains only services (event tickets)

Linked v10.0 PR #25692
closes #25679
2018-07-10 11:51:00 +02:00
Christophe Simonis 5d8076c842 [MERGE] forward port branch 10.0 up to 5e682451cb 2018-07-10 11:30:59 +02:00
Christophe Simonis 5e682451cb [MERGE] forward port branch 9.0 up to 8b25099aea 2018-07-10 11:25:27 +02:00
RomainLibert e08f999468 [FIX] calendar: add onchange on start_date and stop_date
When creating an event using the list view, no value is set in the
fields start and stop.

If selecting all day, we could only change the value of start_date and
stop_date which does not change the value in start or stop.

This makes it impossible to create an event from the list view.

This problem is not present in the calendar view since this view sets a
value in start and stop, and the start and stop are recomputed via the
inverse fields.

Closes #25680
2018-07-10 11:14:16 +02:00
Martin Trigaux 24e01664d4 [IMP] doc: add javascript example
Document changes like b87a95b6d6
2018-07-10 10:03:43 +02:00
Andreas Perhab 8b25099aea [FIX] auth_oauth: validate db against db_filter 2018-07-09 18:55:11 +02:00
Florent de Labarre 95990a31b4 [FIX] ir.autovacuum: should be executed by the admin
Closes #23453
2018-07-09 18:55:10 +02:00
Nicolas Lempereur 940246f583 [FIX] web: remove Work+Sans online font import
The Work+Sans font of google fonts was hotlinked and available in
reports since saas-14's 3d04e448.

There does not seem to be a reason to do it and:

- hotlinking may add resources usage / processing time,

- server need outside internet access or the font doesn't load,

- it has been reported to cause the header/footer of some pages to
  disappear, probably because of a problem with loading the content in
  a given delay to render it.

- it was always loaded for report, even if used only once among all the
  reports of Odoo

For these reasons, this commit removes the hotlinking of this font.

The ISR report of l10n_ch that used this font will thus fall back on
'Verdana', 'Geneva' then the default sans-serif font which doesn't
seem to be a drawback over 'Work Sans' font.

If at one time we should reintroduce it, it should be contained in the
given report and possibly have the font locally and not externally.

opw-1861368
closes #25683
2018-07-09 15:56:48 +02:00
Rémi Rahir b87a95b6d6 [FIX] sms: proper translation in JS 2018-07-09 15:56:01 +02:00
Lucas Perais (lpe) c288830409 [FIX] website_gengo: adapt JS to v11 editor
Before this commit, the widgets of website_gengo were not adapted to the new translate and web editor

After this commit, they are adapted

Although, gengo_sandbox of res.config would need to be redefined as related to company_id.gengo_sandbox. It has been done in saas-11.2

OPW 1862013
closes #25647
2018-07-09 15:34:34 +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
Martin Trigaux dc0914b8a5 [FIX] web: allow getting session_info as non-authenticated
The call to /web/session/authenticate should return an empty session_info
in case of wrong login/password.
It was producing a traceback (due to self.ensure_one() and search)
Introduced at d1cd293ece and fdb250942

Fixes #24071
2018-07-09 13:35:14 +02:00
qsm-odoo 7f5a633c2e [FIX] *: fix some side-effects of https://github.com/odoo/enterprise/commit/3d6c7b95b94f23c6e0e0b088e3291e9bf323fc4a
See https://github.com/odoo/odoo/commit/2c966909e2c0b5e45912a6ff85577f0b19a5f4c9
2018-07-09 12:02:50 +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
Lucas Perais (lpe) 5fc392e34a [FIX] account: revert reconciled payment with exchange difference entry
Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25592
2018-07-09 10:07:36 +02:00
Lucas Perais (lpe) 42e74aae51 [FIX] account: revert reconciled payment with exchange difference entry
This is essentially a backport of 7544c22de9
and
4f40c9da7b

Company is in USD
Do an invoice in EUR with a specific rate (and post it)
Do a payment on this invoice with another rate (and post it)

revert the payment's move

Before this commit, the move_lines of the original/reverted move pair were not reconciled
to one another
This could cause problems in some reports (aged reports for example)

After this commit, the lines in the original/revert move pair are reconciled
provided that they *can* be reconciled
Which is either belonging to a reconciliable account, or to an account of type liquidity

OPW 1861273
closes #25600
2018-07-09 10:05:18 +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
Lucas Perais (lpe) 67b5cde62b [FIX] point_of_sale: new session should open with user as cashier
Open a new session with user A, the cashier is A.
Close the session and post the entries.
The responsible for the session is user A and the salesman on the sale order is A.

Then log in to the database with user B.
Open a new session on the same pos.

Before this commit, the cashier on the second session was A

After this commit, the cashier on the second session is B

OPW 1864207
closes #25628
2018-07-09 09:04:20 +02:00
jem-odoo 937c2fc708 [FIX] sale_timesheet: remaining calculation in plan project
The computation is badly implemented. Wrong
data struture used at the wrong moment.
This commit fixes it: remaing hour in overview
is SOLD qty - DONE qty (sum of timesheets).

Task #1857652
2018-07-09 08:51:09 +02:00
Odoo Translation Bot 8b20e7f416 [I18N] Update translation terms from Transifex 2018-07-08 07:13:34 +02:00
Odoo Translation Bot d6a71fae93 [I18N] Update translation terms from Transifex 2018-07-08 04:09:36 +02:00
Odoo Translation Bot 33b698254a [I18N] Update translation terms from Transifex 2018-07-08 00:26:19 +02:00
Thibault Delavallée 91486656ab [FIX] mail: log correct user deleting the record
When using sudo, the administrator is logged as deleting the action.
For audit reason, log the correct user.
To avoid access rights errors, only group system can delete the action.
2018-07-07 17:35:42 +02:00
Thibault Delavallée 6033439c67 [IMP] website_mail: allow per-module override of token_field
Instead of forcing a token field through an override, set it at the class level
to be changed in other model inheriting from the MailThread
2018-07-08 09:04:42 +02:00
Simon Lejeune e5984fbfc3 [FIX] base: strengthen ir.attachment access rights
An ir.attachment record can be served as a request's reponse if:
  - a request triggers a 404
  - the ir.attachment record has its url field matching the url of
    the failed and is of binary type

Following rev[1], portal users have the right to create these kind of
records, and it is a security concern.

This patch restrict the ability to create and write on the ir.attachment
records that may be served through the dispatch's exception mechanism to
settings users.

As the asset bundles files are served through the use of these special
ir.attachment, we make sure to retrieve only ir.attachment records
created by the superuser in the `get_attachment` method.

As website administrators often need to play with these special
ir.attachment, we also let to this group the permission to manage them.

[1] 61065b6d04
2018-07-29 14:10:42 +02:00