-
-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
odoo fixes #327729
odoo fixes #327729
Conversation
Fixes this runtime error: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly.
This allows running multiple commands with the same settings.
When enabled, Odoo will automatically initialize the database on startup.
A follow-up to #327641 |
@@ -113,7 +115,9 @@ in | |||
"HOME=%S/odoo" | |||
"ODOO_RC=${cfgFile}" | |||
]; | |||
}; | |||
} // (lib.optionalAttrs cfg.autoInit { | |||
ExecStartPre = "${cfg.package}/bin/odoo --init=INIT --database=odoo --db_user=odoo --stop-after-init"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pessimistic that all init steps are idempotent, such that running this before each start won't mess up a database with runtime data.
Might I suggest something like:
INITIALIZED="${cfg.data_dir}/.odoo.initialized"
if [ ! -e "$INITIALIZED" ]; then
"${cfg.package}/bin/odoo --init=INIT --database=odoo --db_user=odoo --stop-after-init"
touch "$INITIALIZED"
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 It seems to work, but better safe than sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume, if plugins are changed init does not need to be re-run? Then 👍
I also recommend removing the following from # 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
''; |
I also recommending adding a @zimbatm if you like I'm happy to add commits on top of this series with my proposals. |
Result of 2 packages blacklisted:
2 packages built:
|
Don't hide the data is a private sub-folder. Before: * /var/lib/private/odoo/.local/share/Odoo/ After: * /var/lib/private/odoo/data
Thanks, that's good feedback. I will stop force-pushing if you want to add your changes on top. Otherwise I'll get back to it tomorrow. |
@zimbatm done, but I don't have commit access to append to this PR. I'm providing the proposed commits either of 2 ways:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, proposed changes as per my previous message
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Allow module user to specify additional flags to be passed on autoInit Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
thanks, pushed your patches and waiting on ofBorg |
Description of changes
Banging Odoo 17 into shape.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.