Commit Graph
13 Commits
Author SHA1 Message Date
Adrian Torres 2824efee4b [FIX] base: ensure python version >= 3.5
Odoo 12.0 does *not* officially support any python version below 3.5,
but no effort had been made to gracefully announce this to the end user
if they were to run Odoo in an unsupported python version.

This is done because Odoo 12.0 uses py3-only constructs which can
and will raise different errors if ran in python 2.

With this patch, Odoo will display an appropriate error message and won't
launch at all unless it is being run with python 3.5 or greater.

closes odoo/odoo#28502
2018-11-08 11:53:35 +00:00
Stefan Rijnhart 4d8b0b723b [FIX] base: don't hardcode the new admin user id
There is no longer a priviledged user and the user named "Administrator" may
not have the id 2.

Instead of hardcoding an id, uses a group-based check

Remove the global variable ADMINUSER_ID to ensure nobody is using it (as it can
be a source of bugs when base.user_admin is not ID 2)

closes odoo/odoo#27432
2018-10-23 14:40:02 +00:00
Sébastien Theys 1addade28b [FIX] base: correctly detect when admin logs in
Since 2f7c03d9ca it's not possible to log in as user 1.

However, we reset the base url when the admin logs in, which is now user 2.

This fixes wkhtml2pdf was not able to load css file, and probably some other side effects.

PR: none
Task: 1879620
2018-08-24 15:55:46 +02:00
Christophe Monniez bb14c41663 [REF] core: Remove psycogreen dependency
Purpose:
    The psycogreen module is unmaintained. Last source update was in
    2015 and last pypi package was in 2012. Odoo only use a small
    part of the psycogreen module that could be written directly in
    the odoo code. This commit reproduce the small function from
    psycogreen used in ODoo and remove all depencies from it.
    Also the copyright and license are honored and the documentation
    is updated accordingly.

    pypi pckage: https://pypi.python.org/pypi/psycogreen
    bitbucket repos: https://bitbucket.org/dvarrazzo/psycogreen/
2017-10-09 18:56:57 +02:00
Stéphane Bidoul (ACSONE) 8bf06adc8d [FIX] namespace packages: move from pkg_resources-style to pkg_util
Deprecates the previous pkg_resources-style packages. Our use was
not entirely spec compliant, and it broke with setuptools 31.
More information in https://github.com/odoo/odoo/pull/15718

Instead, use the pkgutil-style namespace packages.
This is spec compliant as long as all other distributions providing
odoo.addons use PEP 420 namespace packages (i.e. no __init__.py).
So this mechanism fully works on Python 3 only, but does not break
anything on Python 2.

See also:
https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages

Closes #19517
Fixes #15718
2017-09-18 16:05:31 +02:00
Laurent Smet 3425752eac [REM] odoo/report: remove deprecated stuff
- RML Reports
- Webkit Reports (most part already removed by 13b9982c62)
- LocalService in netsvc.py
- rename attributes like rml_% to report_%
- rename ir.actions.report.xml to ir.actions.report
- allow rendering directly on an ir.actions.report by calling render method
- remove 'controller' report_type
- remove unused res.font stuff
- remove print_report method in models.py (not used)
- restore removed call to pdftotext process in test_reports
2017-05-08 09:22:56 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Christophe Simonis 557feb950c [MERGE] forward port branch 10.0 up to 482fd04167 2017-01-10 13:50:48 +01:00
Nicolas Lempereur 07bf7bf4f3 [FIX] odoo-bin: server UTC timezone on windows
On UNIX, the timezone modules conversions can be reset by using
`time.tzset()`. On windows this is not available and the timezone (TZ)
environment variable must be set before the first import of time module.

If not, all datetime gotten in python without specifying UTC (such as
datetime.datetime.now) could be wrong.

This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba97b
imported pkg_resources (which do  a `time` module import) before that.

closes #14926
opw-693764
2017-01-06 14:19:09 +01:00
Yannick Tivisse 98cb4719db [REM] workflow: Remove workflow engine, documentation and tests 2016-11-23 11:52:39 +01:00
Christophe Simonis 467a958ab0 [FIX] core: handle gevent on command line correctly 2016-09-30 12:05:49 +02:00
Raphael Collet 4a700d0ad9 [FIX] odoo: rename imports and adapt import hooks 2016-09-02 17:28:12 +02:00
Raphael Collet 9e64f9f951 [REF] openerp: move openerp to odoo 2016-09-02 17:28:12 +02:00