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
string="Deadline",
)

# self.property_id.status = 'offer_received' when offer is created

Choose a reason for hiding this comment

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

This is useless as we can easily understand via the code right below 😄

_order = 'price desc'

price = fields.Float(required=True, string="Price")
_check_price = models.Constraint('Check(price > 0)', "The offer price must be strictly positive.")

Choose a reason for hiding this comment

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

Try to avoid mixing fields with constraints so it is more readable.

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 ?

<field name="res_model">estate.property.type</field>
<field name="view_mode">list,form</field>
</record>
</odoo> 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.

Please don't forget about the final new line.

<field name="view_mode">list,form</field>
<field name="context">{'search_default_filter_available': True}</field>
</record>
</odoo> 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.

Hre too

<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
</record>
</odoo> 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.

Here also

<field name="res_model">estate.property.offer</field>
<field name="view_mode">list,form</field>
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>

Choose a reason for hiding this comment

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

Duplicate lines here 😄

<field name="status" />
<button name="action_accept" type="object" icon="fa-check" title="Accept" />
<button name="action_refuse" type="object" icon="fa-times" title="Refuse" />

Choose a reason for hiding this comment

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

Blank lines

@ramezlahzy ramezlahzy force-pushed the 19.0-app-traning-raibr branch from e97a713 to 8e85311 Compare December 19, 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