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

closes odoo/documentation#6632

X-original-commit: 620508fb29
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
This commit is contained in:
Claire Bretton (clbr) 2023-10-17 11:56:39 +02:00
parent 0dd8974ca1
commit 6fd7446ad9

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.