-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[ADD] estate: initial Real Estate module with models, views, and rela… #757
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
raaa-odoo
wants to merge
15
commits into
odoo:18.0
Choose a base branch
from
odoo-dev:18.0-training-raaa
base: 18.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 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1b57e98
[ADD] estate: initial Real Estate module with models, views, and rela…
raaa-odoo e65a6c3
[ADD] estate: constraints, compute fields, and offer logic enhancements
raaa-odoo d265965
[IMP] estate: implement business logic for offers, constraints, state…
raaa-odoo 734a361
[IMP] estate: apply styling improvements to code
raaa-odoo 35f9b50
[IMP] estate: Again apply styling improvements to code
raaa-odoo d52e2a3
[IMP] estate: add chatter, demo data, access rules, and PDF report
raaa-odoo f2062aa
[IMP] estate: add website controller, offer wizard & tests
raaa-odoo c431e83
[IMP] estate: add website controller, offer wizard & tests
raaa-odoo 6f6bcb8
[IMP] estate, awesome_owl: update estate tests and complete OWL exerc…
raaa-odoo 1cbf9c3
[IMP] estate: update the test cases logic
raaa-odoo 4c06dbd
[IMP] awesome_dashboard: make dashboard items dynamic and reusable
raaa-odoo 8b6372c
[ADD] rental,sale: implement mandatory rental deposit system
raaa-odoo 0f69fe9
[IMP] estate: implement business logic for offers, constraints, state…
raaa-odoo a656668
[IMP] rental_deposit: Fix the the error.
raaa-odoo bc2e9aa
[IMP] rental_deposit: Fix the the error.
raaa-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
[IMP] estate: add chatter, demo data, access rules, and PDF report
Enhance the estate module with collaborative features, realistic demo content, fine-grained access control, and printable PDF output to support real-world usage, development, and testing. - Enabled chatter by adding `mail.thread` and `mail.activity.mixin` to property and offer models for tracking and communication. - Added a demo data file to preload properties, offers, and users for development and testing. - Implemented access control using mixins and record rules to restrict read/write/delete permissions based on ownership and roles. - Introduced a QWeb PDF report for properties with a print button to export property data as a downloadable document. Improves module functionality, security, and usability for real-world use and testing.
- Loading branch information
commit d52e2a399c6b10f647fa1f5051f16b28e68f1c3b
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 |
---|---|---|
@@ -1,20 +1,28 @@ | ||
{ | ||
'name': 'Real Estate', | ||
'version': '1.0', | ||
'depends': ['base', 'sale', 'mail'], | ||
'depends': ['base', 'mail'], | ||
'author': 'Rajeev Aanjana', | ||
'category': 'Real Estate', | ||
'category': 'Real Estate/Brokerage', | ||
'description': 'A module for managing real estate properties', | ||
'application': True, | ||
'data': [ | ||
'security/security.xml', | ||
'security/ir.model.access.csv', | ||
'views/estate_property_views.xml', | ||
'views/estate_property_offer_views.xml', | ||
'views/estate_property_type_views.xml', | ||
'views/estate_property_tag_views.xml', | ||
'views/res_users_views.xml', | ||
'views/estate_menus.xml', | ||
# 'data/master_data.xml', | ||
'data/estate_property_demo.xml', | ||
8000 | 'report/estate_property_templates.xml', | |
'report/estate_property_reports.xml', | ||
], | ||
# 'demo': [ | ||
# 'demo/demo_data.xml', | ||
# ], | ||
'license': 'LGPL-3', | ||
'application': True, | ||
'installable': 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,125 @@ | ||
<odoo noupdate="1"> | ||
<record id="property_type_residential" model="estate.property.type"> | ||
<field name="name">Residential</field> | ||
</record> | ||
<record id="property_type_commercial" model="estate.property.type"> | ||
<field name="name">Commercial</field> | ||
</record> | ||
<record id="property_type_industrial" model="estate.property.type"> | ||
<field name="name">Industrial</field> | ||
</record> | ||
<record id="property_type_land" model="estate.property.type"> | ||
<field name="name">Land</field> | ||
</record> | ||
|
||
|
||
|
||
<record id="villa" model="estate.property"> | ||
<field name="name">Big Villa</field> | ||
<field name="state">new</field> | ||
<field name="description">A nice and big villa</field> | ||
<field name="postcode">12345</field> | ||
<field name="date_availability">2020-02-02</field> | ||
<field name="expected_price">1600000</field> | ||
<field name="bedrooms">6</field> | ||
<field name="living_area">100</field> | ||
<field name="facades">4</field> | ||
<field name="garage">True</field> | ||
<field name="garden">True</field> | ||
<field name="garden_area">100000</field> | ||
<field name="garden_orientation">south</field> | ||
<field name="property_type_id" ref="property_type_residential"/> | ||
</record> | ||
|
||
|
||
<record id="offer_azure_villa_1" model="estate.property.offer"> | ||
<field name="offer_price">10000</field> | ||
<field name="validity">14</field> | ||
<field name="partner_id" ref="base.res_partner_12"/> | ||
<field name="property_id" ref="villa"/> | ||
</record> | ||
|
||
<record id="offer_azure_villa_2" model="estate.property.offer"> | ||
<field name="offer_price">1500000</field> | ||
<field name="validity">14</field> | ||
<field name="partner_id" ref="base.res_partner_12"/> | ||
<field name="property_id" ref="villa"/> | ||
</record> | ||
|
||
<record id="offer_deco_villa" model="estate.property.offer"> | ||
<field name="offer_price">1500001</field> | ||
<field name="validity">14</field> | ||
<field name="partner_id" ref="base.res_partner_2"/> | ||
<field name="property_id" ref="villa"/> | ||
</record> | ||
|
||
<record id="trailer" model="estate.property"> | ||
<field name="name">Trailer Home</field> | ||
<field name="state">canceled</field> | ||
<field name="description">Home in a trailer park</field> | ||
<field name="postcode">54321</field> | ||
<field name="date_availability">1970-01-01</field> | ||
<field name="expected_price">100000</field> | ||
<field name="selling_price">120000</field> | ||
<field name="bedrooms">1</field> | ||
<field name="living_area">10</field> | ||
<field name="facades">4</field> | ||
<field name="garage">False</field> | ||
<field name="garden">True</field> | ||
<field name="property_type_id" ref="property_type_residential"/> | ||
</record> | ||
|
||
<record id="space_ship" model="estate.property"> | ||
<field name="name">International Space Station</field> | ||
<field name="state">new</field> | ||
<field name="description">Aliens sometimes come visit</field> | ||
<field name="postcode">12345</field> | ||
<field name="date_availability">2030-12-31</field> | ||
<field name="expected_price">45890000</field> | ||
<field name="property_type_id" ref="property_type_industrial"/> | ||
</record> | ||
|
||
<record id="cabin" model="estate.property"> | ||
<field name="name">Cozy Cabin</field> | ||
<field name="state">new</field> | ||
<field name="description">Small cabin by lake</field> | ||
<field name="postcode">10000</field> | ||
<field name="date_availability">2020-01-01</field> | ||
<field name="expected_price">80000</field> | ||
<field name="bedrooms">1</field> | ||
<field name="living_area">10</field> | ||
<field name="facades">4</field> | ||
<field name="garage">False</field> | ||
<field name="garden">True</field> | ||
<field name="property_type_id" ref="property_type_residential"/> | ||
</record> | ||
|
||
<record id="offer_cabin_1" model="estate.property.offer"> | ||
<field name="offer_price">60000</field> | ||
<field name="validity">14</field> | ||
<field name="partner_id" ref="base.res_partner_12"/> | ||
<field name="property_id" ref="cabin"/> | ||
</record> | ||
|
||
<record id="offer_cabin_2" model="estate.property.offer"> | ||
<field name="offer_price">75000</field> | ||
<field name="validity">14</field> | ||
<field name="partner_id" ref="base.res_partner_12"/> | ||
<field name="property_id" ref="cabin"/> | ||
</record> | ||
|
||
|
||
<function model="estate.property.offer" name="action_accept"> | ||
<value eval="[ref('offer_deco_villa')]"/> | ||
</function> | ||
|
||
<function model="estate.property.offer" name="action_refuse"> | ||
<value eval="[ref('offer_azure_villa_1'), ref('offer_azure_villa_2')]"/> | ||
</function> | ||
|
||
<function model="estate.property" name="action_set_sold"> | ||
<value eval="[ref('villa')]"/> | ||
</function> | ||
|
||
|
||
</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,14 @@ | ||
<odoo noupdate="1"> | ||
<record id="property_type_residential" model="estate.property.type"> | ||
<field name="name">Residential</field> | ||
</record> | ||
<record id="property_type_commercial" model="estate.property.type"> | ||
<field name="name">Commercial</field> | ||
</record> | ||
<record id="property_type_industrial" model="estate.property.type"> | ||
<field name="name">Industrial</field> | ||
</record> | ||
<record id="property_type_land" model="estate.property.type"> | ||
<field name="name">Land</field> | ||
</record> | ||
</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
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
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
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,21 @@ | ||
<odoo> | ||
<record id="report_estate_property_offers" model="ir.actions.report"> | ||
<field name="name">Estate Property Offers Report</field> | ||
<field name="model">estate.property</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.estate_property_report_offers</field> | ||
<field name="print_report_name">'Property Offer Report - %s' % object.name</field> | ||
<field name="paperformat_id" ref="base.paperformat_euro"/> | ||
<field name="binding_model_id" ref="estate.model_estate_property"/> | ||
</record> | ||
|
||
<record id="report_res_users_properties" model="ir.actions.report"> | ||
<field name="name">Salesperson Properties Report</field> | ||
<field name="model">res.users</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.res_users_report_properties</field> | ||
<field name="print_report_name">'Salesperson Properties Report - %s' % object.name</field> | ||
<field name="paperformat_id" ref="base.paperformat_euro"/> | ||
<field name="binding_model_id" ref="base.model_res_users"/> | ||
</record> | ||
</odoo> |
Oops, something went wrong.
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.