Skip to content

Conversation

@Oussema39
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Dec 15, 2025

Pull request status dashboard

Copy link

@ushyme ushyme left a comment

Choose a reason for hiding this comment

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

Good work so far. Just a few remarks.

Comment on lines 1 to 3
{
"cSpell.words": ["odoo"]
}
Copy link

Choose a reason for hiding this comment

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

Suggested change
{
"cSpell.words": ["odoo"]
}

This file should be removed. Editor-specific settings do not belong in the source code of an Odoo module.

description = fields.Text('Description')
active = fields.Boolean(default=True)
postcode = fields.Char('Postcode')
date_availability = fields.Date('Available From',default=lambda self: fields.Date.today() + timedelta(days=90), copy=False)
Copy link

Choose a reason for hiding this comment

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

Suggested change
date_availability = fields.Date('Available From',default=lambda self: fields.Date.today() + timedelta(days=90), copy=False)
date_availability = fields.Date('Available From',default=lambda self: fields.Date.context_today(self) + timedelta(days=90), copy=False)

Here, it's better to use fields.Date.context_today() for setting a default to the current date, because it correctly handles the user's timezones.

<field name="view_mode">list,form</field>
</record>

<record id="estate_property_taf_action" model="ir.actions.act_window">
Copy link

Choose a reason for hiding this comment

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

Suggested change
<record id="estate_property_taf_action" model="ir.actions.act_window">
<record id="estate_property_tag_action" model="ir.actions.act_window">

This is just a small typo, but it means that the estate_property_tag_menu_action menu item that references this action is not working

garden = fields.Boolean('Garden')
garden_area = fields.Integer('Garden area')
garden_orientation = fields.Selection(
string='type',
Copy link

Choose a reason for hiding this comment

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

why "type" ?

<search string="Search Properties">
<field name="name" string="Title" />
<field name="postcode" string="Postcode" />
<field name="expected_price" string="Postcode" />
Copy link

Choose a reason for hiding this comment

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

Suggested change
<field name="expected_price" string="Postcode" />
<field name="expected_price" string="Expected Price" />

Small copy-paste error.

@Oussema39 Oussema39 force-pushed the 19.0-real-estate-addon-ouelh branch from 5c091f1 to c3b4579 Compare December 23, 2025 10:06
Copy link

@ushyme ushyme left a comment

Choose a reason for hiding this comment

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

There are a few that could be improved.

  • for the cancelled state, you are often comparing it with 'canceled' (missing l). This typo makes lot of you logic incorrect.
  • a few files are missing a new line at the end
  • the runbot is still red

Comment on lines 115 to 123
@api.depends("create_date", "validity")
def _compute_date_deadline(self):
for record in self:
if record.create_date:
record.date_deadline = (
record.create_date.date() + timedelta(days=record.validity)
)
else:
record.date_deadline = fields.Date.context_today(self)
Copy link

Choose a reason for hiding this comment

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

What's the point of this ? Where is the validity field comming from ?

Comment on lines 52 to 71
@api.depends("create_date", "validity")
def _compute_date_deadline(self):
for record in self:
if record.create_date:
record.date_deadline = (
record.create_date.date()
+ timedelta(days=record.validity)
)
else:
record.date_deadline = False

@api.depends("create_date", "validity")
def _compute_date_deadline(self):
for record in self:
if record.create_date:
record.date_deadline = (
record.create_date.date() + timedelta(days=record.validity)
)
else:
record.date_deadline = fields.Date.context_today(self)
Copy link

Choose a reason for hiding this comment

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

I'm guessing a small copy-paste mistake ?

return True

@api.constrains("selling_price", "expected_price")
def _check_selling_price(self):
Copy link

Choose a reason for hiding this comment

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

Suggested change
def _check_selling_price(self):
def _check_selling_price_value(self):

you already used the name _check_selling_price for a constraint earlier. While this technically should work, it’s confusing for maintenance.

Comment on lines +100 to +101
<field name="garden" class="mb4" />
<field name="garden" />
Copy link

Choose a reason for hiding this comment

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

why duplicate the fields ?

<field name="garden" />
<field name="garden_area" invisible="not garden" />
<field name="garden_orientation" invisible="not garden" />
<field name="garden_orientation" class="mb4" />
Copy link

@ushyme ushyme Dec 23, 2025

Choose a reason for hiding this comment

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

same question here

type="object"
icon="fa-check"
invisible="status"
title="action_accept_btn"
Copy link

Choose a reason for hiding this comment

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

In Odoo, the title attribute on a button provides a tooltip. It is better to use a human-readable string like title="Accept Offer" so users know what the icon does when they hover over it.

This applies to all the other button title attributes in your code.

@Oussema39 Oussema39 force-pushed the 19.0-real-estate-addon-ouelh branch from 85a7703 to 73dbe79 Compare December 24, 2025 14: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