Commit Graph
110587 Commits
Author SHA1 Message Date
Christophe Simonis 32a35ccda5 [MERGE] forward port branch 10.0 up to 45e2ee0a9b 2018-05-22 15:19:10 +02:00
Christophe Simonis 45e2ee0a9b [MERGE] forward port branch 9.0 up to 0fd06e5948 2018-05-22 14:23:55 +02:00
Randall Castro 42fb77ceba [FIX] l10n_cr: backport of 9da8378a0a
[FIX] l10n_cr: adapt state code

Change res.country.state code to follow ISO 3166-2:CR
https://www.iso.org/obp/ui/#iso:code:3166:CR

Backport asked at #24673
2018-05-22 14:05:21 +02:00
Odoo Translation Bot b6419117d9 [I18N] Update translation terms from Transifex 2018-05-20 00:26:31 +02:00
Joren Van Onder 0fd06e5948 [FIX] pos_mercury: set the paid amount to what is authorized by Mercury
Mercury can partially approve transactions in case a card does not
have enough credit available to cover the full amount.

Before this the payment amount was kept as the full purchase amount
leading to a difference between what Mercury charged and what Odoo
registered as charged.

opw-1840946
2018-05-18 13:23:08 -07:00
Christophe Simonis cabe0951af [MERGE] forward port branch 10.0 up to 9001a75f23 2018-05-18 18:53:56 +02:00
Carlos Dauden 9001a75f23 [IMP] analytic: Performance on _compute_debit_credit_balance
Courtesy of Carlos Dauden.
Was PR #24660
2018-05-18 17:39:00 +02:00
Christophe Simonis bfda65d894 [MERGE] forward port branch 9.0 up to 612fd33fb1 2018-05-18 16:19:21 +02:00
Christophe Simonis 612fd33fb1 [FIX] http: correct protocol parsing 2018-05-18 16:15:55 +02:00
Fabien Meghazi c60b22335b [FIX] base: honor registry/cache signaling for multiple threaded servers
Before this patch the registry and cache signaling was only activated
for PreforkServer. In case Odoo was deployed in a multi process/multi
threaded architecture the signaling was not ensured, causing registry
de-synchronisation amongst threaded servers.
2018-05-18 14:20:35 +02:00
Lucas Perais (lpe) abda3464ed [FIX] web: get_file handles arbitrary AND serialized exceptions
Commit bcd4c90 was intendend to make get_file handle uncaught/unserialized exceptions
in the context of a http request

The drawback is that when get_file received a serialized exception (route: /report/download)
the JS modal was empty in that case

This commit handles both the cases

OPW 1848606
closes #24794
2018-05-18 13:03:31 +02:00
Fabien Meghazi 866d1e7190 [FIX] server: fix support for systemd socket activation in threaded server
This patches fixes the untested and broken draft of inetd and systemd
activation support in the threaded server.

This patch also fixes the loss of the process environment in the
`_reexec()` function when Odoo is respawning during the following events:

    - SIGHUP signal is received
    - one click install has been triggered
    - code reload needed when using `--dev=reload`
2018-05-17 18:38:13 +02:00
Goffin Simon a16114efb4 [FIX] mrp: Two fields with the same label on stock.move
The field quantity_done_store had the same label as the field product_uom_qty
on model "stock.move" and there were confusions in the pivot view of
"stock.move".

opw:1841097
2018-05-17 09:54:37 +02:00
Lucas Perais (lpe) cd26eb8e7c [FIX] l10n_fr_fec: EcritureLib should not be empty
Make an account move with two move lines.
In those lines' label, just hit the space bar, and post your entry.

Now, get the FEC report.

Before this commit, the EcritureLib field was empty

After, it has the value '/'

closes #24734
2018-05-17 09:24:31 +02:00
Lucas Perais (lpe) 54d1b38844 [FIX] point_of_sale: repair cashier from localStorage on refresh page
open a pos,
change cashier
hit F5

Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69
- In v10.0 the commit 475027b
    (For v11.0: a9caef0)
    Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
    But it did this using the wrong condition

After this commit, it reworks fine

OPW 1844006
related #24762

closes #24764
2018-05-17 09:15:24 +02:00
Christophe Simonis a1a03792b6 [MERGE] forward port branch 10.0 up to bcf20cfbec 2018-05-16 17:10:28 +02:00
Raphael Collet bcf20cfbec [FIX] stock: use timedelta instead of relativedelta
Suppose we have a delta between two datetimes:

    delta = dt1 - dt0

If delta is negative but less than a day, ``delta.days`` returns -1 (which is
compensated by positive seconds).  In order to avoid this surprising effect,
use ``delta.total_seconds()`` to compute the number of days.
2018-05-16 16:25:03 +02:00
Christophe Simonis 82b15e06ce [MERGE] forward port branch 9.0 up to 9db6dfa25d 2018-05-16 15:54:08 +02:00
Xavier ALT c22d3f6732 [FIX] web: widget char_domain should pass context to selection dialog
In case we define a field like,

<field name="my_domain" widget="char_domain" context="{'active_test': False}"/>

when selecting records the dialog should display all records (as asked by the
context), but it's not the case.

This commit ensure the field context is passed to the selection dialog.

opw-1831902
2018-05-16 14:18:17 +02:00
Christophe Simonis 9db6dfa25d [FIX] event_sale: update registrations as sudo.
Consequence of 19878d011f

Backport of fb17edd0b0
2018-05-16 11:05:16 +02:00
len-odoo 47cc4fbbab [FIX] auth_signup: add missing dependency on the computation of the signup validity
The field signup_valid is a non stored computed field based on signup_token.
The cache is filled with prefetched values, so in a loop the field is read from
the cache and not recomputed due to the missing dependency.

opw 1843442
2018-05-16 09:01:14 +02:00
Christophe Simonis a50e7aa366 [MERGE] forward port branch 10.0 up to 13fc77daf4 2018-05-15 17:44:34 +02:00
Christophe Simonis 13fc77daf4 [MERGE] forward port branch 9.0 up to 19878d011f 2018-05-15 16:51:34 +02:00
qdp-odoo 6558d52e9b [FIX] account: adjustment wizard usability
This commits removes a disambiguation on the choices of the 'Adjustment Type' selection as 'in your favor' could be achieved by debitting the 'Collected Tax' account or creditting the 'Paid Tax' accounts (respectively for 'in favor of the Estate'). The choices now refers directly to the journal item where the tax is gonna be copied

Related to https://github.com/odoo/odoo/commit/c58ef14a01f600d75391f2a9c38bb2b30e0e2528
Related to OPW 1826242
2018-05-15 16:47:38 +02:00
qdp-odoo d5cf6be26e [IMP] account: make currency_exchange_journal_id field visible in settings 2018-05-15 15:04:17 +02:00
Lucas Perais (lpe) eb6714f59b [FIX] website_slides: slide in fullscreen needs to have the navbar
Display a slide, enter fullscreen mode
Make the navigation bar appear.

Now, try to push on any button of the nav bar

Before this commit, none of the button work
This is because the fullscreen mode is handled by the browser, and won't let any non-fullscreen
elements be interactive

After this commit, the nav bar is part of the element that are in fullscreen
And the button work

OPW 1839503
closes #24522
2018-05-15 09:46:55 +02:00
RomainLibert 19878d011f [FIX] event: fix bug with users
We need to fix a problem with the users where someone might get
informations on registrations.
2018-05-15 09:41:25 +02:00
Nicolas Lempereur c39d40f98d [FIX] hr_recruitment: job stages choosen manually
In 9.0, stages of a job position in recruitment are not share by
default, there is a "New" stage and existing stages can be added in the
form view (since 780f46ae).

When creating a job position, the "New" is not working with the given
widget type.

This commit doesn't show stages in the form view until the record is
created.

opw-1839217
closes #24706
2018-05-15 09:20:59 +02:00
Christophe Simonis da7f280d8f [MERGE] forward port branch 10.0 up to 1bcc856e4c 2018-05-14 20:14:27 +02:00
Christophe Simonis 1bcc856e4c [MERGE] forward port branch 9.0 up to 0450868391 2018-05-14 20:08:31 +02:00
Christophe Simonis 0450868391 [FIX] website: correct GeoIP Legacy compatibility
Attribute is different for country and continent objects.
2018-05-14 19:54:50 +02:00
Denis Ledoux e48767fe65 [FIX] mass_mailing: force to not use a template for the rendering
If the user configures a default `template_id` for
the `mail.compose.message`,
this template was used by the mass mailing to render the email,
and, among others,
it therefore used the `email_to` of this email template,
to render the recipients,
and it was configured empty or something else than `object.id`,
it did not used the `active_ids` passed in the context to the
`mail.compose.message` `create` call to compute the correct
recipients

To reproduce:
 - In developer mode (?debug)
 - Open the full mail compose message
   e.g. in app sales, open a so, hit new message,
   and hit the button to open the full message composer
 - Set the template to the quotation template is not there already
 - In the debug menu of the dialog, View > Set defaults,
 - Click the radio button to all users, and the default to Use template = ...
 - Then, try to send a mass mailing. It will fail because it cannot
   compute the `email_to` values correctly because the `email_to`
   of the quotation template is empty.

opw-1840287
2018-05-14 16:48:20 +02:00
Christophe Simonis 5274a62037 [MERGE] forward port branch 10.0 up to 7b1362ac55 2018-05-14 11:51:18 +02:00
Nicolas Martinelli 3579bd53be [FIX] hr_expense: account on expense
- Set a specific expense account on an expense product
- Send an email to the expense alias

The specific expense account is not used; a default account is used
instead.

opw-1838174
2018-05-14 11:37:32 +02:00
Christophe Simonis 7b1362ac55 [MERGE] forward port branch 9.0 up to 1dae7ea1d6 2018-05-14 11:29:57 +02:00
Nicolas Lempereur 5bb7ffa20e [FIX] web_editor: ignore range error on Restricted
In firefox, if we have a range on eg.:

  `<input type="file">`

and we tabulate to get to it, we have the range over:

  `<button type="button" tabindex="0">Browse…</button>`

which seems to be a "virtual" element inside the `<input/>` but this
magic element is "Restricted" and causes error such as:

  `Permission denied to access property "nodeName"`

So this fix ignore errors when getting a range from current selection on
keyup.

opw-1819279
closes #24524
2018-05-14 11:16:20 +02:00
Lucas Perais (lpe) 3416d4a798 [FIX] point_of_sale: user on invoice same as on order
Open a pos session with a user A
Change cashier to user B

Make an order with invoice

Before this commit, the salesman of the order was user B
but the salesman on the invoice was A

After this commit, both invoice and order have user B as salesman

OPW 1844175
closes #24642
2018-05-14 09:27:09 +02:00
Lucas Perais (lpe) 3a09c06f8c [FIX] point_of_sale: sale details report should display the internal ref of products
It seems that in v8 the internal reference (the code) of the product
was displayed in the sales details report of the pos

This commit put that field back on the report

OPW 1844776
closes #24641
2018-05-14 09:23:11 +02:00
Odoo Translation Bot bc54fc47bd [I18N] Update translation terms from Transifex 2018-05-13 00:25:38 +02:00
Nicolas Lempereur 1dae7ea1d6 [FIX] web_editor: inline space in source code
Backport of 57f7c68106
2018-05-11 11:06:05 +02:00
Goffin Simon 475027b988 [FIX] point_of_sale: Set the correct cashier
After reopening the session in the POS by another user,
the cashier was not correctly identified.

Back-port of this commit: a9caef0ebb

opw:784422
2018-05-09 16:06:51 +02:00
Christophe Simonis 4431c8c843 [FIX] website: GeoIP Legacy compatibility
Some IPs (like google-proxy ones) are not bound to a specific country.
Legacy Database used to set country_code to 'EU' for these one. geoip2,
on contrary, does not set the country. Read information from `continent`
attribute in this case.

opw-1844888
2018-05-09 11:40:56 +02:00
Nicolas Lempereur d595e3a258 [FIX] tools: mail transcoding css space consistent
The transcoding of a mail (transforming CSS into inline styles on the
element nodes of the mail) used the form:

 property:value;

So when a mail is saved, it would be eg. with `style="property:value;"`
and when it is being edited "property:value" is removed if available via
CSS stylesheet given the structure.

But the sanitize_style (introduced in bfe7aafa7) adds an espace before
the value (which is more pretty but was probably not choosen in
transcoding to decrease size of mail):

 property: value;

so the inline style would not be removed when editing possibly causing
conflict with the editor.

With this commit, the sanitize_style doesn't add a space. It could have
been changed in transcoding but the code is already rather slow and we
don't want to use a regex replace or two string replace instead of the
current one string replace.

opw-1841107
2018-05-08 16:46:23 +02:00
Nicolas Lempereur b739e65940 [FIX] web_editor: optimize big mail transcoding
The browser may throw an error when a big mail such as one with
hundreds thousands of tags is being transformed to have a style
more compatible with mail clients.

The error would be:
 "Uncaught RangeError: Maximum call stack size exceeded"

This happens in jquery because we hare too many nodes (there is an
ongoing issue at https://github.com./jquery/sizzle/issues/403) so this
commit replace that part by a DFS traversal over DOM nodes.

There was also an issue that not having the option "style-inline" would
still cause some style code to be ran albeit it was intended not to be
solved in 55c7d2d5b0.

opw-1841107
closes #24550
2018-05-09 12:35:40 +02:00
Christophe Simonis 1813f42dbc [MERGE] forward port branch 10.0 up to 14f59f4b78 2018-05-08 16:23:54 +02:00
Christophe Simonis 14f59f4b78 [MERGE] forward port branch 9.0 up to 468e2e454e 2018-05-08 14:51:36 +02:00
Denis Ledoux da6b4add23 [FIX] account: avoid cache invalidation at the opening of an invoice
* Avoid to invalidate the cache if no actual deletion has been
made when recomputing the taxes

* Avoid to create analytic entries to delete them right away
few lines further in the same method:
 - Analytic entries are created at line 903
   - account_invoice.py:751 `move_line_dict['analytic_line_ids'] = [(0, 0, line._get_analytic_line())]`
   - account_invoice.py:840 `iml = inv.invoice_line_move_line_get()`
   - account_invoice.py:886 `line = inv.group_lines(iml, line)`
   - account_invoice.py:894 `'line_ids': line,`
   - account_invoice.py:903 `move = account_move.with_context(ctx_nolang).create(move_vals)`
 - Then, at line 907, they are deleted and others are created again:
   - account_invoice.py:907 `move.post()`
   - account_move.py:130 `move.line_ids.create_analytic_lines()`
   - account_move.py:1258 `self.mapped('analytic_line_ids').unlink()`
   - account_move.py:1262 `self.env['account.analytic.line'].create(vals_line)`
  Deleting these analytic entries indeed implies the invalidation of the cache.
  Besides, generally speaking, we should avoid to waste resources
  by creating/unlinking records without a good reason.
2018-05-07 17:02:02 +02:00
Denis Ledoux a8ab14a672 [FIX] stock: prevent to create the reception route over and over when deleted once
When the reception route of a warehouse company is deleted by the user
e.g. My company, Chicago Receipt in 1 step is deleted,
and then changing the given warehouse `Incoming Shipments`
multiple times
e.g. from `one_step` to `two_steps` multiple time,
the reception route is created again and again and again.

This is because the reception route which is created for the
warehouse is not being assigned to the warehouse
as the `reception_route_id` once newly created.

opw-1836544
2018-05-07 17:02:02 +02:00
Christophe Matthieu b8006bfb1c [FIX] mail tools: html_sanitize must keep useful styles from mass mailing
Issue: The clean removes too many tags so emails sent do not resemble the
preview.

opw-1841138
opw-1841105
2018-05-07 15:34:40 +02:00
Josse Colpaert 468e2e454e [FIX] sale: creating invoice name from SO ref
Steps to reproduce the bug:

- Create a SO with 2 lines and confirm it
- Set a Customer reference on the SO with "This is, a ref"
- Deliver it
- Create an invoice from it with all the invoicable lines

Bug: The name of the invoice was: "This is, a ref, This is, a ref"

Expected behavior: The name of the invoice is: "This is, a ref"

opw:1840738
2018-05-07 15:19:32 +02:00