-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[ADD] Module - Estate Property Created #1197
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
Draft
sumai-odoo
wants to merge
22
commits into
odoo:19.0
Choose a base branch
from
odoo-dev:19.0-tutorials-estate-sumai
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8c49ccd
[ADD] Estate: Finished Chapters 2-3
sumai-odoo 97ba15a
[ADD] Estate: Finished Chapters 4
sumai-odoo 1fe4ef9
[IMP] Estate: Chapter 5 - Ongoing
sumai-odoo fe44d9a
[IMP] Estate: Chapter 5 - Completed
sumai-odoo 8ae1a0b
[IMP] Estate: Chapter 6- Ongoing
sumai-odoo dcf4d0c
[IMP] Estate: Chapter 6- Completed
sumai-odoo 49cfdfc
[IMP] Estate: Chapter 7- Started
sumai-odoo 49c7c2d
[IMP] Estate: Chapter 7- Ongoing
sumai-odoo 9b534dd
[IMP] Estate: Chapter 7- Completed
sumai-odoo 07fb5f4
[IMP] Estate: Chapter 8- Started
sumai-odoo 662d410
[IMP] Estate: Chapter 8- Ongoing
sumai-odoo 2d3ad0b
[IMP] Estate: Chapter 8- Completed
sumai-odoo 842fea9
[IMP] Estate: Chapter 9- Started
sumai-odoo b054b28
[IMP] Estate: Chapter 9- completed
sumai-odoo 8010efa
[IMP] Estate: Chapter 10- completed
sumai-odoo 080557b
[FIX] Estate:Applied changes as per requested
sumai-odoo ace5981
[IMP] Estate: Visiting Task
sumai-odoo 2ba007b
[IMP] Estate: Completed Chapter 12
sumai-odoo 5045e70
[IMP] Estate: Property Issue Task
sumai-odoo dd19991
[ADD] Estate Account Module
sumai-odoo 9ab5933
[ADD] Estate: Chapter 14 & 15 Completed
sumai-odoo 3f604b4
[ADD] Estate: Code Cleanup
sumai-odoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| 'name': 'Real Estate', | ||
| 'summary': 'Manage real estate properties and offers', | ||
| 'description': "This module allows managing property advertisements,including property details, offers, and related data.", | ||
| 'author': 'Sudarshan Maity (sumai)', | ||
| 'website': '', | ||
| 'category': 'Real Estate', | ||
| 'version': '1.0', | ||
| 'license': 'LGPL-3', | ||
|
|
||
| 'depends': [ | ||
| 'base', | ||
| ], | ||
|
|
||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_menus.xml', | ||
| ], | ||
|
|
||
| 'installable': True, | ||
|
sumai-odoo marked this conversation as resolved.
|
||
| 'application': True, | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import estate_property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| from datetime import timedelta | ||
|
|
||
| from odoo import models, fields | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): | ||
|
sumai-odoo marked this conversation as resolved.
|
||
| _name = 'estate.property' | ||
| _description = 'Real Estate Property' | ||
|
|
||
| name = fields.Char(string="Title", required=True) | ||
| description = fields.Text(string="Description") | ||
| postcode = fields.Char(string="Postcode") | ||
|
sumai-odoo marked this conversation as resolved.
Outdated
|
||
| date_availability = fields.Date(string="Available From", copy=False, default=lambda self: fields.Date.today() + timedelta(days=90)) | ||
| expected_price = fields.Float(string="Expected Price", required=True) | ||
| selling_price = fields.Float(string="Selling Price", readonly=True, copy=False) | ||
| bedrooms = fields.Integer(string="Bedrooms", default=2) | ||
| living_area = fields.Integer(string="Living Area (sqm)", copy=False) | ||
| facades = fields.Integer(string="Facades") | ||
| garage = fields.Boolean(string="Garage") | ||
| garden = fields.Boolean(string="Garden") | ||
|
sumai-odoo marked this conversation as resolved.
Outdated
|
||
| garden_area = fields.Integer(string="Garden Area (sqm)") | ||
| garden_orientation = fields.Selection( | ||
| [ | ||
| ('north', "North"), | ||
| ('south', "South"), | ||
| ('east', "East"), | ||
| ('west', "West"), | ||
| ], | ||
| string="Garden Orientation" | ||
| ) | ||
| active = fields.Boolean(string="is Active", default=True) | ||
| state = fields.Selection( | ||
| [ | ||
| ('new', "New"), | ||
| ('offer_received', "Offer Received"), | ||
| ('offer_accepted', "Offer Accepted"), | ||
| ('sold', "Sold"), | ||
| ('cancelled', "Cancelled") | ||
| ], | ||
| string="Status", required=True, copy=False, default="new") | ||
|
sumai-odoo marked this conversation as resolved.
Outdated
|
||
| swimming_pool = fields.Boolean(string="Swimming Pool") # extra fields | ||
| property_type = fields.Selection( | ||
| [ | ||
| ('house', "House"), | ||
| ('apartment', "Apartment"), | ||
| ('villa', "Villa"), | ||
| ('land', "Land") | ||
| ], | ||
| string="Property Type" | ||
| ) | ||
|
sumai-odoo marked this conversation as resolved.
Outdated
|
||
| property_age = fields.Integer(string="Property Age") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
| access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <odoo> | ||
|
|
||
| <!-- Root Menu --> | ||
| <menuitem | ||
| id="menu_real_estate_root" | ||
| name="Real Estate" | ||
| sequence="1"/> | ||
|
|
||
| <!-- First Level Menu --> | ||
| <menuitem | ||
| id="menu_real_estate_advertisements" | ||
| name="Advertisements" | ||
| parent="menu_real_estate_root" | ||
| sequence="1"/> | ||
|
sumai-odoo marked this conversation as resolved.
|
||
|
|
||
| <!-- Second Level Menu --> | ||
| <menuitem | ||
| id="menu_real_estate_properties" | ||
| name="Properties" | ||
| parent="menu_real_estate_advertisements" | ||
| action="action_estate_property" | ||
| sequence="1"/> | ||
|
|
||
| </odoo> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| <odoo> | ||
|
|
||
| <record id="action_estate_property" model="ir.actions.act_window"> | ||
| <field name="name">Properties</field> | ||
| <field name="res_model">estate.property</field> | ||
| <field name="view_mode">kanban,list,form</field> | ||
| </record> | ||
|
|
||
| <record id="view_estate_property_list" model="ir.ui.view"> | ||
| <field name="name">estate.property.list</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Properties"> | ||
|
|
||
| <field name="name"/> | ||
| <field name="postcode"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area"/> | ||
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
| <field name="date_availability"/> | ||
| <field name="property_type"/> | ||
|
|
||
| </list> | ||
| </field> | ||
| </record> | ||
|
|
||
| <record id="view_estate_property_form" model="ir.ui.view"> | ||
| <field name="name">estate.property.form</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <form string="Property"> | ||
| <sheet> | ||
| <group> | ||
| <group> | ||
| <field name="name"/> | ||
| <field name="postcode"/> | ||
| <field name="date_availability"/> | ||
| </group> | ||
| <group> | ||
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
| </group> | ||
| </group> | ||
| <notebook> | ||
| <page string="Description"> | ||
| <field name="description"/> | ||
| </page> | ||
| <page string="Details"> | ||
| <group> | ||
| <group> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area"/> | ||
| <field name="facades"/> | ||
| <field name="garage"/> | ||
| </group> | ||
| <group> | ||
| <field name="garden"/> | ||
| <field name="garden_area"/> | ||
| <field name="garden_orientation"/> | ||
| </group> | ||
| </group> | ||
| </page> | ||
| <page string="Extra Details"> | ||
| <group> | ||
| <group> | ||
| <field name="state"/> | ||
| <field name="property_age"/> | ||
| <field name="property_type"/> | ||
| </group> | ||
| <group> | ||
| <field name="swimming_pool"/> | ||
| <field name="active"/> | ||
| </group> | ||
| </group> | ||
| </page> | ||
| </notebook> | ||
| </sheet> | ||
| </form> | ||
| </field> | ||
| </record> | ||
|
|
||
| </odoo> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.