[ADD] estate: Add real estate module structure#1332
Conversation
Estate module for managing real estate advertisements in Odoo.
This commit adds the required access rights to ensure authorized users can interact with the models according to their role configuration.
Define 'test_model_action' window action with list and form modes Implement structured root, category, and action menus for Real Estate
Define explicit list view columns for estate.property. Create a structured form view layout using sheets, groups, and notebooks. Implement a search view with custom fields, an 'Available' filter, and a 'Group By' postcode option.
This commit introduces dedicated offer and tag models with the necessary views, actions, menus, and access rights. Properties can now be associated with multiple tags and offers
This commit adds sample properties, types, and offers to the estate module for testing.
mash-odoo
left a comment
There was a problem hiding this comment.
Hello!
Good start on the task.
Please look into my comments..
| @@ -0,0 +1,50 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo noupdate="1"> | |||
There was a problem hiding this comment.
What's the purpose of noupdate="1"? What difference will it make with/without writing it?
| @@ -0,0 +1,4 @@ | |||
| from . import estate_property as estate_property | |||
There was a problem hiding this comment.
| from . import estate_property as estate_property | |
| from . import estate_property |
You can avoid writing this.
| from dateutil.relativedelta import relativedelta | ||
| from odoo import fields, models |
There was a problem hiding this comment.
Please refer to this for ordering your imports
| from odoo import fields, models | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): |
There was a problem hiding this comment.
What's the purpose of writing models.Model?
| garden = fields.Boolean() | ||
| garden_area = fields.Integer() | ||
| garden_orientation = fields.Selection( | ||
| [("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")] |
There was a problem hiding this comment.
| [("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")] | |
| [('north', "North"), ('south', "South"), ('east', "East"), ('west', "West")] |
Try keeping the key(and other technical string) in single quotes and value(strings which are to be displayed on UI) in double quotes.
| _description = "this model is for estate property offers" | ||
| price = fields.Float() |
There was a problem hiding this comment.
| _description = "this model is for estate property offers" | |
| price = fields.Float() | |
| _description = "this model is for estate property offers" | |
| price = fields.Float() |
| ) | ||
|
|
||
| expected_price = fields.Float(required=True) | ||
| selling_price = fields.Float(readonly=True, copy=False, default=3000) |
There was a problem hiding this comment.
Why do you give a default selling price?
|
|
||
| class EstatePropertyTag(models.Model): | ||
| _name = "estate.property.tag" | ||
| _description = "this model provides tags for estate property" |
| <field name="postcode" string="Postcode"/> | ||
| <field name="bedrooms" string="Bedrooms"/> |
There was a problem hiding this comment.
Have you checked the difference without writing this string?
| <field name="bedrooms" string="Bedrooms"/> | ||
| <field name="living_area" string="Living Area (sqm)"/> | ||
| <field name="facades" string="Facades"/> | ||
| <separator/> |

Estate module for managing real estate advertisements in Odoo.