Open
Conversation
Author
jnc-odoo
reviewed
Sep 30, 2025
jnc-odoo
left a comment
There was a problem hiding this comment.
Good job !
just some minor comments about the good practice
| from . import estate_property_tag | ||
| from . import estate_property_offer | ||
| from . import estate_property | ||
| from . import res_users No newline at end of file |
There was a problem hiding this comment.
As a good practice we leave a blank line at the end of the file
|
|
||
| # SQL Constraints | ||
| _sql_constraints = [ | ||
| ('check_expected_price', 'CHECK(expected_price > 0)', |
There was a problem hiding this comment.
We try to have a consistency with the quote, either we use double quote everywhere or we use single quote everywhere
| #api.depends area | ||
| @api.depends("living_area", "garden_area") | ||
| def _compute_total_area(self): | ||
| for record in self: |
There was a problem hiding this comment.
Suggested change
| for record in self: | |
| for property in self: |
We tend to use a variable that show in which model we are so it is clearer for the person reading the code
| return True | ||
|
|
||
| @api.model | ||
| def create(self, vals_list): |
There was a problem hiding this comment.
Suggested change
| def create(self, vals_list): | |
| def create(self, vals): |
As you are not working with @api.model_create_multi, you would only have a vals (dictionary) and not a vals_list (list of vals)
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.