-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[ADD] Estate:New Model Created #1192
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
sopat-odoo
wants to merge
18
commits into
odoo:19.0
Choose a base branch
from
odoo-dev:19.0-tutorials-estate-sopat
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 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
88181a3
[ADD] Chapter 2&3 (Estate)
sopat-odoo 15ba5f8
[IMP] Estate:Fixed Issues and Completed Chapter-4
sopat-odoo 1039a39
[IMP] Estate:Partially Completed Chapter-5
sopat-odoo aab2bd1
[IMP] Estate:Completed Chapter-5
sopat-odoo ae34671
[IMP] Estate:Errors Fixed & Completed Chapter-6
sopat-odoo 2db9029
[IMP] Estate: Completed Chapter-7
sopat-odoo 1f35744
[IMP] estate: Partially Completed Chapter-8
sopat-odoo f5e96ec
[IMP] estate: Completed Chapter-8
sopat-odoo 228fe82
[IMP] estate: Completed Chapter-9
sopat-odoo 7b7fa47
[IMP] estate: Completed Ch-10
sopat-odoo a51fbd7
[IMP] estate: Partially Completed Ch-11
sopat-odoo 6228369
[IMP] estate: Completed Ch-11
sopat-odoo 1cd13b4
[IMP] estate: Completed Ch-12
sopat-odoo b58584b
[IMP] estate: Completed Task of Scheduling Visits
sopat-odoo 38b0320
[IMP] estate: Completed SLA Task
sopat-odoo 176abb4
[ADD] estate: Completed Chapter-13
sopat-odoo 1857156
[IMP] estate: Completed Chapter-14
sopat-odoo 331f9b6
[IMP] estate: Coding Guidelines Improvements
sopat-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,13 @@ | ||
| { | ||
| 'name': 'Real Estate', | ||
| 'author': 'soham', | ||
| 'license': 'LGPL-3', | ||
| 'depends': ['base'], | ||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_menus.xml', | ||
| ], | ||
| 'installable': True, | ||
| '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,40 @@ | ||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): | ||
| _name = "estate.property" | ||
|
sopat-odoo marked this conversation as resolved.
Outdated
|
||
| _description = "Real Estate Property" | ||
|
|
||
| name = fields.Char(required=True) | ||
| expected_price = fields.Float(required=True) | ||
| description = fields.Text() | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date(copy=False) | ||
| selling_price = fields.Float(readonly=True,copy=False) | ||
| bedrooms = fields.Integer(default= 2) | ||
| living_area = fields.Integer() | ||
| active = fields.Boolean(default=True) | ||
| facades = fields.Integer() | ||
| garage = fields.Boolean() | ||
| garden = fields.Boolean() | ||
| garden_area = fields.Integer() | ||
| garden_orientation = fields.Selection( | ||
| string='Orientation', | ||
| selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')], | ||
| help="The direction the garden faces." | ||
|
|
||
| ) | ||
|
sopat-odoo marked this conversation as resolved.
|
||
| state = fields.Selection( | ||
| selection=[ | ||
| ('new', 'New'), | ||
| ('offer_received', 'Offer Received'), | ||
| ('offer_accepted', 'Offer Accepted'), | ||
| ('sold', 'Sold'), | ||
| ('canceled', 'Cancelled'), | ||
| ], | ||
|
sopat-odoo marked this conversation as resolved.
|
||
| string="Status", | ||
| required=True, | ||
| copy=False, | ||
| default='new', | ||
| ) | ||
|
|
||
|
sopat-odoo marked this conversation as resolved.
Outdated
|
||
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,7 @@ | ||
| <odoo> | ||
| <menuitem id="estate_menu_root" name="Real Estate"/> | ||
| <menuitem id="estate_first_level_menu" name="Advertisements" parent="estate_menu_root"/> | ||
| <menuitem id="estate_property_menu_action" | ||
| action="estate_property_action" | ||
| parent="estate_first_level_menu"/> | ||
| </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,7 @@ | ||
| <odoo> | ||
| <record id="estate_property_action" model="ir.actions.act_window"> | ||
| <field name="name">Properties</field> | ||
| <field name="res_model">estate.property</field> | ||
| <field name="view_mode">list,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.