tests/odoo: replace db init workaround with services.odoo.autoInit

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2024-07-18 15:50:32 +00:00 committed by zimbatm
parent 85761ade56
commit c2b4c0e51d

View File

@ -12,20 +12,10 @@ import ./make-test-python.nix ({ pkgs, lib, package ? pkgs.odoo, ...} : {
services.odoo = {
enable = true;
package = package;
autoInit = true;
autoInitExtraFlags = [ "--without-demo=all" ];
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
'';
};
};