Skip to content

Commit f5deed0

Browse files
committed
[IMP] estate: Use date helper / Rename model
1 parent 99bba1f commit f5deed0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

estate/__manifest__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
'license': 'LGPL-3',
44
'version': '1.0',
55
'depends': ['base'],
6-
'author': "ngtpn",
6+
'author': "Odoo S.A.",
77
'category': 'Category',
88
'description': """
99
Real Estate Advertisement module
1010
""",
11+
'application': True,
1112
'data': [
1213
'security/ir.model.access.csv',
1314
'views/estate_property_views.xml',

estate/models/estate_property.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from odoo import fields, models
2-
from dateutil.relativedelta import relativedelta
32

43

5-
class Property(models.Model):
4+
class EstateProperty(models.Model):
65
_name = "estate.property"
76
_description = "All properties"
87

@@ -11,7 +10,7 @@ class Property(models.Model):
1110
postcode = fields.Char()
1211
date_availability = fields.Date(
1312
copy=False,
14-
default=fields.Datetime.today() + relativedelta(months=+3),
13+
default=fields.Date.add(fields.Date.today(), months=3),
1514
)
1615
expected_price = fields.Float(required=True)
1716
selling_price = fields.Float(readonly=True, copy=False)

0 commit comments

Comments
 (0)