-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] estate: new estate module #324
base: 18.0
Are you sure you want to change the base?
Conversation
apri-odoo
commented
Feb 6, 2025
- introduced new estate module
estate/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
from . import models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line at the end of the file
estate/__manifest__.py
Outdated
@@ -0,0 +1,15 @@ | |||
{ | |||
'name': 'Estate', | |||
'version':'1.0.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'version':'1.0.0', | |
'version':'1.0', |
estate/__manifest__.py
Outdated
'version':'1.0.0', | ||
'depends': ['base'], | ||
'description': """ | ||
This is a base version of the Estate module for real estate management. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a base version of the Estate module for real estate management. | |
This is a base version of the Estate module for real estate management. |
estate/__manifest__.py
Outdated
'installable': True, | ||
'application': True, | ||
'auto_install': False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'installable': True, | |
'application': True, | |
'auto_install': False, | |
'application': True, |
installable
is True by default no need to add it explicitely
auto_install
is only useful when you have other modules as dependencies, it makes no sense here.
estate/models/estate_property.py
Outdated
garage = fields.Boolean() | ||
garden = fields.Boolean() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
garage = fields.Boolean() | |
garden = fields.Boolean() | |
is_garage = fields.Boolean() | |
is_garden = fields.Boolean() |
Try to define boolean fields in this way which make it more readable and easy to code.
95bbd57
to
82a3ce3
Compare
-ADD- estate models -ADD- __init_.py -ADD- estate_property.py -ADD- estate security -ADD- ir.model.access.csv -ADD- link this csv to esate/__manifest__.py
-Introduce security so that we can manage who can access that models. -In security ;add two file one is .CSV & another one is .XML -Introduce views ;define properties and menu's
82a3ce3
to
afe2d0d
Compare
-upgrade XML file with list,form,view -[FIX] Replaced 'status' with 'state' in estate_property_views.xml.
estate/models/estate_property.py
Outdated
_description = "Real Estate Property" | ||
|
||
name = fields.Char(required=True) | ||
# active field define here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# active field define here |
estate/models/estate_property.py
Outdated
|
||
name = fields.Char(required=True) | ||
# active field define here | ||
active = fields.Boolean(string="Active",default=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
active = fields.Boolean(string="Active",default=True) | |
active = fields.Boolean(string="Active", default=True) |
when we define a field with more than one parameters add a space between them to make it clear
<group> | ||
<h1> | ||
<field name="name"/> | ||
</h1> | ||
</group> | ||
<newLine/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<group> | |
<h1> | |
<field name="name"/> | |
</h1> | |
</group> | |
<newLine/> | |
<h1> | |
<field name="name"/> | |
</h1> |
Try to avoid unnecessary tags. when we give h1 under group it will again remove the label than why to add it.
<field name="bedrooms" string="Bedrooms" /> | ||
<field name="living_area" string="Living Area (sqm)" /> | ||
<field name="facades" string="Facades" /> | ||
<filter name="state" string="Available" domain="['|',('state', '=', 'new'), ('state' , '=' , 'offer_accept')]"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<filter name="state" string="Available" domain="['|',('state', '=', 'new'), ('state' , '=' , 'offer_accept')]"/> | |
<filter name="state" string="Available" domain="['|',('state', '=', 'new'), ('state' , '=' , 'offer_accept')]"/> |
try to do this without | operator.
b160838
to
7b5e9b5
Compare
-add the Real Estate Property Type table. -add the buyer and the salesperson. -introduce property tag and offers
7b5e9b5
to
ad5a089
Compare
-add total price calculate from living & garden area using compute. -add best offer from maximum price.
f99365a
to
8e85492
Compare