Functional Training - Estate module#1180
Conversation
blse-odoo
left a comment
There was a problem hiding this comment.
This is a good start!
Regarding the commit's messages, did you have a look at the git guidelines? (It's a bit of a detail, but it's good to get familiar with the process)
estate/models/estate_property.py
Outdated
| date_availability = fields.Date( | ||
| string='Available From', | ||
| copy=False, | ||
| default=fields.Date.add(fields.Date.today(), months=+3)) |
There was a problem hiding this comment.
The declaration of the fields is only read once when the server starts. Here the default value will be computed just once the day the server is started, not every time a record is created.
If you starts the server on the 01/01, but create a new record on the 17/02, the default will be the value computed at start up, thus 01/04.
You can pass a lambda to default, and it will be computed on each record creation
fc36118 to
39fbcbf
Compare
|
Just a small detail about the message of your last commit: the |
d8b41fd to
1f4e08d
Compare
9b2b1cb to
9667687
Compare
9667687 to
7aea702
Compare

No description provided.