-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ADD] estate: init module #1032
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
Open
KarimH537
wants to merge
15
commits into
19.0
Choose a base branch
from
19.0-tutorial-kmhma
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.
Open
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
967fc30
[ADD] estate module
KarimH537 ba2124f
[ADD] estate: add estate_property fields
KarimH537 f920c0a
[ADD] estate: add access rights
KarimH537 e722790
[ADD] estate: add action, menu, and active and state fields
KarimH537 815f4b0
[ADD] estate: add attrs to list view, restructured form view, add sea…
KarimH537 783aac2
[FIX] estate: add missing EOLs, trailing commas
KarimH537 a64bdd2
[ADD] estate: add relations with salesman, buyer, tags, and offers
KarimH537 58f471a
[MOV] estate: collect estate property views in a single file
KarimH537 f962d4b
[ADD] estate: compute total_area, best_price and validity; set defaul…
KarimH537 3ffa891
[ADD] estate: add sold/cancel buttons on property; add accept/refuse …
KarimH537 39831c5
[ADD] estate: add constraints on prices, and unique types and tags
KarimH537 53c7607
[ADD] estate: added the sprinkles
KarimH537 a68f98c
[ADD] estate: add properties to user, and properites in user profile
KarimH537 bc04c28
[ADD] estate: create estate_account module
KarimH537 0959dc3
[ADD] estate: add properties kanban view
KarimH537 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
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,26 @@ | ||
| { | ||
| 'name': "Real Estate", | ||
|
|
||
| 'summary': """ | ||
| Cool Real Estate App | ||
| """, | ||
| 'description': """ | ||
| Cool Real Estate App | ||
| """, | ||
| 'author': "kmhma", | ||
| 'website': "https://www.odoo.com/", | ||
| 'category': 'Tutorials', | ||
| 'version': '0.1', | ||
| 'application': True, | ||
| 'installable': True, | ||
| 'depends': ['base'], | ||
|
|
||
| 'data': [ | ||
| "security/ir.model.access.csv", | ||
| "views/estate_property_views.xml", | ||
| "views/estate_menus.xml" | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ], | ||
| 'assets': { | ||
| }, | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 'license': 'AGPL-3' | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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,45 @@ | ||
| from odoo import models, fields | ||
| from dateutil.relativedelta import relativedelta | ||
|
|
||
|
|
||
| class estateProperty(models.Model): | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| _name = "estate.property" | ||
| _description = "Real Estate model" | ||
|
|
||
| name = fields.Char(required=True) | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date( | ||
| copy=False, default=fields.Datetime.today() + relativedelta(months=3) | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
| expected_price = fields.Float(required=True) | ||
| selling_price = fields.Float(readonly=True, copy=False) | ||
| bedrooms = fields.Integer(default=2) | ||
| living_area = fields.Integer() | ||
| facades = fields.Integer() | ||
| garage = fields.Boolean() | ||
| garden = fields.Boolean() | ||
| active = fields.Boolean(default=True) | ||
| garden_area = fields.Integer() | ||
| garden_orientation = fields.Selection( | ||
| string="Orientation", | ||
| selection=[ | ||
| ("north", "North"), | ||
| ("south", "South"), | ||
| ("east", "East"), | ||
| ("west", "West"), | ||
| ], | ||
| ) | ||
| state = fields.Selection( | ||
| string="State", | ||
| selection=[ | ||
| ("new", "New"), | ||
| ("offer", "Offer"), | ||
| ("received", "Received"), | ||
| ("offer accepted", "Offer Accepted"), | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ("sold", "Sold"), | ||
| ("cancelled", "Cancelled"), | ||
| ], | ||
| required=True, | ||
| copy=False, | ||
| default="new", | ||
| ) | ||
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 | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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,8 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <menuitem id="estate_menu_root" name="Estate Property"> | ||
| <menuitem id="advertisement_menu" name="Advertisments"> | ||
| <menuitem id="properties_action" action="estate_property_view"/> | ||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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,8 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <record id="estate_property_view" model="ir.actions.act_window"> | ||
| <field name="name">Estate Property</field> | ||
| <field name="res_model">estate.property</field> | ||
| <field name="view_mode">list,form</field> | ||
| </record> | ||
| </odoo> | ||
KarimH537 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.