tests/odoo: fix broken test

Odoo does not initialize the database by default,
it must be explicitly initialized for the test as written to succeed.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2024-06-19 13:35:23 +00:00
parent 934bfb6c36
commit 6c10cfba34
No known key found for this signature in database
GPG Key ID: 0437A96EFE4C426E

View File

@ -14,6 +14,18 @@ import ./make-test-python.nix ({ pkgs, lib, package ? pkgs.odoo, ...} : {
package = package;
domain = "localhost";
};
# odoo does not automatically initialize its database,
# even if passing what _should_ be the equivalent of these options:
# settings = {
# options = {
# database = "odoo";
# init = "base";
# };
# };
systemd.services.odoo.preStart = ''
HOME=$STATE_DIRECTORY ${package}/bin/odoo -d odoo -i base --stop-after-init --without-demo all
'';
};
};