Commit Graph
3175 Commits
Author SHA1 Message Date
Odoo Translation Bot 0333007a08 [I18N] Update translation terms from Transifex 2017-10-02 15:06:48 +02:00
Martin Trigaux 71c8fd8d89 [I18N] base: add missing terms
base.pot includes the description of all modules, including enterprise modules
2017-10-02 13:58:30 +02:00
Richard Mathot ff3b21bd3f [FIX] ir_actions: help messages cleaning 2017-10-02 13:45:54 +02:00
Martin Trigaux 0e3455222d [I18N] Update translation source terms 2017-10-02 13:34:51 +02:00
Christophe Simonis 5ce21c7355 [MERGE] forward port branch saas-16 up to b3d0897f2d 2017-10-02 13:05:17 +02:00
Odoo Translation Bot 3837f6dc8f [I18N] Update translation terms from Transifex 2017-10-01 07:14:55 +02:00
Odoo Translation Bot 682b2c0985 [I18N] Update translation terms from Transifex 2017-10-01 04:41:44 +02:00
Jeremy Kersten 830fed2601 [FIX] website_sale_wishlist: fix to make wishlist available for public user
Fix/imp about the #19777

Replace cron of garbage_collector by a call from autovaccum. Don't try to find
which session is expired or not to avoid to check each one by one, but use a
stupid heuristic to delete all old session older than 5 weeks by default.
(overridable in autovaccum: model.power_on(**dict(wishlist_week=10)) e.g.)

Use 'display: none' instead of class hidden, to avoid flickering at load and
let jquery work with .show / .hide without removeClass('hidden').
Without it, the animation of the first product that you add in your wishlist
will be wrong because Wishlist menu is not visible while you don't refresh.

Remove all old test that check if we was the public user or not and that make
the PR not working ;)

Courtesy of @yajo for dev, and @rdeodoo for quick review/testing
2017-09-30 12:21:27 +02:00
Suraj Shukla 536bb2f7d9 [FIX] base: bootstrap css load issue fixed for asset mode
When you was in debug=assets and that a less file was malformed, the
error was not displayed correctly.

Now we load a minimal layout (bootstrap style)

This commit closes #19799
2017-09-30 12:21:27 +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
Moises Lopez - https://www.vauxoo.com/ 55188da4f4 [REF] tools check_with_xsd: Supports generic stream
In order to be able to use it either with a file or an bystream from an attachment. Was PR #19697
2017-09-29 17:24:39 +02:00
fwi-odoo da136d83bb [IMP] web: x2m list: conditionnaly hide a column
This commit introduces a new way to hide a column in a x2m list view.
The attribute 'tree_invisible' can be add in the field attrs in the x2m
view definition. This attribute can use the 'parent' key to make a reference
to the parent record (e.g. 'parent.id').
2017-09-29 16:49:20 +02:00
Raphael Collet a16c44210a [FIX] models: skip an SQL query when its result is known to be empty
In method `search`, simply make an abstract interpretation of the domain to
determine whether it is equivalent to false.  In that case, skip the query.
2017-09-29 16:14:57 +02:00
Raphael Collet 5875a253dd [REF] expression: simplify domain processing for x2many fields
Make it easier to take advantage of subqueries whenever possible.

Also remove some weird semantics of the operator `not in`: searching with the
domain `[(F, 'not in', [])]` was returning the records with relations, instead
of all the records.  The new semantics makes `[(F, 'not in', ids)]` equivalent
to the complement of `[(F, 'in', ids)]` in all cases.
2017-09-29 16:14:57 +02:00
Raphael Collet 871b9693a1 [REF] expression: do not flatten query params, and simplify code
Avoid the flattening of params, which makes the serialization of subqueries
almost impossible.
2017-09-29 16:14:57 +02:00
Martin Trigaux 8f1e83e71a [IMP] base: adds float_time t-options
To be able to use
  t-options="{'widget': 'float_time'}"
in QWeb views as we have the widget="float_time" in classic views
2017-09-29 15:38:06 +02:00
Sanjay Jamod 5a877b5671 [FIX] account,sale: Don't show sale/invoicing settings if only ecommerce installed 2017-09-29 14:50:44 +02:00
qsm-odoo 87f1e360a8 [FIX] web, mail, base: config's isMobile definition
The `isMobile` variable was defined at the right place (`config.device`)
but was set at the wrong place (`config`).

Thank you for making me author of all the `isMobile` lines by
the way... :)
2017-09-29 14:41:41 +02:00
Deep Patel 811f7ca388 [FIX] res_config: Don't lose left panel when clicking on links or actions
1/ Lint
2/ Follow new .js guidelines (mainly re-sequence function alphabetically)
3/ Introduce BaseSetting.SearchHeader template for search header instead of replicating html code
4/ Add some comments in code
5/ When we close a modal or come back using breadcrumb, left panel is lost and all the settings are displayed. This commit fix the issue
6/ Remove the fact that the current app is in top of the app list
7/ Improve search
2017-09-29 11:46:31 +02:00
Christophe Simonis 1512c1b229 [MERGE] forward port branch saas-18 up to 9f9a7fdd0d 2017-09-28 15:01:11 +02:00
Fabien Meghazi 9f9a7fdd0d [FIX] server: python3 compatibility for --dev=reload 2017-09-28 14:58:38 +02:00
Christophe Simonis a8ecfd03c6 [IMP] core: allow to connect to database server with a secure SSL TCP/IP connection 2017-09-28 14:47:59 +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
Christophe Simonis 99bf9e4563 [MERGE] forward port branch saas-16 up to 89df681b45 2017-09-28 13:24:14 +02:00
Christophe Simonis 89df681b45 [MERGE] forward port branch saas-15 up to da15615c45 2017-09-28 11:56:23 +02:00
Christophe Simonis da15615c45 [MERGE] forward port branch saas-14 up to aca401c500 2017-09-28 10:53:37 +02:00
Christophe Simonis aca401c500 [MERGE] forward port branch 10.0 up to 808c0e5dde 2017-09-28 09:54:16 +02:00
Denis Ledoux 808c0e5dde [FIX] test_assetsbundle: handle readonly files
If the Odoo server runs with its sources read-only
for itself, this is not possible for the server
to touch the files contained in the assets.

In such a case, instead of touching the file,
we alter the attachment checksum, to simulate
a change within the modified date.

However, in such a case, we can only test that the
bundle is well generated again.
We can no longer check the change of version and modified date,
since the modified date of the files have not changed,
and therefore the checksum (which is based on the files
modified date, among others) neither.
2017-09-27 22:11:36 +02:00
Denis Ledoux b5c55a9331 [FIX] base: tests, reflect unaccent behavior of 5e3de76f36
Since the revision
5e3de76f36

The `::text` is included within the `unaccent` call
The expession tests have never been changed according
to this change of behavior in the building of the unaccented
queries. This has never been detected by runbot because
you need to start the Odoo server with the option
`--unaccent`
and to create the database with the unaccent extension
`CREATE EXTENSION unaccent`
to be able to fail the former tests,
and this is not the case on runbot.
2017-09-27 22:10:30 +02:00
Monish Soni 0a75db1db2 [IMP] res_config: Display 'Discard' in capital letters 2017-09-27 17:35:22 +02:00
Christophe Simonis af117236de [MERGE] forward port branch 10.0 up to 8165018058 2017-09-27 17:07:23 +02:00
Raphael Collet 36141931bf [FIX] mail: remove field res_model_id for performance reasons (#19744) 2017-09-27 16:58:19 +02:00
Christophe Simonis 6836828a3e [MERGE] forward port branch 9.0 up to 1970761554 2017-09-27 13:20:29 +02:00
rde 2a43636ae9 [FIX] import_xml: ir.ui.view model does not have a page attribute anymore
Before this commit, user could set page attribute on <template> tag in xml
Now, we prevent user to be able to set page attribute.
2017-09-26 16:10:38 +02:00
Daniel Reis 53fe7ae462 [IMP] modules: on module update or init always update module list
Was only done when updating base.
The cost of scanning the addons path should small in comparison to the update
time itself.

Followup of #9133
Closes #9140
2017-09-26 13:32:53 +02:00
Raphael Collet e671679183 [FIX] fields: do not use int() to retrieve record id
When reading a one2many field, the inverse field of the retrieved lines may
already be assigned in cache to a new record.  This can happen during an
onchange.  In that case, the algorithm crashes.  Let's clean it up!
2017-09-26 11:43:37 +02:00
Fabien Meghazi cc9eb8c498 [FIX] P#: ir.mail_server: fix bug introduced in 200612ca1e
The variable `email_body_utf8` has been renamed to `email_body` during
PythonThreeTization but there is a leftover:

https://github.com/odoo/odoo/commit/200612ca1ef1#diff-85eeeed32c7f2fe285884f3661b49881R326

Backport of 63a4370afd
2017-09-26 11:33:33 +02:00
Raphael Collet b4824d78eb [FIX] mail: avoid re-reading a value given to create
After a message is created with a given `author_id`, reuse `author_id` instead
of `message.author_id.id`.
2017-09-26 09:32:54 +02:00
Raphael Collet 3ca6392a3f [FIX] mail: simplify ormcache parameters to avoid queries
Make the cache depend on `user` instead of `user.groups_id`.
This saves 2 queries on each write/create of `mail.thread`.
2017-09-26 09:32:54 +02:00
Fabien Meghazi 63a4370afd [FIX] ir.mail_server: fix bug introduced in 200612ca1e
The variable `email_body_utf8` has been renamed to `email_body` during
PythonThreeTization but there is a leftover:

https://github.com/odoo/odoo/commit/200612ca1ef1#diff-85eeeed32c7f2fe285884f3661b49881R326
2017-09-25 23:22:45 +02:00
Xavier Morel 059710b2b0 [FIX] reading of HTML and XML view fields in P3
Reading them as bytes would not crash but could fill the corresponding
field with pretty much garbage. Turns out Html fields inherit from
Text and XML content generally goes into text fields, so handling
these items as text makes much more sense than as binary data.
2017-09-25 17:00:43 +02:00
qsm-odoo 4d6041c365 [FIX] base: use correct order to display views' inherit_children field
Following commit https://github.com/odoo/odoo/commit/dbb931976fd102a1eceea4ebf195efea7576f260:
The inherit_children field was not showing the proper order of
inheritance in form view, making debugging complex.

Note: this commit adds the code to show the proper order but revealed
a bug which will be fixed in another commit: the default_order of
x2m views only considers the first ordering field.
2017-09-25 14:15:13 +02:00
Martin Trigaux 39e83e84c7 [I18N] Update translation terms from Transifex 2017-09-25 14:05:27 +02:00
qsm-odoo dbb931976f [FIX] base: use better view inheritance (secondary) order
Currently, the view inheritance order is 'priority,name,id', the
default order for the 'ir.ui.view' model.

This commit changes the order to 'priority,id' while computing
inheritance. This make views chronologically ordered according to their
installation order, after the primary sorting on `priority`.

This helps to automatically solve some inheritance order bugs that would
have traditionally required explicit view priorities.

Considering this example: an app C depends on two others apps A and B.
We want the LESS files of C to come after the LESS files of A and B as
CSS rules order matter. The only solution to make sure of that with the
current implementation is to change priority field of C to be higher
than 16 (default of A and B). With a complex hierarchy, that will induce
errors. Ordering by 'priority,id' solves the problem, indeed views' ids
of apps A and B will be lower than views' ids of app C. The "name"
ordering is fine for list views display but not for views inheritance.

Closes #19658
2017-09-25 12:03:55 +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 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
Lucas Perais (lpe) e340acc174 [FIX] base: no logo on company shouldn't prevent printing reports
Before this commit, when trying to preint an invoice when minimal company details were set (without the logo),
- the wizard of company edition was not clear enough on what was needed
- did not print on clicking save

After this commit:
- the wizard is clearer, specifically it tells the user to add a logo
- clicking on save now prints the invoice, even though no logo has been set on the company
2017-09-25 08:53:41 +02:00
Lucas Perais (lpe) 5589f102e6 [FIX] base: fixed display of company details for printing
Also, rebuilt preview pdf
2017-09-25 08:53:31 +02:00