100 Commits
Author SHA1 Message Date
Olivier Dony fb31330451 [FIX] auth_signup: correct leftover from 6d16915d39
The /web/signup controller was also supposed to get the special frame
header, like all sign-in/up pages.
2018-07-26 23:48:58 +02:00
Olivier Dony 406df78f43 [FIX] hr: make field-level groups consistent
a696f84f1f adds a few extra fields to the
Private information tab of the employee form. As a result, HR personnel
and employees could reasonably expect these fields to be protected in
the same manner as the other private fields. Make it so.

Cherry-Pick of odoo/enterprise@533db05b5e

Fixes #18610
2018-05-18 11:21:46 +02:00
Olivier Dony b61aad2f6b [FIX] hr*: restrict personal employee fields at model level
Fixes #12077
Closes #12160
2018-04-19 18:51:01 +02:00
Olivier Dony 56588e8d44 [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 01:13:25 +01:00
Olivier Dony fa5ee6ed26 [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 01:01:48 +01:00
Olivier Dony 7a4c6eb35d [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 00:51:36 +01:00
Olivier Dony eb391c2ae2 [IMP] base: improve consistency of ACL views
Further improves on previous commit:

- Remove some unnecessary cruft
- Make names/labels more consistent
- Make fields and their ordering more consistent in list views
- Change "active" field on rules into an "Archive" button
- Slightly improve inline doc on rules form view
- Add colors for "global" rules and "apply-for-all" access rights
  ('Global' is an info, but "Apply For All" is a warning, as it can
   indicate an ACL problem)
2017-11-07 18:26:40 +01:00
Olivier Dony ec00c27ca3 [FIX] auth_signup: correct leftover from 6d16915d39
The /web/signup controller was also supposed to get the special frame
header, like all sign-in/up pages.
2017-11-01 23:38:56 +01:00
Olivier Dony d9b721c805 [FIX] server: avoid partial HTTP responses in worker mode
Python 3 (before 3.6) is affected by outstanding issue 24291:
 https://bugs.python.org/issue24291

In Python 3.6 the issue is gone thanks to this patch:
 https://bugs.python.org/issue26721

The base StreamRequestHandler class does not properly deal with raw IO
output streams. This affects most HTTP servers that use it, including
werkzeug. It causes large HTTP responses to be truncated when the
output socket is unbuffered and in non-blocking mode.
This is the case in multi-process mode (workers > 0) due to the socket
timeout configured to avoid worker deadlocks.

Typically, large file downloads (2MB+) and large JSON responses will be
truncated and cause corrupted files or errors on the client side.

As a workaround, we turn on the buffering on the output stream by
default in multi-process mode (it is already turned on for the input
stream) when running on Python 3.5.

See also the socket.makefile() method and the docstring of
`socketserver.StreamRequestHandler` at
https://github.com/python/cpython/blob/dcb101e7f078f12fc3d2bf1730410798a880bfe3/Lib/socketserver.py#L707

Fixes #20158
opw-777120
2017-10-26 12:58:22 +02:00
Olivier Dony dc2a6c6cd2 [FIX] mail: shorten bounce message for sender 2017-10-20 18:40:46 +02:00
Olivier Dony 68bef91d73 [FIX] P3: mail: message parsing must return native strings
There was a leftover explicit conversion to bytestrings during the
parsing of HTML email parts.

This translated into a parse result with `msg_dict['body']` as a `bytes`
instance in Python 3, instead of the expected text type.

Coercing the result of etree.tostring() with UTF-8 encoding to a
native string should preserve the semantics in both Python versions
without this side-effect.

+ simplify another instance of native string use
2017-10-20 18:40:22 +02:00
Olivier Dony 78dcbdee6e [FIX] mail: correct typo in e5e549a4cf 2017-10-20 14:23:38 +02:00
Olivier Dony f5df4fbca1 [FIX] P3: calendar: correct fwd-port of rev. 83024ca3d6
- simplify unicode handling for Py2 and Py3
- fix Py3-related bugs, such as passing bytes for context['tz'], making
  the conversion silently fail, or attempting to decode() a text
2017-10-19 18:19:08 +02:00
Olivier Dony 0fc6fe8653 [FIX] payment_stripe: fix multiple usability problems
- There was no feedback to the user when executing the Charge
  transaction in server-to-server mode, while it could take several
  seconds, with the normal UI/action buttons still available.

- Stripe integration was almost working along with `website_quote`
  payment, but entirely broken with `website_payment`, and partially
  broken with `website_sale`.
  Fixing it required:
  + More leniency in processing optional transaction parameters, which
    may or may not be present in the various payment flows.
  + It also required more precautions when locating the transaction for
    which the Stripe Charge was to be created, which passed in different
    manners in the session. The route now supports an explicit `tx_id`
    to allow forcing the transaction without risk of mixing different
    payment flows.
  + FIXME: There is still some amount of duplication and bad modularity
    in the handling of the various payment flows in relation with
    Stripe.

- We provided very little metadata to the Customer and Charge APIs of
  Stripe. We now pass more names and references to make Stripe payments
  easier to manage in the Stripe dashboard.

- In some cases, selecting Stripe as payment method caused a second
  inclusion of `stripe.js`, raising a JS error because of the
  duplication.

- Strip whitespace in emails: the Stripe API raises an error for
  transactions done with invalid emails, including with
  leading/trailing whitespace.
  Customers will have a hard time figuring out the problem
  by themselves, so we should at least strip whitespaces.
2017-10-19 18:14:15 +02:00
Olivier Dony b1387ddbab [FIX] release: correct version info for master
(After forking v11 branch)
2017-10-04 22:07:07 +02:00
Olivier Dony 360bfb7a52 [FIX] setup: bump up kvm startup delay
Windows can be slower to start than that, sometimes.
2017-10-03 20:02:29 +02:00
Olivier Dony 1e1e2b4f60 [REL] 11.0 2017-10-03 19:19:57 +02:00
Olivier Dony 3a387ef2ee [FIX] website_sale_delivery: remove ES6 template literals in untested commit da3c561d35
ES6 template literals are not supported in our testsuite / phantomjs
yet, which is why none of this branch's commit had passing tests >:-(

See #19841
2017-10-03 19:04:34 +02:00
Olivier Dony b02dea7688 [IMP] config: allow blocking access to db manager
- The `--no-database-list` option will now also block access to database
  management functions and screens.
  Presumably this flag should only be used in production when all
  databases have been provisioned, so the admin should like to block
  access to the db manager at the same time.

- If no `--database` or `-d` parameter is provided, the system will be
  unable to fetch a list of databases at all, so users will be blocked
  with an error message.

- Hide the link on the login screen to the DB manager when it is
  disabled, to prevent sending users to an error page.

- Weak attempt at updating the documentation

Note: the security check for RPC methods could have been done in the RPC
dispatcher, however that would not have protected service methods when
called directly, e.g. by a controller (e.g. the dump method).
2017-10-03 12:46:03 +02:00
Olivier Dony 7d16769263 [IMP] config: support hashed master passwords
- Add support for hashed master passwords (super-admin password) using a
  strong scheme (PBKDF2_SHA512).

- Replace the password with a hash in memory (tools.config map), after
  verifying it

- Automatically replace the plaintext master password with a hash when
  saving it after a password change

- Preserve support for setting/using plaintext passwords when necessary
  (e.g. as a temporary deployment thing)
2017-10-03 12:45:22 +02:00
Olivier Dony e58e0c268c [IMP] server: rename xmlrpc* related parameters
The 'xmlrpc'-based configuration parameters have been a misnomer since
the introduction of the generic HTTP service, years ago.

Hide these options from the server parameters, and replace them with
more appropriate 'http' ones:

 --xmlrpc-interface -> --http-interface
 --xmlrpc-port      -> --http-port
 --no-xmlrpc        -> --no-http

The config entries for these have been adapted as well.

The old parameter names are still silently supported in both
command-line arguments and config files. However they are
stored with the new names in the `tools.config` dict,
and when saving config files (with the -s option).

Also clarified and cleaned up the descriptions of the HTTP/WEB server
parameters.

And finally, added a short version `-p`, for the `--http-port` option.
Credits to @dreispt for this (via #19518)

Closes #19518
Closes #19778
2017-09-29 18:18:03 +02:00
Olivier Dony e4672db97d [IMP] module: make internal methods private
Only methods that are meant to be accessed by the client-side
directly (or via RPC) should be public. All others should be private by
default.
2017-09-28 14:15:30 +02:00
Olivier Dony dc49ba1dc1 [IMP] module: verify and log admin operations
Verifies that admin operations on modules/apps are indeed performed by
an administrator, regardless of ACLs on `ir.module`.
Also logs these important operations, whether completed or blocked.
2017-09-28 14:15:23 +02:00
Olivier Dony 8241c46f0f [FIX] hr_payroll: make internal method private
Only methods that are meant to be accessed by the client-side directly
(or via RPC) should be public. All others should be private by default.
2017-09-28 14:15:00 +02:00
Olivier Dony f565a18cad [FIX] P3: repair parsing of lessc compilation error
Coercing the result of the compilation to text is easier and more
portable than P3-specific code for putting the Popen streams in text
mode.

Fixes #19659
2017-09-25 12:03:54 +02:00
Olivier Dony e98e8e9b1b [FIX] P3: fix server shutdown on Ctrl+C
This is an attempt at fixing the long timeout occurring on P3 when
trying to stop the server with Ctrl-C, both in multithreaded and
multi-process mode.

The root cause is the implementation of PEP-0475[1] as of Python 3.5,
which make system calls silently resume after an interrupt.
With this PEP, interrupting a syscall now requires the signal handler to
raise an exception, which get propagated in places where they did not
use to occur (e.g. time.sleep() used to return early when interrupted)

The solution handles 2 separate cases:

1. Multithreaded

In multithreaded mode, stopping the server requires interrupting
the main thread, while ensuring that all other threads are daemon ones.
The previous commit fixed the latter.
Interrupting the main thread is easy, because it simply sleeps until
it gets interrupted. And it already catches KeyboardInterrupt for
win32 quirks. All we need to do is thus to raise a KeyboardInterrupt
in the signal handler, as proposed in PEP 475 (Use Case 2)

2. Multi-process

In multi-process mode, stopping the server requires interrupting the
main thread of each process. The signal is already propagated to all
processes, so it should be as simple as for multithreaded mode.
Unfortunately, the main threads are far from idle in this case,
and raising a KeyboardInterrupt from the signal handler causes a
series of ugly tracebacks before stopping the server.
Effective, but frightening for the admin.

Instead of doing that, we can watch the wakeup file descriptor
(also suggested in PEP 475, Use Case 2) during the sleep() part of the
main loop of each worker. An interrupt signal won't therefore stop
the server immediately, but will wait until each worker is done with
their current request.. even better.
For select() syscalls, this is done with an extra pipe fd that is passed in
the "read fds", and used as wakeup fd.
And for sleep() syscalls, that don't support a wakeup fd, we can
replace them with an equivalent select() call on the wakeup fd, and
a timeout.

The combination of the above seems to restore a relatively fast
interrupt shutdown on both Python 2.7 and Python 3.5, in both
multithreaded and multi-process mode, with no surprising traceback.

[1] https://www.python.org/dev/peps/pep-0475/
2017-09-25 11:22:09 +02:00
Olivier Dony d03b4f8675 [FIX] P3: bus: repair force-daemonization
P3 got rid of all __private attributes in the `threading` module,
via python/cpython@d06489945f.

Our old code for forcing the `daemon` attribute on an already started
thread used the mangled private name and does not work anymore on P3.
We need to use the new private attribute name (actually both,
to keep backwards-compatibility w/ P2)

This might have deserved a pycompat counterpart, but setting both
variants of the attribute works with no hassle. It should not be a very
frequent use case either.
2017-09-25 11:22:09 +02:00
Olivier Dony be59d0b85c [IMP] tools.dumpstack: show extra thread info
By using the thread's repr() we get its type, name, daemon status and
ID, all at one time. No need to include them separately.

Fall back to the threadId in case the repr() is empty, which can
happen for exotic threads (the gevent main thread seems to be like that)
2017-09-25 11:22:09 +02:00
Olivier Dony 2257583bb5 [ADD] ir.attachment: add token field for external access
Introduce a new attachment field (access_token) to allow external
unauthenticated access. This will be an opaque unique number
(typically a UUID) that should be provided via an appropriate
controller, for unauthenticated display.

The field is intended to be NULL unless unauthenticated access has been
allowed, in which case a value will be set for the access_token.

This could be used e.g. for allowing access to images within mailings,
even when the recipient is not logged in (which is sometimes entirely
impossible, when email providers use restricted proxy servers to
load images)

Note 1: this is still a work-in-progress, but serves to freeze the API.
The implementation of the access check and provisioning of the new
field will be added later.

Note 2: namimg collisions with the file download token prevent the use
of a shorter 'token' parameter for download routes.

Apologies for the late (and incomplete) addition in saas-18 :-/
2017-09-21 23:48:36 +02:00
Olivier Dony bb0404ea30 [IMP] website_mail: simplify helpers for external post
After removing the `sha_in` params a while ago, we get rid of
the deprecated `token_field` option.

- Make `token_field` a model attribute, so that each model can easily
  define the token field that should be used, and it does not need
  to be passed around all the time anymore.

- Rename `_special_access_object()` to `_has_token_access()`, much more
  readable since it returns a bool

- Do not forward the `attachment_ids` keyword arg to message_post,
  as it sometimes contains unrelated IDs (the helper is not meant
  to post attachments anyway)

- Update callers accordingly
2017-09-21 23:42:45 +02:00
Olivier Dony 24f238e97c [FIX] P3: account: fix leftover P2 comparison
str/bool can't be compared anymore in P3, we need a default
comparison value for char/text/date/... fields that aren't
required

Fixes #19558
2017-09-20 10:24:48 +02:00
Olivier Dony 35e80c1ab5 [IMP] doc: update P3 compatibility policy 2017-09-15 16:51:47 +02:00
Olivier Dony cd26062a38 [FIX] mass_mailing: add missing statistics index
Indexing `mail_mail_id_int` is useful for locating the statistics entry
that should be updated (bounced/opened/replied)
2017-09-13 18:41:54 +02:00
Olivier Dony f4d541e51a [IMP] http: set HTTPonly flag on session cookie
This will reinforce the framework against potential XSS exploits
escalating to session hijack
2017-09-05 10:06:35 +02:00
Olivier Dony ce12a7397f [FIX] base: remove early size limit on author field
The default size limits set in base.sql are eventually superseded by the
actual limits (or absence of) when the DB schema is synchronized with
the Python model definitions.

However the list of modules (name, authors, descriptions, dependencies)
is loaded before this can happen. The length of the author field is one
case that can easily crash the database bootstrap process at that point,
should a module with a long author name be present in the addons path.

After schema sync, that size limit is lifted entirely (although Odoo Apps
does limit the max author name length to 512 at the moment, to prevent
abuse).

Fixes #5850
2017-09-05 01:46:47 +02:00
Olivier Dony 53bd1266b6 [FIX] doc: mention psycogreen dependency for gevent worker 2017-09-05 01:45:26 +02:00
Olivier Dony dbdf994df8 [FIX] account: do not show payment data to non-billing users
Users will generally not have the right to read Journal Items unless
they are members of one of the Accounting/Invoicing groups.

Removing the payment-related fields & widgets from the view should let
those users view relevant customer invoices (e.g. for Salesmen) without
getting an AccessError, due to the underlying access to Journal Items.
2017-08-23 03:03:49 +02:00
Olivier Dony 1492670e71 [MERGE] P3: apply text/io model correction & final fixes
Closes #16919
2017-08-20 23:27:44 +02:00
Olivier Dony 2cc77a1990 [FIX] P3: os.write(bytes) 2017-08-20 23:25:54 +02:00
Olivier Dony 9197676e88 [FIX] P3: socket.error.errno instead of [0]
As of P3 socket.error is replaced by IOError and the underlying error
code must be accessed with `.errno `. This also worked in P2, so simply
use that all the time.
2017-08-20 23:25:54 +02:00
Olivier Dony 66fffc96ca [FIX] P3: text regex patterns only work with text input
.. not bytes
2017-08-20 23:25:54 +02:00
Olivier Dony f0333285fa [FIX] P3: convert exception handlers to except..as
Those are possibly posterior or leftovers from 3979f6802e
2017-08-20 23:25:54 +02:00
Olivier Dony f5b7de0e6c [FIX] P3: correct more dict iterable builtins use
Some bits posterior or leftover from fffaf735f5

See also parent commit.
2017-08-20 23:25:54 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
Olivier Dony 589c0d7e2c [FIX] P3: more requirements.txt changes
- jcconv is not P3-ready and is only optional, for use on the POSBox
  firmware for Japanese charset support in some receipt printers
  (The POSBox firmware is still based on Odoo 8 + PY2 at this time)

- wsgiref is built-in since Python 2.5, and the one on pypi does not work
  on Python 3.2+
2017-08-20 23:25:54 +02:00
Olivier Dony 92e8a342c9 [FIX] P3: crm: dead code removal + simplify
Merge wizard contained dead code with references to an unused lib for
validating emails. Removing everything is easier.

+ remove unnecessary pycompat wrapping for safe use of dict.items()
2017-08-20 23:25:54 +02:00
Olivier Dony 1b6871319d [MERGE] P3: semantics fixes
Backport of P3 semantics fixes from master
2017-08-20 23:16:30 +02:00
Olivier Dony 13ca39dd6d [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-18 18:48:17 +02:00
Olivier Dony b31577a11a [FIX] portal wizard: fix compatibility w/ new views
New saas-16 web views have a more consistent handling of `readonly`
attributes and do not save read-only fields inside x2m. In the previous
implementation this was an exception to the rule (even if rather
inconsistent/unexpected).
A new attribute `force_save` was introduced to workaround the default
behavior when considered necessary.

The portal wizard is affected by the change, as the partner_id field of
the lines is readonly but required. It could be avoided by filling the
wizard lines before opening it, instead of relying on default values and
onchanges. However this would likely require extra boilerplate code and
an extra server action. Dropping the readonly flag would work too, but
would look weird.

Using the new `force_save` flag is a simpler alternative.

See also rev. 3b3f6f04af
2017-08-17 21:06:37 +02:00
Olivier Dony 6bafe8e9a8 [FIX] mail, mrp: adapt attachment kanban to new ID format
As of saas-16 and the new web client views, the "display value" for a
record's ID is now formatted with thousand separators.

This breaks a few kanban views where the ID was inserted into a
dynamic URL. Using `raw_value` is correct too and fixes the problem.

Note: This might affect other kanban views using integer field values,
but a quick search did not yield anything. Many2One fields already had
different "display values", so `raw_value` is already used when needed.
Other integer fields, such as computed counts and sums are often
displayed but not inserted into URLs or technical values where
the problem would occur.
2017-08-17 14:15:13 +02:00
Olivier Dony 08b75b7bcb [FIX] pad: do not crash during record creation
Backport of 0de067cae9
(and 9b8bc5e5a1)

Rev. c5bd509274 attempted to improve the
pad sync mechanism when merging records (tasks), but failed to consider
the case where the pad_url field is not set yet.
This happens at create(), due to the chicken-and-egg problem with the
pad URL depending on the record ID, and therefore set *after* creation.

Ignoring the sync when the URL is not yet set should be enough, as the
URL generation method also takes care of that first sync.
2017-08-09 18:51:16 +02:00
Olivier Dony 0de067cae9 [FIX] pad: do not crash during record creation
Rev. c5bd509274 attempted to improve the
pad sync mechanism when merging records (tasks), but failed to consider
the case where the pad_url field is not set yet.
This happens at create(), due to the chicken-and-egg problem with the
pad URL depending on the record ID, and therefore set *after* creation.

Ignoring the sync when the URL is not yet set should be enough, as the
URL generation method also takes care of that first sync.
2017-08-09 16:38:56 +02:00
Olivier Dony 17634acb0e [FIX] crm: correct activities filter combination
The new "My Activites" filter introduced by rev. 87e457158e
should not be in the same group of the search view as other activity
filters (Overdue/Today/Upcoming), otherwise they are combined with OR
instead of AND.

This is particularly misleading when coming from the Sales dashboard, as
the "Overdue" button of "My Pipeline" will lead to a list of
opportunities with "My Activities OR Overdue Activities", showing *all*
opps with overdue activities, not just yours.
2017-08-08 16:17:34 +02:00
Olivier Dony 586b97e17b [FIX] crm: correct duplicate record ID
Introduced by a8c5b7810f

+ spellchecking
2017-07-28 11:19:37 +02:00
Olivier Dony e8271ffcc7 [FIX] mail: avoid attaching auto-notifications to foreign parents
`parent_id` fields are common in many models, and thus default values
for those fields are sometimes passed in the context.

Because mail.message also has `parent_id` field, it would automatically
use the default when an automatic message was being posted. While of
course, the parent_id value comes from a different model.
This "adoption" by a random "parent message" is unexpected,
not desired, and it can even cause a very surprising AccessError if the
parent message is not readable by the user.

Forcing the `parent_id` value during the creation of an automatic message
avoids this confusion.

One way to trigger the bug was to use the "subtask" stat button to create a
child subtask for a project task (it relies on the parent task ID
passed in the context)
2017-07-07 18:34:54 +02:00
Olivier Dony 464fe4a185 [FIX] doc: clarify: record[field] is valid/recommended 2017-07-06 15:58:47 +02:00
Olivier Dony 08934f967a [FIX] mass-mailing: avoid ETA date jumping in the past
The ETA displayed on a mailing should only switch from the scheduled
date to the next cron run when the cron run is after the scheduled date.

Previously it could jump in the past on the scheduled date, if the next
cron run was in the past (delayed or in progress).
2017-06-27 20:12:15 +02:00
Olivier Dony 7b494187e9 [FIX] point_of_sale: make tests consistent wrt taxes
After rev d938ba87ae, taxes that are
included in the price are subtracted in case the tax is not applied in
an order (e.g. when the fiscal position remove the tax).

Some of the test orders did not apply any tax, and because the products
used in the test had some tax included, the above revision made the
tests fail (by subtracting the tax amount from the price).

Fixed by making the test orders more consistent wrt to taxes, applying
the taxes as would happen in the UI, then correcting the payment amounts
to include the extra tax amounts.
2017-06-22 10:52:12 +02:00
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 3207c7226f [MERGE] Forward-port of 9.0 up to e40a4baf41
More specificically, cherry-pick of e3a52a9 to e40a4ba
2017-06-15 17:40:44 +02:00
Olivier Dony 89eca96476 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:36:05 +02:00
Olivier Dony e40a4baf41 [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:34:47 +02:00
Olivier Dony 625c0d5d8e [FIX] anonymization: correct pickle protocol and import 2017-06-15 16:25:25 +02:00
Olivier Dony 16714a7e71 [FIX] auth_oauth: correctly register token field 2017-06-15 16:23:44 +02:00
Olivier Dony eaa3682bb6 [FIX] http: force protocol when missing in URL 2017-06-15 16:23:35 +02:00
Olivier Dony 4acfe3577b [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:23:35 +02:00
Olivier Dony 0527564463 [FIX] auth_oauth: correctly register token field 2017-06-15 16:21:32 +02:00
Olivier Dony 692f47da6e [FIX] http: force protocol when missing in URL 2017-06-15 16:21:22 +02:00
Olivier Dony e3a52a9966 [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:21:22 +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
Olivier Dony 70d522eb31 [MERGE] Forward-port saas-11 up to 21f93b8035
Empty forward-port because commit 21f93b8035
is only a backport that does not need to be forward-ported again.

The point of this fwd-port was to resolve the conflicts immediately.
2017-06-13 13:19:09 +02:00
Olivier Dony 19bad87ed8 Forward-port c6b9b69f6a 2017-06-08 01:00:08 +02:00
Olivier Dony c047b1619c [MERGE] Forward-port 10.0 up to 7d7d6ee5af 2017-06-07 23:48:08 +02:00
Olivier Dony 7d7d6ee5af [MERGE] Forward-port saas-11 up to fff4af36ab 2017-06-07 23:43:08 +02:00
Olivier Dony fff4af36ab [MERGE] Forward-port 9.0 up to ef82574fb1 2017-06-07 23:40:52 +02:00
Olivier Dony ef82574fb1 [MERGE] Forward-port saas-6 up to b604f3b3da 2017-06-07 23:29:41 +02:00
Olivier Dony b604f3b3da [MERGE] Forward-port 8.0 up to c6b9b69f6a 2017-06-07 23:11:38 +02:00
Olivier Dony c6b9b69f6a [FIX] base_import_module: allow selective access to module files
As a consequence of rev. 76cd8d2558,
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 e2e23142e9 [FIX] base_import_module: make low-level method private
The import_module() method does not need to be public,
so let's mark it private. It's not called by anyone
except import_zipfile().

After 76cd8d2558 it would
fail anyway because addons_path would not be prepared by
import_zipfile().
2017-06-06 16:32:37 +02:00
Olivier Dony 45336d7486 [FIX] tools: verify path before opening 2017-06-03 01:30:57 +02:00
Olivier Dony de38d0262b [MERGE] Forward-port 10.0 up to 76cd8d2558 2017-06-03 01:24:21 +02:00
Olivier Dony 711530e036 [MERGE] Forward-port 9.0 up to 98f5f1b888 2017-06-03 01:16:50 +02:00
Olivier Dony 55d0f57cf5 [FIX] tools: verify path before opening 2017-06-03 01:14:48 +02:00
Olivier Dony 8958bfe557 [MERGE] Forward-port 8.0 up to d18d606a55 2017-06-03 01:08:20 +02:00
Olivier Dony d18d606a55 [FIX] tools: verify path before opening 2017-06-02 22:29:47 +02:00
Olivier Dony 98f5f1b888 [FIX] tools: verify path before opening 2017-06-02 22:28:39 +02:00
Olivier Dony 76cd8d2558 [FIX] tools: verify path before opening 2017-06-02 22:13:36 +02:00
Olivier Dony f0a6bb6ce3 [MERGE] Forward-port saas-16 up to eb24f96448 2017-06-01 01:57:22 +02:00
Olivier Dony eb24f96448 [FIX] hr_expense_check: repair relative imports for Py3
(Pylint W0403)
2017-06-01 01:49:16 +02:00
Olivier Dony 5d2869cbc8 [MERGE] Forward-port saas-16 up to ba15df47cb 2017-06-01 01:46:13 +02:00
Olivier Dony ba15df47cb [MERGE] Forward-port saas-15 up to 17b847c0f6 2017-06-01 01:10:29 +02:00
Olivier Dony 17b847c0f6 [IMP] l10n_be_invoice_bba: convert to unix LF line endings
For some reason this file was using Windows CRLF line endings.
2017-06-01 00:44:46 +02:00
Olivier Dony 5dd2cc8e63 [MERGE] Forward-port saas-14 up to b9e2207267 2017-06-01 00:37:30 +02:00
Olivier Dony b9e2207267 [MERGE] Forward-port 10.0 up to 7e44444878 2017-06-01 00:15:27 +02:00
Olivier Dony 7e44444878 [MERGE] Forward-port saas-11 up to 156e9d0016 2017-05-31 20:09:51 +02:00
Olivier Dony 156e9d0016 [MERGE] Forward-port 9.0 up to 75e03c0f76 2017-05-31 19:28:20 +02:00
Olivier Dony 7b5af174a5 [MERGE] Forward-port 8.0 up to 2fc7eed0d8 2017-05-30 13:52:05 +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