Commit Graph
62 Commits
Author SHA1 Message Date
Loan (LSE) 962d4324fb [FIX] hw_drivers: add cron for HTTPS certificate update
Context:
When an HTTPS certificate is delivered, it is valid for ~1 month.
To avoid missing the certificate, a script is automatically ran daily
to check if a new HTTPS certificate is necessary.

On the IoT box, it is added in the native Unix system with this file:
https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/cron.daily/odoo

However, prior to this commit, there is nothing equivalent for windows

Note: the HTTPS certificate check is also done automatically when
accessing the homepage.

Before this commit:
After an HTTPS certificate delivery, if we let the IoT server
running non-stop (and without accessing the homepage).
The HTTPS will expire without any automatic renew.

After this commit:
The cron process is handled by the handler Manager

Other note:
- Using native Windows "Scheduled Task" have been proposed at:
https://github.com/odoo/odoo/pull/144584
But, was judged too risky from a security point of view
- `sched` library have been discarded as the code is too verbose
- This is unstable for the iot-box. This is the reason for the
initial Windows check on the import. The iot-box does not need
this fix anyway as explained in the context

opw-3617687

closes odoo/odoo#145114

X-original-commit: b9bd36056fbd3c27148da82cc49039669b8f8563
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-12-06 17:27:42 +00:00
vifo ad68fb3cef [FIX] iot: Add module websocket client for windows
Before the windows image couldn't run because the module
websocket-client was missing, now it's added in the list of module to
install on windows

closes odoo/odoo#143205

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-11-23 16:24:10 +00:00
Loan (LSE) bb7bbb80ac [FIX] setup: logline config saved in OS environment config file
To reproduce:
 1. on your windows computer, add a system environment variable with:
  - Key: ODOO_RC
  - Value: (path to any file except the `$INSTDIR\server\odoo.log`)
 2. Install Odoo Windows version
 Notice that the log are stored into the `$INSTDIR\server\odoo.log` file
 3. Restart Odoo's service
=> Odoo's log file does not log anything anymore

Cause:
As odoo will use in priority the environment variable as the config file path.
This will save the config change into that file instead of the intended one at
`$INSTDIR\server\odoo.conf`.
Due to this, the config file remain the default one created by the previous commands
but the log_file information get save to the wrong config file.
On restart of the service, as the parameter is not present,
it does not log in the intended way

After this commit:
 Logs are logged into the log file as intended

Was discovered accidentally while reviewing an IoT PR:
https://github.com/odoo/odoo/pull/137547

closes odoo/odoo#142796

X-original-commit: bbd06814a7e42c22206087c0df1e06d14dbba74e
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-11-21 20:06:49 +00:00
lejeune quentin 3d15c2fe05 [FIX] hw_drivers: Update windows printer driver
Fix version of GHostscript

closes odoo/odoo#129051

X-original-commit: 97b8edef9750fa00f1c5d5e4cfcd5141471270ec
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-07-20 05:03:02 +02:00
Christophe Monniez 50967f0486 [REM] packaging: remove windows 32 bit support
Since may 2020, M$ stopped to ship their 32 bits OS.
So, there is no need to distribute a 32 bit version anymore.

This will reduce the package size by 2.

The new package will use Python 3.10 by default, that's why the
local requirements were changed (a wheel package was missing for windows
in the previous version of PyKCS11).

closes odoo/odoo#124057

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-06-07 12:02:20 +02:00
lejeune quentin ac839d337e [ADD] hw_*: Add python modules for using Samba
For the use of driver using the Samba share file we need the modules
PySmbClient==0.1.5
cryptocode==0.1

closes odoo/odoo#112940

X-original-commit: 38f8cf92c05ebea2714d513f1916ef581b0d9c73
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-02-17 12:07:39 +01:00
lejeune quentin 2797bef1f7 [FIX] hw_*: Fix the access rights for the LOCALSERVICE user
We must force the access rights to the installation folder to "FullAccess"
because in some environments these rights have been restricted by customers.
And so the iot windows does not work properly

closes odoo/odoo#112735

X-original-commit: db3dff5150a638ed00d16109176853503326cd7f
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-02-14 20:13:11 +01:00
lejeune quentin 7ea2e6ce15 [FIX] hw_*: Modify the default user for iot in windows
currently there is an error in the configuration
of the default user for the iot windows
it is configured for "local service"
which is the French version of the local user.
Except if the pc window is not in French,
the user is not configured correctly.
We have to use the default local user name
of windows which is "LOCALSERVICE"

closes odoo/odoo#112181

X-original-commit: 36c03128e97379f361072f481450704ebc582e3b
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-02-08 12:26:11 +01:00
lejeune quentin b49e7e48f5 [IMP] hw_*: Add possibility to run IoT in Windows
Currently it is only possible to run the modules
for the IoT Box on Raspios.
The modifications brought by this commit brings the possibility
that the various hw_* modules can be executed whatever the OS
of the hardware (Linux or Windows).
If the modules should be versioned according to the OS,
the file will be renamed so that the end of
the file includes *_L (for linux) or *_W (for windows)

closes odoo/odoo#107350

X-original-commit: b7b8809ea8b7fe4ac8b24f43fe3f3a5e38a66696
Related: odoo/enterprise#34713
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-12-07 10:02:23 +01:00
Christophe Monniez c14c618ec9 [FIX] packaging: install productivity apps only in installers
closes odoo/odoo#101043

X-original-commit: 4fadf6b99a7b48a58a612e3d0be3d14a99a60ef5
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-09-26 07:42:57 +02:00
Christophe Monniez 6d565447e2 [FIX] packaging: fix windows installer requirements
When building the windows installer, the requirements are installed one
by one to avoid a complete crash when a requirement is not installable
on windows.

It appears that lines that contains comments are not installed.

With this commit the comment part is properly removed from requirement
lines when calling pip.

closes odoo/odoo#100820

X-original-commit: 8c175db723ca2215526f766bb2e2c6fd08970c37
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-09-23 01:39:46 +02:00
Christophe Monniez 53d00c7ce5 [IMP] packaging: add a new install type for windows
In order to be able to use #86723 Odoo needs to be used as a local
proxy. With this commit, a new install type `Local Proxy Mode` is added
to the windows installer. When chosen, this install type does not
install the PostgreSQL server and it adds the `hw_l10n_eg_eta` as a
server wide module. It also generate and sets a proxy token.

While at it, the windows packaging is a bit improved:
* the VM now uses the virtio drivers
* the installer size and speed is improved

X-original-commit: 8586f78af36616d8014caf7ec9e44d8f6549d10d
Part-of: odoo/odoo#92195
2022-05-24 23:01:54 +02:00
Christophe Monniez e7231db74e [IMP] packaging: automate win installer displayed version
When a new Odoo version is released, the displayed version in the
Windows NSIS installer has to be manually updated.

With this commit, the displayed version is computed from the release.py
file.

Part-of: odoo/odoo#78386
2021-10-15 22:09:41 +00:00
Christophe Monniez c981c6ee7b [FIX] packaging: bump win installer version
Quick fix that need to be automated.

Closes #77981

closes odoo/odoo#77994

X-original-commit: 0a07ddbc750e561b63f6f12568baa66eba7c3ba2
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-07 11:50:44 +00:00
Christophe Monniez ca5f1f6120 [FIX] packaging: add a bom to nsi script
When using the windows installer in French language, the `Hôte` label
used to configure postgresql server does not display correctly.

The LangString documentation does not specify how to use the special
characters but after some tests, specifying a BOM for the nsi file seems
to be the way to go.

closes odoo/odoo#65370

X-original-commit: 3d0871d1d5895f0f04175f2633344f2f1b05a081
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-02-01 17:58:36 +00:00
Christophe Monniez 917928eb08 [IMP] packaging: update windows packaging
Up to Odoo 13.0, the windows setup is 32 bits and embeds an old
postgresql 9.5 32 bits version too.

With this commit, the postgresql server is no longer embedded in the
resulting setup file. Instead, if the user choose to install the
postgresql server, the 12.4 version is downloaded from the official site
(version 10.14 in the case of a 32 bits windows).

Also, the Python target achitecture is choosen based on the Windows
system on which Odoo is installed.

This imply changes on the KVM images used to build the installer:

    - The Windows system on the KVM as to be 64 bits.
    - A 32 bits WinPython version must be in `c:/odoobuild/WinPy32`
    - A 64 bits WinPyhton version must be in `c:/odoobuild/WinPy64`

A little bit of cleaning also comes with this commit to get rid of the
old `openerp` references.

closes odoo/odoo#57727

X-original-commit: c47d7c67066ff15602b16f18c4c3acebfd3a2755
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-15 11:35:47 +00:00
Christophe Monniez 52b1b9c255 [REM] packaging: remove useless winpy_requirements.txt file
As this file was only used as a one shot for the windows pacakging, it
can be removed from the code.

closes odoo/odoo#55307

X-original-commit: 19b44653fef85a851239c656b1fdf4798ab83f34
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-03 09:03:50 +00:00
Hardik Prajapati a43f857423 [IMP] base_vat: replace vatnumver by stdnum library.
Python module vatnumber doesn't seem maintained anymore. Therefore, we should:
    - call directly stdnum (which is maintained and mostly used everywhere in vatnumber)

Also improve stdnum import, vat fix method and vat expected formats

task-1915371

closes odoo/odoo#36978

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-05 10:39:39 +00:00
Martin Trigaux 9aef423d4d [FIX] auth_ldap: replace the deprecated library by one up to date
At 795c7b0a94 the external dependencies was changed from trying
to import 'ldap' to checking than 'pyldap' package was installed.
The problem is that pyldap is a unmaintained library that should no
longer be used, as explained on the package page:
https://pypi.org/project/pyldap/
"The pyldap fork was merged back into python-ldap, and released as
 python-ldap 3.0.0."

Having pyldap version >= 3.0 installs python-ldap automatically and
will not cause any issue.

The Debian control file package name is adapted to use the latest.

The "ldap" externalm dependency defined in __manifest__.py will cause
pkg_resources.get_distribution() to fail in both case ("python-lap" or
"pyldap"), but the "import" fallback will succeed. For that reason, the
log warning is turned into a log info.

closes odoo/odoo#43769

Note: This library should be replaced by the pure python "ldap3" library.
X-original-commit: 1afd0ccf20881ba97e3c07dffb33e9a3a0b2cda4
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-01-22 14:09:46 +00:00
Christophe Monniez 7ce07a7a1a [FIX] packaging: compute winpython path with package.py args
When building the MS Windows package, the PYTHON_VERSION variable is not
used and the WinPython path is hard coded in the Makefile and NSI file.
This prevent the usage of a newer version of Python.

With this commit, the PYTHON_VERSION is used to compute the WinPython
Python directory. That way, this directory can be derived from
package.py command line argument --vm-winxp-python-version.

Also the less windows binaries are not packaged anymore.

closes odoo/odoo#39821

X-original-commit: ac90d8584f99e24aed931eb5186c360f9dfbf399
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-11-05 17:29:31 +00:00
Christophe Monniez 03a1b34fc3 [FIX] packaging: adapt Odoo version in windows installer
Packaging oversight, the displayed version in the installer window was still
12.0.

closes odoo/odoo#38486

X-original-commit: c5bd1a4f9730064f53ff633592dbf83ca7c1e4f7
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-11 09:58:46 +00:00
Martin Trigaux 632fa044c3 [IMP] tools: remove custom pofile reader
Use polib library that handles this correctly
The complexity of the parser is moved to the library
2019-06-05 09:44:11 +00:00
Olivier Dony e554ce345f [FIX] requirements: bump up jinja2 reqs
Recommended by GitHub's repository alerts.

We normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 11.0 that would be Debian 9
(stretch) and thus Jinja 2.8 (with security backports).

However Jinja2 before 2.10.1 suffers from a few issues that could lead
to crashes of Odoo processes.

It seems it's worth an exception to our rule for pip users, similarly to
previous bump up at d2605bccdb.

closes odoo/odoo#32601

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-07 07:04:34 +00:00
Siddarth Gajjar f3a390cb74 [IMP] generic: replace suds with zeep.
- Added new library zeep for soap request.
- Remove old suds library.

Task ID: 41696 Closes #26934
2019-02-05 11:42:18 +00:00
Christophe Simonis 5e055a2afd [MERGE] forward port branch saas-11.4 up to f6ca72b3ce 2018-11-02 10:52:55 +01:00
Christophe Simonis f6ca72b3ce [MERGE] forward port branch saas-11.3 up to 21eb31d804 2018-10-31 20:43:03 +01:00
Christophe Simonis a587325ca7 [MERGE] forward port branch saas-15 up to 00829a0beb 2018-10-31 18:31:53 +01:00
Christophe Monniez 5a04c82fff [FIX] packaging: bump Odoo version to 12 in MS Windows installer
Fixes #27420

closes odoo/odoo#27590
2018-10-09 15:21:02 +00:00
Adrian Torres a277bfb44a [REM] packaging: drop PyYAML dependency
Commit cf853a785b removed all yml tests
and the yml import engine from Odoo forever, however PyYAML remains a
dependency even though it's not used anymore.

This commit removes any reference to this lib that could be found.

closes odoo/odoo#27563
2018-10-09 12:56:03 +00:00
Christophe Monniez 5666bc3d32 [IMP] packaging: automate package update in Windows build
When building the Windows installer, a virtual machine is used with
prepackaged python modules.

With this commit, the packaging script will try to install on the
virtual machine the python packages specified in requirements.txt.
Each package is installed individually, that way, if an install fails,
the install of the other packages continues.
At the end of the process, successfully packages are listed so that they
will appear in the build log files.

Also, the Makefile was cleaned in this commit (removal of py2exe stuffs).
2018-04-26 09:22:38 +02:00
Christophe Monniez d38d62f5db [FIX] packages: install vc_redist files properly
Nsis installer was installing the wrong MS Visual C++ redistributable
file. Python 3.6 needs MS Visual C++ 2015 redistruibutable files.

Also, Nsis now differentiate Windows architecture for the nssm service
and the MS C++ redist.
2017-10-18 18:44:19 +02:00
Christophe Monniez fc76b1d565 [REM] remove any openid reference
Purpose: openid is not used anymore in Odoo, therefore it can be
safely removed.
2017-10-12 08:43:21 +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
Christophe Monniez 1ca2db0a61 [FIX] setup win32: remove python and nssm on uninstall
Purpose: When uninstalling using the windows uninstaller, python and
nssm were left beyond. This fix removes the python and nssm dirs also.
2017-10-09 08:59:20 +02:00
Christophe Monniez 06c2346da5 [REF] win32: move to WinPython...
Purpose: for multiple reasons (bytecode change in python 3.6,
         missing files for some packages, py2exe is unmaintained
         ...) the py2exe solution cannot be used anymore.
         Odoo for windows will now use a portable Python that
         will be shipped with the Windows installer.
         For that purpose, a Winpython 3.6.2 is used.
         In order to build the Windows installer, a Winpython dir
         with all the Odoo requirements fullfilled, must exists on
         the build system (qemu-kvm VM).

* nsis installer:
    - Only the python dir is used to avoid packaging too much stuffs
    - better compression level
    - starts the Odoo service using nssm
    -  bump to V11
* change the default win10 build vm path
* print a warning when uncomplete addon move
* try to force remove of addon path:
  when the addons are moved to Odoo/addons, it happens that the
  destination already exists. In that case, the source addon was not
  deleted, resulting in a uneeded file duplication.
* fix version string to avoid invalid chars in windows service
* Add requirements adpated for WinPython
* package.py now shows the traceback when a build fails
* verify that a file exists before publishing
* debuild now creates an .xz file instead of .gz
* package: use logging module
* kvm CPU that works with older versions.
* fix a pexpect encoding bug
* fix the version to remove special chars '~' which is not appreciated
  by windows services

[REM] win32setup: Remove win32 python service

Purpose:
    Before this commit, the win32 service was managed by an executable
    builded from those two files with the help of py2xe.
    The win32 service is now managed by nssm which starts Odoo and therefore, those
    files are not needed anymore.
2017-10-03 12:01:53 +02:00
xmo-odoo 2e6a589f41 [FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)

issue 8530
2017-04-27 13:59:33 +02:00
Simon Lejeune 76c443eda3 [REL] 10.0rc1 2016-09-30 12:26:30 +02:00
Simon Lejeune c59eb4ffc1 [REF] packaging: renamed configuration files
no fallbacks were implemented to `openerp-server.conf`.
2016-09-30 12:05:49 +02:00
Simon Lejeune ed8f0c83c4 [REF] cli: renamed openerp-server to odoo-bin
The use of an entry point was considered in order to provide
an `odoo` command in the path for the packages users, but the
generated entry point will first check that all the things in
install_requires were provided in a not bright way: it'll check
that it matches a distribution name. This does not work because
python-chart does not have the distrubtion name "pychart" which
is provided by the python-pychart package in debian jessie. Same
for suds-jurko which is provided by python-suds in debian stretch
but does not have the distribution name "suds".

Also, adapted the  packages tests to these cli changes.
2016-09-30 12:05:49 +02:00
Simon Lejeune 7f8ad73618 [REF] packaging: windows: don't hardcode service name
Correctly pass it to the nsis script the same way it was done for
the version and python version. this was a source of error at each
release.
2016-09-30 12:05:49 +02:00
Simon Lejeune 71705e1347 [REF] packaging: windows: bundle postgresql 9.5 2016-09-30 12:05:49 +02:00
Simon Lejeune eb501081c5 [REF] packaging: openerp has been renamed odoo
Fix the various place when the rename of the git root directory
broke the packaging script. Also, we can now name the library
"odoo".
2016-09-30 12:05:48 +02:00
Martin Trigaux e256262b0e [MERGE] Forward-port 9.0 up to 422f3b5d 2015-10-07 16:42:33 +02:00
Simon Lejeune f2d26cef4c [FIX] packaging: windows: adapt service name
rev eba1133d4a updated to 10.0.
2015-09-11 21:52:16 +02:00
Simon Lejeune a470d69e7c [FIX] packaging: windows: typos 2015-09-11 18:10:55 +02:00
Simon Lejeune 87b46bb7e9 [FIX] packaging: windows: bump version number 2015-09-11 18:10:55 +02:00
Olivier Dony a3732aef6e [LEGAL] Switch to LGPLv3 License
99% of the contributors have signed the CLA
The rest of them have been contacted by email
and are free to either sign the CLA or ask
for their contributions to be removed from
Odoo Community Edition.

See also:
- https://www.odoo.com/cla
- https://www.odoo.com/blog/odoo-news-5/post/adapting-our-open-source-license-245
2015-09-08 17:58:38 +02:00
Simon Lejeune 7c05b7965d [REF] packaging: windows: use less.js-windows
Fixes #7951
2015-08-07 18:18:33 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Simonis d215a08db1 [MERGE] forward port of branch 8.0 up to 86d7f52 2015-07-14 15:57:39 +02:00