Package Details: odoo-nightly 17.0-16

Git Clone URL: https://aur.archlinux.org/odoo-nightly.git (read-only, click to copy)
Package Base: odoo-nightly
Description: Odoo. Open Source Apps To Grow Your Business.
Upstream URL: https://odoo.com/
Licenses: LGPL-3.0-only
Conflicts: odoo, odoo-17, openerp
Replaces: odoo, odoo-17, openerp
Submitter: HLFH
Maintainer: HLFH
Last Packager: HLFH
Votes: 2
Popularity: 0.036219
First Submitted: 2024-05-12 10:04 (UTC)
Last Updated: 2024-10-24 03:57 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

SamWhited commented on 2024-05-13 16:27 (UTC)

Thanks again for all the fixes; sorry to keep sporadically noticing other issues:

You've got the environment being set in the services file Environment="PATH=/var/lib/odoo/.venv/bin:$PATH", however, this is not executed in a shell, so there will be no variable expansion. The environment is literally being set to include the string "$PATH". This makes it unable to find wkhtmltopdf so invoices and quotes can't be generated.

This line isn't needed since it's not calling anything in the virtual environment anyways, as far as I know?

HLFH commented on 2024-05-13 15:55 (UTC)

fixed

SamWhited commented on 2024-05-13 14:16 (UTC) (edited on 2024-05-13 14:17 (UTC) by SamWhited)

Oh! Sorry, and another little bug I found:

The __pycache__ directory is being bundled with the package since we're using the venv, but we probably don't want that. We should probably remove .venv/bin/__pycache__ just before copying the venv over so that we have a nice fresh environment with no pre-built files.

SamWhited commented on 2024-05-13 14:11 (UTC) (edited on 2024-05-13 15:15 (UTC) by SamWhited)

Another suggestion: the logfile is currently set in both the config and the service. However, most arch packages use journald for logging. If we leave the log file off, odoo will log to stderr which systemd will automatically wire up to the journal. This may better match Arch user expectations (and they can always add it back to the log file if they need it, and it probably doesn't need to be hardcoded in the service file at all).

Thanks again for making this package; it's really saving me a ton of time and effort!

EDIT: or even better, I just noticed that it has syslog support. If you add syslog = true to the config file and remove the log files it will log with proper levels (and then journalctl can filter on eg. debug vs. info vs. warn)

HLFH commented on 2024-05-13 02:38 (UTC)

I also updated the .venv path with: virtualenv-tools3. This odoo-nightly is now fully working.

HLFH commented on 2024-05-12 19:29 (UTC)

Fixed as well, and I fixed the stop for the systemd unit.

SamWhited commented on 2024-05-12 15:06 (UTC)

Note that ExecStartPre=/bin/bash -c '. /var/lib/odoo/.venv/bin/activate' and the line in the post-install message about sourcing the venv aren't doing anything. They don't hurt either, but you're already calling odoo from within the venv which will already use the venv. Also IIRC the exec directives in systemd run in different sessions, so you're sourcing the venv, exiting, and then running the command. Doesn't hurt anything though, it's just unnecessary.

Thanks again for doing this, it's so nice to be able to run odoo locally again without having to manually install it!

HLFH commented on 2024-05-12 14:58 (UTC)

Fixed

SamWhited commented on 2024-05-12 12:02 (UTC) (edited on 2024-05-12 12:06 (UTC) by SamWhited)

Last note for now; this package doesn't appear to actually install odoo. When you do the install you need to use --prefix option, not destdir. Otherwise the existing prefix is still being used and destdir is being prepended so you'll install to $pkgdir/home/you/whateverbuilddir not to the actual build environment.

With prefix you'll want to specify the full path, so --prefix="$pkgbuild"/var/lib/odoo/.venv or wherever it's going.

If you're installing it into the venv, it might also be easier to just leave off this option which will install into the venv by default, then when you copy it over it's already in there.

SamWhited commented on 2024-05-12 11:27 (UTC) (edited on 2024-05-12 12:33 (UTC) by SamWhited)

Also, a few other nits:

I don't think this will start without postgresql so the service file should likely specificy:

Requires=postgresql.service
After=postgresql.service

You'll also need to change the admin_passwd in the config, so it might be worth showing a post-install message to tell the user about that. Also, I think before first run you'll need to manually run odoo with -i base to initialize the database (I think? Maybe if the admin password is already set it does this for you?). This should probably be included in any post-install message too, but should be experimented with first to make sure it's required, I don't know odoo stuff well enough to know.