Skip to content

Conversation

@ramezlahzy
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Dec 15, 2025

Pull request status dashboard

@lost-odoo
Copy link

Hello, can you please ensure that your runbot is green 😄

@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from dc88f8d to 138ea5d Compare December 16, 2025 13:05
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from 138ea5d to c02245d Compare December 16, 2025 13:21
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from b656e0e to fcbae9f Compare December 16, 2025 16:06
@ramezlahzy
Copy link
Author

Hello, can you please ensure that your runbot is green 😄

Can you check again ;)

@ramezlahzy ramezlahzy requested review from lost-odoo and removed request for lost-odoo December 17, 2025 08:51
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch 3 times, most recently from fd47ba1 to 54edce7 Compare December 18, 2025 16:32
The models.Constraint syntax does not exist in Odoo's ORM.
SQL constraints must be defined using the _sql_constraints class attribute.
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch 2 times, most recently from ab9d9a6 to 4626609 Compare December 19, 2025 09:10
The models.Constraint syntax does not exist in Odoo's ORM.
SQL constraints must be defined using the _sql_constraints class attribute.
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from 4626609 to f073fa7 Compare December 19, 2025 09:19
@ramezlahzy ramezlahzy requested a review from lost-odoo December 19, 2025 09:23
property_ids = fields.One2many(comodel_name='estate.property', inverse_name='property_type_id', string="Properties")
offer_count = fields.Integer(compute='_compute_offer_count', string="Offer Count")

def _compute_offer_count(self):

Choose a reason for hiding this comment

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

Is it normal that you don't have an api.depends here ?

Copy link
Author

Choose a reason for hiding this comment

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

that function is called when that field calculated 
offer_count = fields.Integer(compute='_compute_offer_count', string="Offer Count")
so, there is no need for any dependency

Choose a reason for hiding this comment

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

Yeah but I think you still need to add a dependency as if property_ids change it is not recomputed.

@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from e97a713 to 8e85311 Compare December 19, 2025 14:44
@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from d6f0df1 to 9c4e958 Compare December 22, 2025 12:17
@ramezlahzy ramezlahzy requested a review from lost-odoo December 23, 2025 08:06
Copy link

@LoganStaelens LoganStaelens left a comment

Choose a reason for hiding this comment

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

Did another review.

property_ids = fields.One2many(comodel_name='estate.property', inverse_name='property_type_id', string="Properties")
offer_count = fields.Integer(compute='_compute_offer_count', string="Offer Count")

def _compute_offer_count(self):

Choose a reason for hiding this comment

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

Yeah but I think you still need to add a dependency as if property_ids change it is not recomputed.

Comment on lines +84 to +85
if not float_is_zero(property.selling_price, precision_digits=2):
if float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0:

Choose a reason for hiding this comment

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

Why doing two conditions ?

Suggested change
if not float_is_zero(property.selling_price, precision_digits=2):
if float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0:
if not float_is_zero(property.selling_price, precision_digits=2) and float_compare(property.selling_price, property.expected_price * 0.9, precision_digits=2) < 0:

Comment on lines +46 to +47
if offer.property_id.offer_ids.filtered(lambda o: o.status == 'accepted' and o.id != offer.id):
raise UserError(self.env._("Only one offer can be accepted per property."))

Choose a reason for hiding this comment

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

Can you not check the state of the property directly, instead of doing a filtering ?

Comment on lines +1 to +18
/* Estate Module Kanban View Styles */

.o_kanban_record_title {
font-size: 16px;
font-weight: bold;
margin-bottom: 8px;
color: #212529;
}

.o_kanban_record_subtitle {
font-size: 13px;
color: #6c757d;
margin-bottom: 4px;
}

.o_kanban_tags_section {
margin-top: 8px;
}

Choose a reason for hiding this comment

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

Try to at least put your module name to avoid collision with the rest of the css from odoo

Comment on lines +16 to +24
(
0,
0,
{
'name': 'Property price',
'quantity': 1,
'price_unit': property.selling_price,
},
),

Choose a reason for hiding this comment

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

Here you could use Command.create from odoo.

"data": [],
"application": False,
"license": "LGPL-3",
}

Choose a reason for hiding this comment

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

Don't forget to add auto_install here so your bridge module is auto installed when all dependencies are installed.

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.

4 participants