-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[ADD] real_estate,* : Full Implementation with ORM, Access Control and Accounting Integration #838
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
prbo-odoo
wants to merge
7
commits into
odoo:18.0
Choose a base branch
from
odoo-dev:18.0-training-prbo
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.
Conversation
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
871bd93
to
15d69d2
Compare
This commit covers Chapters 4, 5, and 6 of the server framework tutorial. It includes: - Adding security access rules for the basic model to manage user permissions. - Creating the first user interface by adding a menu item and action to navigate to the model records. - Defining the basic tree (list) view and form view for the model to enable record visualization and editing.
…properties This commit introduces action buttons to accept or refuse offers in the real_estate module. When an offer is accepted, the property’s selling price, buyer, and state are updated accordingly. Other offers are automatically refused to ensure only one offer is accepted per property. Also added: - 'state' field on properties to manage lifecycle (new, offer_received, sold, cancelled) - Computed best price field from offers - Validity-based deadline logic using compute/inverse methods on offers - Safeguards preventing sale of cancelled properties and cancellation of sold ones
…ty models This commit adds data integrity and UI improvements as guided by Chapters 10 and 11 of the Odoo Server Framework 101 tutorial. Constraints: - Added SQL constraints to ensure unique names for property types and tags. - Added SQL constraint to ensure color index stays within valid range. - Implemented Python constraints to enforce logical business rules UI Enhancements: - Introduced computed field on property types. - Added stat button to open related offers via domain. - Enhanced form views with notebooks and inline editing for better UX. - Updated navigation menu to include property type and tag settings.
ac4126a
to
f4fbabf
Compare
…rnal module Extended the model in the module using model inheritance. This extension adds new accounting-related fields and functionality that align with the tutorial’s objective of building on top of existing models. Additionally, reused features from another module (), demonstrating how to extend and interact with models defined externally. This helps in separating concerns and encourages modular design by keeping accounting logic in a separate module. Reasons for the change: - To demonstrate how to extend existing models via , promoting reuse of logic. - To maintain separation of concerns by creating a dedicated accounting module for estate management. - To align with Odoo framework best practices, particularly regarding modularization and cross-module integration. - To enhance maintainability and scalability of the estate management application.
f4fbabf
to
c63782b
Compare
Refactored backend code to align with Odoo coding guidelines and updated security declarations per Odoo 18.0 standards. -Applied proper access control in security XML files -Updated Python and XML code formatting to follow coding conventions -Removed unused imports and improved variable naming -Ensured model access rights are correctly defined
maad-odoo
reviewed
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass ......🚀
The PR message is not appropriate and it need adaptation.
Also there are a lot of unnecessary lines left for no reason, please adapt it.
Improved the real_estate module by applying proper data access restrictions using record rules and security groups to ensure users only see permitted records based on their roles. Enhanced the real_estate module by restricting data access using security groups and record rules to ensure users only view or modify records they are permitted to. Defined essential module data such as user roles, property types and permissions using XML files to enable consistent setup during module installation. These updates improve the module’s security and prepare it for scalable, role- based.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
*= estate_account
This pull request includes the complete setup of the Real Estate module based on the first 13 chapters of the Odoo 18.0 Developer Tutorial. The aim was to build a production-ready module by applying all key concepts from the tutorial in one working project that covers model design, view customization, user access control and business automation.
I added relational fields like Many2one, One2many and Many2many for properties, offers, tags and property types. Business logic like accepting/rejecting offers, checking constraints and handling different property states (like new, sold, canceled) was implemented to make the module behave like a real-world system.
To make the module secure, I applied access controls so that only specific users can view or change certain data. I also created custom views like List, Form and Search so users can easily interact with the system. Invoices are automatically created when a property is sold, by connecting this module with the Accounting module.
To connect with the Accounting module, automatic invoice creation was added when a property is sold. This demonstrates integration between custom apps and core Odoo modules.
I followed Odoo’s best practices to keep the code clean and scalable. I used Odoo’s ORM methods (create, write) and also made sure performance is good when dealing with multiple records using the @api.model_create_multi decorator and proper use of browse().Clear error messages (UserError, ValidationError) were implemented for better user feedback.
I tested each flow manually: creating offers, rejecting invalid ones, changing states correctly, checking user access and making sure the invoice is generated after a sale.
As a result, the module now works smoothly like a real property management system. It is clean and easy to use.