Open
Conversation
added 30 commits
September 16, 2025 12:00
…bility and state fields, and updating selling_price to be non-copyable. Introduce active field for property status management.
…ed', 'Offer Accepted', 'Sold', and 'Cancelled' to the state field selection.
…ls including name, postcode, bedrooms, living area, expected price, selling price, and date availability.
…ty entry, including fields for name, availability date, pricing, description, and various property features.
…y searching with quick search fields, filters, and grouping options.
…ws, and update estate property model to include property type relation. Enhance manifest and access control for new model.
…te property model to include many2many relationship for tags and enhance manifest and menu structure to support new functionality.
…tate property model to include one2many relationship for offers and enhance manifest to support new functionality.
…views to improve consistency and clarity in the user interface.
…d' instead of 'active_id' for improved data accuracy.
…odel, and implement validity and deadline fields in EstatePropertyOffer model. Update views to display new fields.
…Offer model, and implement onchange method for garden in EstateProperty model to automatically set garden area and orientation based on garden presence.
…yOffer model, and implement cancellation and sold state actions in EstateProperty model. Update views to include new action buttons for improved user interaction.
…ility conditions for 'Sold' and 'Cancel' actions.
…r 'Sold' and 'Cancel' actions to improve user interface clarity.
…just visibility conditions based on offer status for improved user experience.
…ty views, with icons and visibility conditions based on offer status to enhance user interaction.
…atePropertyOffer, EstatePropertyTag, and EstatePropertyType models for data integrity.
…sure expected and selling prices are positive, and enforce a minimum selling price threshold based on expected price for improved data integrity and user feedback.
…r, updating view definitions for improved data representation and user interaction. Implement ordering for offers and property types to streamline listings.
…conditions and enhance user interaction by simplifying the list display for offers.
added 22 commits
September 16, 2025 15:49
…tion and interaction by allowing access to offer listings based on property type.
…ine view files and improve maintainability.
…ds and simplifying the structure to enhance maintainability and user experience.
…s to display related properties. Introduced a new notebook page for properties in the estate property type form for improved data organization and user interaction.
…ding delete behavior for property offers and ensuring related offers are removed upon property deletion to maintain data integrity.
…rtyType models, updating views accordingly for improved data organization and user interaction.
…ional decorations for property states, improving visual feedback for users.
… multiple offer states, enhancing visual feedback for users.
…w to include priority field for improved display order.
…r_accepted' state, enhancing visual distinction for users.
…d reference the view ID, improving visual organization and navigation.
…'offer_accepted' state, enhancing visual clarity for users.
…PropertyOffer, ensuring state consistency for new offers.
…sed on offer status, improving user interaction by preventing actions on accepted or refused offers.
- Introduced a One2many relationship for offers in the EstatePropertyType model. - Added a computed field to count the number of offers associated with each property type. - Updated the estate_property_offer_views.xml to include an action for managing offers. - Enhanced estate_property_type_views.xml to display offer count and provide a button for accessing offers, improving user interaction and data visibility.
…ntain clarity in view definitions.
…ead of 'active_id', ensuring correct offer filtering in the Offers action.
- Introduced a One2many relationship in the ResUsers model to link properties assigned to salespersons, filtered by state (New or Offer Received). - Updated the user form view to display the associated properties, enhancing user experience and property management capabilities. - Implemented business logic in EstatePropertyOffer to ensure offers are strictly higher than existing ones, maintaining data integrity.
- Created the estate_account module to link estate properties with accounting functionalities. - Implemented the EstateProperty model to handle invoice creation upon property sale, including commission and administrative fees. - Added module manifest with dependencies on estate and account modules.
- Introduced a minimal kanban view for estate properties to enhance visual representation and user interaction. - Updated the estate property action to include kanban in the view mode, allowing users to switch between kanban, list, and form views seamlessly.
…improved layout - Updated the kanban view to group by property type and made records non-draggable for better organization. - Added fields for expected price, best offer, selling price, and tags to provide more information at a glance. - Improved the visual layout of the kanban box for better user experience.
- Rearranged import statements for consistency. - Added SQL constraints to ensure expected and selling prices are valid. - Refactored action methods for setting properties as sold or cancelled to use `ensure_one()` for better safety. - Removed redundant SQL constraints from the model definition, streamlining the code.
Author
jnc-odoo
reviewed
Sep 30, 2025
jnc-odoo
left a comment
There was a problem hiding this comment.
good job !
Only some minor comments
estate/__manifest__.py
Outdated
Comment on lines
22
to
24
| # "views/estate_property_type_views.xml", | ||
| # "views/estate_property_tag_views.xml", | ||
| # "views/estate_property_offer_views.xml", |
estate/models/estate_property.py
Outdated
| active = fields.Boolean(string="Active", default=True) | ||
| state = fields.Selection( | ||
| selection=[ | ||
| ('new', 'New'), |
There was a problem hiding this comment.
We tend to use either single quote or double quote everywhere to keep a consistency
estate/models/estate_property.py
Outdated
|
|
||
| @api.depends("living_area", "garden_area") | ||
| def _compute_total_area(self) -> None: | ||
| for record in self: |
There was a problem hiding this comment.
Suggested change
| for record in self: | |
| for property in self: |
Usually we use a variable that reflect the model were are in to help the code reader
| def _compute_date_deadline(self) -> None: | ||
| for offer in self: | ||
| created = (offer.create_date or fields.Datetime.now()) | ||
| base_date = created.date() if hasattr(created, "date") else date.today() |
There was a problem hiding this comment.
If I am not mistaken: date is not defined ?
Comment on lines
43
to
44
| created = (offer.create_date or fields.Datetime.now()) | ||
| base_date = created.date() if hasattr(created, "date") else date.today() |
There was a problem hiding this comment.
Suggested change
| created = (offer.create_date or fields.Datetime.now()) | |
| base_date = created.date() if hasattr(created, "date") else date.today() | |
| created = (offer.create_date or fields.Datetime.now()) | |
| base_date = created.date() |
I think that with your first line you would not have an error becasue created should be a datetime in any case ?
| return True | ||
|
|
||
| def action_refuse(self): | ||
| self.write({"status": "refused"}) |
There was a problem hiding this comment.
Suggested change
| self.write({"status": "refused"}) | |
| self.status = "refused" |
It is better to let the orm decide when the write should be applied
Comment on lines
111
to
113
| for prop in props: | ||
| if prop.state in ("new", "offer_received"): | ||
| prop.state = "offer_received" |
There was a problem hiding this comment.
Suggested change
| for prop in props: | |
| if prop.state in ("new", "offer_received"): | |
| prop.state = "offer_received" | |
| props.filtered(lambda p: p.state == "new").state = "offer_receive" |
- Removed commented-out view entries in the manifest for better readability. - Simplified date handling in the EstatePropertyOffer model by eliminating redundant checks. - Updated action methods to directly set status values, enhancing code efficiency. - Refactored property iteration in the EstateProperty model for consistency and clarity.
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
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.
No description provided.