Compare commits

...

2 Commits

Author SHA1 Message Date
Claire Bretton (clbr)
42fec266ce [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.
2023-11-23 10:57:05 +01:00
Claire Bretton (clbr)
45885429fb [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.
2023-11-23 10:57:05 +01:00
2 changed files with 6 additions and 2 deletions

View File

@@ -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 <reference/cmdline/server>` 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 <odoo-bin --update>`: 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
--------------

View File

@@ -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.