Skip to content

[ADD] estate: created estate module #1225

Draft
vivah-odoo wants to merge 18 commits intoodoo:19.0from
odoo-dev:19.0-tutorial-vivah
Draft

[ADD] estate: created estate module #1225
vivah-odoo wants to merge 18 commits intoodoo:19.0from
odoo-dev:19.0-tutorial-vivah

Conversation

@vivah-odoo
Copy link
Copy Markdown

@vivah-odoo vivah-odoo commented Apr 3, 2026

  • Define window action and menu structure to expose estate.property in the UI.
  • Connect menus with the action to allow access to list and form views.
  • Register XML view and menu files in the manifest for proper loading.
  • Configure default values using Odoo framework utilities.
  • Apply field attributes like readonly and copy=False for better data control.
  • Add active flag for visibility handling and state field for lifecycle management.

Chapter-5

- Added estate.property model
- Implemented core fields (name, description, expected_price, etc.)
- Applied required field constraints
- Enabled ORM-based persistence

Chapter 3
@robodoo
Copy link
Copy Markdown

robodoo commented Apr 3, 2026

Pull request status dashboard

@vivah-odoo vivah-odoo requested review from mash-odoo April 3, 2026 12:48
Clean up code and module metadata:

- Remove trailing newline and blank line whitespace (W391, W293)
- Add missing `author` and `license` in __manifest__.py

This removes lint and module loading warnings.
@vivah-odoo vivah-odoo changed the title [ADD] estate: initialize module and implement basic property model (Chapters 2 & 3) [CLN] estate: fix lint issues and complete manifest metadata Apr 6, 2026
- Added ir.model.access.csv for estate.property
- Configured basic CRUD permissions for internal users

Chapter 4 - Security Intro
@vivah-odoo vivah-odoo force-pushed the 19.0-tutorial-vivah branch from d2d43cc to d6c591c Compare April 6, 2026 12:19
- Fixed COM819 lint error in __manifest__.py
- Removed/adjusted trailing comma in data list for proper formatting
@vivah-odoo vivah-odoo changed the title [CLN] estate: fix lint issues and complete manifest metadata [LINT] estate: resolve manifest lint issue (trailing comma) Apr 7, 2026
- Define window action and menu structure to expose estate.property in the UI.
- Connect menus with the action to allow access to list and form views.
- Register XML view and menu files in the manifest for proper loading.
- Configure default values using Odoo framework utilities.
- Apply field attributes like readonly and copy=False for better data control.
- Add active flag for visibility handling and state field for lifecycle management.

Chapter-5
Copy link
Copy Markdown

@mash-odoo mash-odoo left a comment

Choose a reason for hiding this comment

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

Hello!
Thank you for your work.
Here are some few questions and suggestions.
Also please update your PR title

Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/__manifest__.py
Comment thread estate/views/estate_menus.xml Outdated
Comment thread estate/security/ir.model.access.csv Outdated
Comment thread estate/models/estate_property.py Outdated
@vivah-odoo vivah-odoo changed the title [LINT] estate: resolve manifest lint issue (trailing comma) [ADD] estate: create estate module Apr 9, 2026
@vivah-odoo vivah-odoo changed the title [ADD] estate: create estate module [ADD] estate: created estate module Apr 9, 2026
Apply changes based on PR review comments.

- Refactored code to follow Odoo coding guidelines
- Fixed linting and formatting issues
- Improved model field definitions where required
- Removed redundant or unnecessary code
Added list view for estate.property model.

- Defined list view in estate_property_views.xml using <list> tag
- Configured fields to be displayed in the list view
- Added string attributes to model fields for proper labeling

Chapter 6
 - Added search view with:
  - Searchable fields (name, postcode, price, state, etc.)
  - Custom filters (1 Bedroom & Garage, budget, availability, expensive)
  - Group by options (bedrooms, garage, availability date)
  - UI improvements using separators

- Configured action with default filter for available properties

Completed Chapter 6
- Add Many2one fields: property_type_id, salesperson_id, buyer_id,
  and partner_id on offer
- Add One2many field offer_ids on estate.property
- Add Many2many field tag_ids on estate.property
- Update form and list views to display relational fields

chapter 7
@vivah-odoo vivah-odoo force-pushed the 19.0-tutorial-vivah branch from ded3d2d to 4a2a54c Compare April 16, 2026 12:47
Fixed whitespace issue in the file 'estate_properties_type.py'
@vivah-odoo vivah-odoo force-pushed the 19.0-tutorial-vivah branch from ad0b026 to 223e8e2 Compare April 21, 2026 09:07
This commit introduces two computed fields on estate.property:

- total_area: calculated as the sum of living_area and garden_area.
- best_price: stores the highest offer price among related offers.

Chapter 8 partially completed
@vivah-odoo vivah-odoo force-pushed the 19.0-tutorial-vivah branch from 223e8e2 to d364336 Compare April 21, 2026 09:10
- Added `validity` field with default value of 7 days.
- Added computed `date_deadline` field based on `create_date` and `validity`.
- Implemented inverse method to allow editing either validity or deadline.
- Added fallback for `create_date` during record creation to avoid errors.
- Updated form and list views to display new fields.

chapter 8 partially completed
@vivah-odoo vivah-odoo force-pushed the 19.0-tutorial-vivah branch from d364336 to 7f55d54 Compare April 21, 2026 09:10
This commit introduces an onchange method on the `garden` field
to improve user experience during data entry:

* Automatically sets `garden_area` to 10 and `orientation` to 'North'
  when garden is enabled.
* Resets `garden_area` to 0 and clears `orientation` when disabled.

Chapter 8 completed
- Add 'Cancel' and 'Sold' buttons on estate.property
- Prevent invalid state transitions (cancelled ↔ sold)
- Add 'Accept' and 'Refuse' buttons on estate.property.offer
- Set buyer and selling price when an offer is accepted
- Ensure only one offer can be accepted per property
- Raise UserError for invalid operations

chapter 9
Copy link
Copy Markdown

@mash-odoo mash-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
Good going on the task..
Here are some questions and suggestions...

Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property_type.py
Comment thread estate/models/estate_property_offer.py
Comment thread estate/views/estate_property_offer_views.xml Outdated
Comment thread estate/views/estate_property_offer_views.xml Outdated
Comment thread estate/views/estate_property_tag_views.xml Outdated
Comment thread estate/views/estate_property_tag_views.xml
Comment thread estate/views/estate_property_type_views.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
- Use ensure_one() and simplify action_accept logic
- Remove redundant field strings
- Clean XML views (no fixed width, simpler structure, newline fix)
- Use editable tree instead of single-field form view
- Optimize domain filters
- Enforced positive expected price on properties
- Ensured selling price is positive
- Restricted offer price to strictly positive values
- Added unique constraints on property type and tag names

chapter 10
- Added @api.constrains on selling_price and expected_price
- Enforced rule: selling price must be at least 90% of expected price
- Used float_compare and float_is_zero for safe float handling
- Ignored validation when selling price is zero (no accepted offer yet)
- Ensured constraint triggers on both create and write operations

chapter 10
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