From 2d641b41d280e3e4b9bdc6ecaba2a28dd248dd86 Mon Sep 17 00:00:00 2001 From: "Claire Bretton (clbr)" Date: Tue, 17 Oct 2023 11:53:46 +0200 Subject: [PATCH 1/2] [FIX] getting_started: invalid addons-path The "../technical-training-sandbox" is added too early in the path since its still empty, and results into an "invalid addons-path" error. X-original-commit: 8707609b38ea69372c57c4b6aa7579b783fb1a81 --- content/developer/tutorials/getting_started/02_setup.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/developer/tutorials/getting_started/02_setup.rst b/content/developer/tutorials/getting_started/02_setup.rst index 932afad5ca..ef9fdc8be1 100644 --- a/content/developer/tutorials/getting_started/02_setup.rst +++ b/content/developer/tutorials/getting_started/02_setup.rst @@ -74,7 +74,7 @@ interface of the server. .. code-block:: console $ cd $HOME/src/odoo/ - $ ./odoo-bin --addons-path="addons/,../enterprise/,../technical-training-sandbox" -d rd-demo + $ ./odoo-bin --addons-path="addons/,../enterprise/" -d rd-demo There are multiple :ref:`command-line arguments ` that you can use to run the server. In this training you will only need some of them. @@ -118,6 +118,10 @@ the server. In this training you will only need some of them. - :option:`-u `: Update some modules before running the server (comma-separated list). +.. note:: + For now you cannot add `../technical-training-sandbox` to your `addons-path` as it is empty + and will result into an invalid addons-path folder error, but you will have to add it back later on ! + Log in to Odoo -------------- From aa964acadb455480f6e32332833dc975c1555ece Mon Sep 17 00:00:00 2001 From: "Claire Bretton (clbr)" Date: Tue, 17 Oct 2023 11:56:39 +0200 Subject: [PATCH 2/2] [FIX] getting_started: remove useless lambda The lambda function here is useless and makes newdooers think they need to use it everytime. `default=fields.Date.add(fields.Date.today(), months=3))` should do the trick, no lambda involved. X-original-commit: 620508fb29e06644eafe2fd91c1fada3002852a6 --- content/developer/tutorials/getting_started/06_firstui.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/developer/tutorials/getting_started/06_firstui.rst b/content/developer/tutorials/getting_started/06_firstui.rst index f6b83c7d99..8b20a4fbfb 100644 --- a/content/developer/tutorials/getting_started/06_firstui.rst +++ b/content/developer/tutorials/getting_started/06_firstui.rst @@ -232,7 +232,7 @@ Any field can be given a default value. In the field definition, add the option float, string) or a function taking a model and returning a value:: name = fields.Char(default="Unknown") - last_seen = fields.Datetime("Last Seen", default=lambda self: fields.Datetime.now()) + last_seen = fields.Datetime("Last Seen", default=fields.Datetime.now) The ``name`` field will have the value 'Unknown' by default while the ``last_seen`` field will be set as the current time.