Commit Graph

95252 Commits

Author SHA1 Message Date
Olivier Dony 6f8efea28c
[FIX] requirements: bump up recommended psycopg2 version
Version 2.7.1 is not yet available in most distributions,
but is now considered the recommended version.

Odoo will work just fine with any psycopg2 version >= 2.2, though.
2017-06-16 15:54:04 +02:00
Olivier Dony 89eca96476
[FIX] anonymization: correct pickle protocol and import 2017-06-15 16:36:05 +02:00
Olivier Dony 090d7a51be
[FIX] auth_oauth: correctly register token field 2017-06-15 16:17:35 +02:00
Olivier Dony d655824028
[FIX] http: force protocol when missing in URL 2017-06-15 16:01:40 +02:00
Olivier Dony eb8d919015
[FIX] sql_db: port fix from psycopg/psycopg2#459
NUL characters must not be used in query parameters,
as they will be ignored by libpq, being end-of-string
characters.

Preventing NULs avoids unexpected results from
queries. It is only necessary with psycopg2
versions before 2.7, which includes the upstream
fix.
2017-06-15 16:01:40 +02:00
Lucas Perais (lpe) 46263eb398 [FIX] stock: backport fix negative quants
Original commit (in 10.0) be9dce625c55e1b2d6039573c7035d61f762edc8

From original commit:
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Also, a key of context has been added which authorizes the process described above in the case of both a tracked product and no lot_id on the stock inventory

OPW 743107
Closes #17167
2017-06-15 08:42:57 +02:00
Joren Van Onder 9f31e50ee9
[FIX] point_of_sale: don't launch Firefox before Odoo has started
When using Wi-Fi the Odoo instance on the POSBox will start after a
Wi-Fi connection is established. This takes a bit longer than when
you're using a wired connection. If Firefox gets started before you
end up with a 'Could not connect to localhost:8069' error.
2017-06-14 14:02:00 -07:00
fwi-odoo 06141c34a5 [FIX] auth_oauth: don't assume that google and facebook providers always exist
Before this commit, it was not possible to reach the general settings when one
of the "default" provider was delete.
After this commit, we don't assume anymore that there are google and facebook
providers.

opw-746907
2017-06-12 15:13:09 +02:00
Nicolas Lempereur ed61da6793 [FIX] base: duplicate company => duplicate partner
The name of a company is uniq. The name of a company comes from a
partner and is required.

Thus duplicating a company didn't work.

With this change, if no partner is overriding the copy, the current
partner is duplicated and associated to the new duplicated company.

opw-746106
closes #17532
2017-06-12 11:14:06 +02:00
xmo-odoo c50745f1a1 [FIX] base_geolocalize: geocode errors out on empty address
It's unclear whether that's a recent change or a long-standing issue,
however currently if geocode is called with an empty address string it
will reply with a 400 Bad Request, which gets raised as an exception and
forwarded to the user. That is not a great experience.

Shortcut the entire thing and just return None (= geolocation failed /
no geolocation) on trying to geolocate an empty address.

OPW-746686

backport of 74a89bcf5c656a0a64f2a699444d39739ff7f1d2
2017-06-09 16:52:31 +02:00
Olivier Dony c6b9b69f6a
[FIX] base_import_module: allow selective access to module files
As a consequence of rev. 76cd8d2558d2a1fc11681dbc4a134ba06fb698c0,
imported modules were unable to access their resource files during
import.

Rather than further modifying the file_open API to whitelist paths
(the whole thing needs a redesign in master), we temporarily
whitelist the temporary directory by including it in the global
addons_paths, making sure to undo it afterwards.

This gives all lower level function access the resource files via
file_open, without having to pass around whitelisted paths
through many different calls.
2017-06-07 22:46:25 +02:00
Olivier Dony d18d606a55
[FIX] tools: verify path before opening 2017-06-02 22:29:47 +02:00
Raphael Collet d0301459ae [FIX] models: no warning when using `api.constrains` on an inherited field
Fixes #17312
2017-06-01 10:15:48 +02:00
Lucas Perais (lpe) 0e1b8e5e81 [FIX] account: aged receivable partner balance
We need to ensure the account move lines we search for in case of partial reconciliation are within the period boundaries

Before this commit, when a partial reconciliation has been made long after others, the date used would have been this former move's
because of the MAX() function introduced by commit 3128e84243
Hence for one period, if that date were to be outside the period boundaries, the entire reconciliation would have been discarded, leaving the period due amount to 0, but a non-null total

This commit still uses the MAX() function, but specifies the aml date must be within the period boundaries

OPW 740793
OPW 725890

Closes #17098
2017-06-01 08:35:49 +02:00
Odoo Translation Bot 058b9cbb10 [I18N] Update translation terms from Transifex 2017-06-01 02:40:07 +02:00
Jeremy Kersten f4aa509283 [FIX] base_geolocalize: use urllib2 to make request
For an unknown reason, in some case, urllib doesn't work while with urllib2 it works.
Since we don't have the opposite case until now (work in urllib and not urllib2), we
considere that it fixes the issue.

this commit closes #14636
2017-05-30 16:47:54 +02:00
Jeremy Kersten f0c34f0df8 [FIX] web: remove bad check from jquery.blockUI
This check is wrong since jquery 1.11 is < 1.2

This commit closes #17271
2017-05-30 16:42:54 +02:00
Stefan Rijnhart (Opener) f6986c8cff [FIX] account: fix copy() of accounts having children
Don't pass default code to child accounts to avoid raising wrongly the constraint: duplicate key value violates unique constraint "account_account_code_company_uniq"  

Courtesy of Stefan Rijnhart (Opener). Was PR #16804
2017-05-30 14:12:47 +02:00
Olivier Dony 2fc7eed0d8
[REM] maintenance symlink added by previous commit
Symlink introduced by mistake at f38d96113b
2017-05-30 13:46:16 +02:00
jesusVMayor f38d96113b [CLA] JesusVMayor: add new email address in individual cla 2017-05-30 11:54:28 +02:00
jesusVMayor ebda8caa97 [FIX] mrp: Use the route on the production if set to create the previous moves
Description of the issue/feature this PR addresses:
The production routing is ignored when creating previous movements

Current behavior before PR:
When you create a production that does not have a routing established in the BOM, and you set a route manually, it is ignored when creating the previous movements
2017-05-30 11:53:03 +02:00
Yenthe V.G 140113346d [FIX] CRM: do not copy meetings attendees
When duplicating a res.partner, the new partner was added in the list of
attendees of previous meeting.

Fixes #17285
Closes #17286
2017-05-30 11:22:22 +02:00
eLBati d6cf41b67b [FIX] account_payment: The payment line name must be unique per company
Closes #16366

Steps to reproduce the problem:
 - create 2 company
 - create 2 different sequences 'payment line', one for company
 - create a payment order for company A and insert a line
 - create a payment order for company B and insert a line
Get SQL error saying The payment line name must be unique
2017-05-30 10:56:49 +02:00
Martin Trigaux e40cad3560
[FIX] hw_scanner: iterate on empty list
Avoid error None is not iterable when no device is connected
2017-05-24 17:27:52 +02:00
Martin Trigaux 7b0440d3f8
[FIX] hw_scanner: avoid flooding logs
When no devices are connected, avoid errors
No such file or directory: '/dev/input/by-id/'
2017-05-24 17:02:28 +02:00
Martin Trigaux 722017ca83
[FIX] hw_posbox_homepage: do not display not working links
The '/point_of_sale/display' controller is added in the hw_screen module.
This module is not loaded if the init scripts are not modified.
This means that updating a posbox with the internal update feature will not work.

This adds the link only in hw_screen and display an information message for old
versions.
2017-05-16 18:14:45 +02:00
Jerome Boisvert-Chouinard 43be0c1ab2 [CLA] Update Savoir-faire Linux CLA
Add new collaborators, remove old ones

Done at #16939
2017-05-16 18:10:03 +02:00
Olivier Dony e0014387c5
[FIX] report: always close pdf files after merge
If an exception during the merges (such as a file descriptor overrun), we
would otherwise depend on the next garbage collection to close the
files. But the next GC may never come.

For example if we ran out of OS file descriptors during merge, all future
requests will crash for the same reason, and the process will never recover
because the GC will never run.

Much easier to explicitly close the files all the time.
2017-05-11 09:01:12 +02:00
Olivier Dony 3978713996
[FIX] mass-mailing: unsubscribe even when archived
A record (Partner/Lead) that was archived can still be unsubscribed.
2017-05-11 09:00:44 +02:00
Kevin Graveman 180c769ab4 [FIX] hr_timesheet_invoice: Typo in html element name tbody
Closes #16827
2017-05-08 13:42:08 +02:00
Olivier Dony 58114e4954
[FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made
available via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 16:56:31 +02:00
Jérome Maes e3081dbb7e [FIX] ir_cron: log message in the right place
Log message in except clause to force displaying
traceback in logger exception.

Courtesy of chs
2017-05-05 13:57:32 +02:00
Odoo Translation Bot 0b4d01f1d3 [I18N] Update translation terms from Transifex 2017-05-01 02:40:51 +02:00
Dainius Kaniava 4f9ac6c093 [FIX] web: properly transfer javascript options
Fix options not being passed from view declaration to JS
frontend function. If passing option 'no_create': True,
"Create" button was still visible.
2017-04-28 21:13:28 +02:00
Dainius Kaniava 43cdec0517 [CLA] boolit.md
Signed corporate contributor license.
2017-04-28 21:13:09 +02:00
Richard Mathot eefd0de541
[FIX] safer company name as email sender
In some email templates of Odoo, the From: field is generated from the
company name. If this name contains an "&" character, this will lead in
an escaping eg; &amp;

Sender header will look like:
From: Machin &amp; Brol <machinbrol@toto.com>

This case is not well handled by email providers like Gmail, that
splits the line on the ";" and considers there are 2 senders, and then
discards the email.

We then fix the templates, waiting for a better fix in master.
2017-04-28 10:19:06 +02:00
Nicolas Martinelli 814d903109 [FIX] purchase: zero line
To reproduce, see issue #16611.

In the mentioned use case, a line with a quantity of zero is created,
which generates a traceback at invoice validation.

Fixes #16611
opw-741055
2017-04-28 09:28:14 +02:00
Christophe Simonis 2a65b8156d [FIX] base: run defined modifiers tests 2017-04-26 19:36:10 +02:00
Olivier Colson 863f46ec71 [FIX] resource: conditions on id
Don't check ids with "id is None" statements, as it won't match if id is False. This caused some bugs with MRP when confirming a MO with no calendar defined, if mrp_operations was installed.
2017-04-25 11:49:01 +02:00
Nicolas Lempereur 716ceede16 [FIX] web_enterprise: kanban_state_selection ie
On IE (from 9.0 up to at least IE EDGE 14) we have this behavior
for the method serializeToString of XMLSerializer:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '&quot;'

Whilst browser such as chromium or firefox have:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '"'

Hence for IE9 and over, if in a `<t t-extend/>` a `t-jquery`
sub-directive (without `t-operation`) is available, we can have
broken javascript if a " is transformed into an &quot; at a unfortunate
location.

This commit favour node.data over XMLSerializer serializeToString to
avoid the possibility of this issue when a text node is processed.

opw-727283
2017-04-20 17:08:17 +02:00
Goffin Simon 0ae30c5997 [FIX] base_partner_merge: deduplicate contacts in multi company
When deduplicating contacts, the function _process_query doesn't use
the orm to fetch the partners to merge according to the criteria.
So there were some access error in multi company when trying to merge
contacts from a not allowed company.

Now a check is made with the orm before merging the contacts.

opw:708457
2017-04-19 15:45:38 +02:00
Odoo Translation Bot 5d5bd2c404 [I18N] Update translation terms from Transifex 2017-04-16 02:54:21 +02:00
Ronald Portier e479828025
[FIX] account_voucher: add missing context
Fixes #16420
Closes #16421
2017-04-14 15:11:30 +02:00
SEINLET Nicolas ded636eae1 [FIX] ir.rule: use rules at most once (#15843)
When a user belongs to multiple groups, and an ir.rule is applicable for some of
them, the rule is added multiple times in the domain. Just do it once. This
makes the query shorter and easier to debug.
2017-04-11 09:27:58 +02:00
Odoo Translation Bot 8f7791fcee [I18N] Update translation terms from Transifex 2017-04-09 02:54:13 +02:00
Raphael Collet 6595cfdf0c [FIX] expression: avoid useless query when searching on x2many sub-field
Searching on a domain like `[('m2m.sub', operator, value)]` currently does
something like:

    right_ids = comodel.search([('sub', operator, value)]).ids
    table_ids = model.search([('m2m', 'in', right_ids)]).ids

and reduces the domain triple to `('id', 'in', table_ids)`.

The domain triple can actually be reduced to `('m2m', 'in', right_ids)`.  With
this reduction, the search on the field `m2m` will be done as part of the main
query.  And this will also enable the optimization of the former fix!
2017-04-06 16:46:46 +02:00
Raphael Collet 3c2065c89d [FIX] expression: use sub-select when searching on many2many field
Avoid pathological performance issue caused by injecting ids retrieved with
another query.

Consider a domain like `[('m2m', 'in', ids)]` on a many2many field.  The
current implementation will perform the subquery:

    SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)

and inject its result into the main query as:

    SELECT id FROM ... WHERE id IN (result_ids)

The latter may be very slow if `result_ids` is a huge list of ids.

The fix injects the first query into the main query as:

    SELECT id FROM ... WHERE id IN (
        SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)
    )

As a result, the database will typically JOIN both tables, and avoid generating
the whole list from the subquery.
2017-04-06 15:59:50 +02:00
Nicolas Martinelli 3128e84243 [FIX] account: aged receivable
- Create an invoice of 10000 at date 2016-11-30, due 2017-02-28
- Make a partial payment of 1500 at date 2016-11-09
- Make a partial payment of 1000 at date 2016-11-30
- Make a partial payment of 2000 at date 2017-01-30

At current date (e.g. 2017-04-04), run the Aged Partner Balance. 5500 is
still due, but set to the +120 days period instead of 30-60.

opw-725890
2017-04-05 11:50:03 +02:00
Jerther 33076f7394 [FIX] stock: set AML date same as move date
Based on v9 fix: f6b6eb906de780714b97b7ca15784d319300548b

Closes #16217
2017-04-05 11:31:19 +02:00
Jerther 52c58fd218 [CLA] backport signature to 8.0
Done at #16240
2017-04-05 10:48:35 +02:00