Skip to content

18.0 training prbo #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
wants to merge 5 commits into
base: 18.0
Choose a base branch
from
Draft

Conversation

prbo-odoo
Copy link

@prbo-odoo prbo-odoo commented Jul 9, 2025

This pull request includes the complete implementation of the Real Estate module as per the first 13 chapters of the Odoo 18.0 Server Framework 101 developer tutorial. It covers the full data model setup using relational fields like Many2one, One2many, and Many2many for properties, offers, types, and tags. The module includes business logic such as computed fields, constraints, record rules, and overrides of core ORM methods. Key features like offer acceptance/rejection, state transitions (new → sold/canceled), and user-specific access to properties have been implemented. Additionally, it introduces dynamic views (List, Form and Search), user assignments, menu items, security access controls, and integration with the Accounting module to generate invoices automatically upon property sale.

@robodoo
Copy link

robodoo commented Jul 9, 2025

Pull request status dashboard

@prbo-odoo prbo-odoo force-pushed the 18.0-training-prbo branch 3 times, most recently from 871bd93 to 15d69d2 Compare July 9, 2025 07:06
prbo-odoo added 4 commits July 9, 2025 12:43
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.
@prbo-odoo prbo-odoo force-pushed the 18.0-training-prbo branch 6 times, most recently from ac4126a to f4fbabf Compare July 9, 2025 08:46
…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.
@prbo-odoo prbo-odoo force-pushed the 18.0-training-prbo branch from f4fbabf to c63782b Compare July 9, 2025 08:57
@prbo-odoo prbo-odoo marked this pull request as draft July 9, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants