Skip to content

[ADD] estate: started the server framework, completed the coding guidelines, setup guide, and chapter 1#1348

Draft
abkus-odoo wants to merge 24 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-abkus
Draft

[ADD] estate: started the server framework, completed the coding guidelines, setup guide, and chapter 1#1348
abkus-odoo wants to merge 24 commits into
odoo:19.0from
odoo-dev:19.0-tutorial-abkus

Conversation

@abkus-odoo

@abkus-odoo abkus-odoo commented Jun 23, 2026

Copy link
Copy Markdown

Real Estate Management Module

Complete Property Lifecycle: Managed properties from creation to sale, including offer submission, acceptance, and rejection workflow.

Relational Data Structure: Utilized Many2one, One2many, and Many2many relationships to build a structured and connected data model.

Dynamic Business Logic: Implemented computed fields and onchange methods to enable automatic calculations and responsive UI behavior.

Data Integrity Enforcement: Applied Python constraints and SQL constraints to ensure valid and consistent business data.

User-Friendly Interface: Designed intuitive list, form, and search views along with proper actions and menu navigation.

Access & Security Management: Configured access rights and record rules to control data visibility and ensure secure usage.

@robodoo

robodoo commented Jun 23, 2026

Copy link
Copy Markdown

Pull request status dashboard

@abkus-odoo abkus-odoo self-assigned this Jun 23, 2026
@abkus-odoo abkus-odoo requested a review from bit-odoo June 23, 2026 12:03
@abkus-odoo abkus-odoo closed this Jun 24, 2026
@abkus-odoo

Copy link
Copy Markdown
Author

#1265
Continue Estate Module

@abkus-odoo abkus-odoo reopened this Jun 24, 2026
@abkus-odoo abkus-odoo force-pushed the 19.0-tutorial-abkus branch from a66e25d to c5b86bf Compare June 25, 2026 13:09

@bit-odoo bit-odoo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello
can you please improve all your all commit message tags, header, and also improve the PR title and description.

Thanks

Comment thread estate/models/estate_property.py Outdated


class EstateProperty(models.Model):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary space.

Comment thread estate/models/estate_property.py Outdated
Comment on lines +124 to +130
_check_expected_price = models.Constraint(
"CHECK(expected_price>0)", "Expected price must be strictly positive"
)

_check_selling_price = models.Constraint(
"CHECK(selling_price>0)", "Selling price must be positive"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread estate/models/estate_property_offer.py Outdated
vals['property_id'])
for offer in property_id.offer_ids:
if current_price < offer.price:
raise UserError(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is good if you make the error message translatable.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggested changes are done


name = fields.Char(required=True)
color = fields.Integer()
_unique_price = models.Constraint(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be one empty line before it.

Comment thread estate/models/res_users.py Outdated


class ResUsers(models.Model):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary extra line.

Comment thread estate/views/estate_property_views.xml Outdated
<field name="postcode" />
<field name="expected_price" />
</group>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary extra line.

Comment thread estate/views/estate_property_views.xml Outdated
options="{'color_field': 'color'}" />
</group>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary extra line.

Comment thread estate/views/estate_property_views.xml Outdated
<page string="Offer">
<field name="offer_ids" readonly="state in ('offer_accepted', 'sold', 'canceled')"/>
</page>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary extra line.

Comment thread estate/views/estate_property_views.xml Outdated
<field name="total_area" />
</group>
</page>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneccary extra line.

Comment thread estate/views/estate_property_views.xml Outdated
<field name="garden_area" invisible="not garden"/>
<field name="garden_orientation" invisible="not garden"/>
<field name="active" />
<field name="state" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to define this field here, as we already display it in the header.

@abkus-odoo abkus-odoo force-pushed the 19.0-tutorial-abkus branch 2 times, most recently from 1a1df35 to 9a5ac58 Compare June 30, 2026 05:36
- Added estate.property model
- Defined basic property fields
- Added understanding of Odoo three-tier architecture
@abkus-odoo abkus-odoo force-pushed the 19.0-tutorial-abkus branch 3 times, most recently from abd60ed to c5b8376 Compare June 30, 2026 06:09
abkus-odoo added 16 commits July 1, 2026 16:13
- Created estate module structure
- Added __init__.py and __manifest__.py
- Configured base module dependency
- Enabled module as an installable app
- Created estate.property ORM model
- Added core property fields (name, description, postcode, prices, features)
- Defined garden orientation selection (North, South, East, West)
- Set required constraints on important fields (name, expected_price)
- Initialized estate_property database table via ORM
- Created ir.model.access.csv for estate.property model
- Added read, write, create and delete permissions
- Learned how Odoo security works using access rights
- Added security file in __manifest__.py
- Fixed access warning for estate.property model
- Added estate_property_views.xml with basic act_window action
- Connected estate.property model with UI through action
- Understood how menu > action >view >model flow works in Odoo
- Created views folder and add the estate_property_views.xml file
- After adding this file Odoo loads it successfully during module update
- Action gets created in the database but nothing shows in UI bcz menu is not added
- Added estate_menu.xml and connected menu with action
- Added estate_property_views.xml with list and form views
- Learned basic structure of Odoo views and actions
- Completed Chapter 5 and understood form/list view concepts
- Practiced menu >action >view connection flow
- Added custom search view for estate properties
- Implemented search fields for property filtering
- Added predefined filters and group by functionality
- Practiced and understood search views, filters, domains, and group by concepts from Chapter 6 exercise
- Started Chapter 7 on relational fields
- Revised earlier Odoo tutorial chapters
- Reviewed models, views, ORM, and field concepts
- Fixed code formatting issues and removed unnecessary whitespace
- Cleaned up XML and Python structure for better readability
- Started learning relational fields (Many2one)
- Began exercises from the chapter on Many2one fields
- Studied Many2one field behavior and relationships
- Explored res.partner and res.users models
- Started implementing Many2one field exercises in estate module
- Improved understanding of relational fields in Odoo
- Learned Many2many stores recordsets (multiple linked records)
- Understood comodel_name defines target model relationship
- Learned optional relation table and column mapping behavior
- Understood ORM auto-generates relation table if not specified
Completed Many2many field exercise for property tags
- Added estate.property.tag model estate_property_tag.py
- Created views for property tags list and form views
- Added menu and action for Property Tags in Estate module
- Completed One2many field exercise, added estate_property_offer model, and implemented its views
- Added offer_ids field in estate_property_offer.py
 - Started learning computed fields and completed the first exercise
- Added total_area field in estate_property.py
- Computed total_area from living_area and garden_area using a compute method
- Added best_offer field on estate.property
- Implemented compute method using mapped() to determine highest offer price
- Updated dependencies on offer_ids.price for automatic recomputation
- Added validity and date_deadline fields to estate.property.offer
- Implemented computed date_deadline field with @api.depends
- Added inverse method to recalculate validity from deadline date
- Added garden onchange in estate.property to auto-set garden area and orientation
- Configured default values and field synchronization for offer deadlines
- Added Cancel and Sold actions on estate.property with state transition validation
- Prevented cancelled properties from being sold and sold properties from being cancelled using UserError
- Added Accept and Refuse actions on estate.property.offer
- Implemented offer status updates and corresponding form view buttons with icons
- Added SQL constraints in estate models:
- property: expected_price > 0, selling_price >= 0
- offer: price > 0
- tag: UNIQUE(name)
- property type: UNIQUE(name
…dget

- Added property_ids One2many field in estate.property.type
- Implemented inline list view for properties in property type form
- Added statusbar widget in estate.property state field
- Updated form view to display related properties with limited fields
- Added model ordering for properties, offers, tags, and property types
Added sequence field with manual ordering support for property types
Configured property type field to disable create/edit from property form
Added color field to tags and enabled color picker widget
- Added invisible rules for garden fields and offer buttons
- Restricted offer creation based on property state (readonly)
- Made list views editable for property, offer and tags
- Updated list view fields (optional date_availability, hidden by default)
- Added decorations for property and offer states
- Set default 'Available' filter and updated living area search domain
- Added stat button on estate.property.type to open estate.property.offer action using type='action'
- Displayed all related offers using offer_ids and offer_count in the view
- Implemented navigation from property type to offers list view via smart/stat button
- Added domain filter on estate.property.offer action to show only offers linked with active property type (property_type_id = active_id)
-Added business logic to CRUD methods
-Prevented deletion of properties unless state is 'New' or 'Cancelled'
-Updated property state to 'Offer Received' when creating offers
-Added validation to prevent lower offers than existing ones
-Added property_ids field to users with available properties domain
- Created dedicated estate_account link module for Estate and Accounting integration
- Preserved modular design by avoiding a hard dependency on the Accounting module
- Overrode the property sale confirmation workflow to generate invoices on sale
- Automatically created a customer invoice for the buyer when a property is marked as sold
- Added invoice lines for a 6% sales commission and a fixed 100.00 administrative fee
- Applied invoicing business rules defined for the tutorial
@abkus-odoo abkus-odoo force-pushed the 19.0-tutorial-abkus branch from 6afcf26 to e6d6e48 Compare July 1, 2026 10:44
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.

3 participants