Skip to content

Conversation

gunaysuleyman
Copy link

No description provided.

@gunaysuleyman
Copy link
Author

@jnc-odoo

Copy link

@jnc-odoo jnc-odoo left a comment

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

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)',

Choose a reason for hiding this comment

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

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:

Choose a reason for hiding this comment

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

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):

Choose a reason for hiding this comment

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

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)

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