Skip to content

Conversation

jugurtha-gaci
Copy link

Create the estate module

@robodoo
Copy link

robodoo commented Oct 20, 2025

Pull request status dashboard

@Mathilde411 Mathilde411 changed the title [ADD] estate: create the app JUGAC Onboarding Oct 20, 2025
@Mathilde411 Mathilde411 self-requested a review October 20, 2025 11:57
@Mathilde411 Mathilde411 self-assigned this Oct 20, 2025
Copy link

@Mathilde411 Mathilde411 left a comment

Choose a reason for hiding this comment

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

Small comments :)

@Mathilde411 Mathilde411 self-requested a review October 21, 2025 11:18
@Mathilde411 Mathilde411 removed their assignment Oct 21, 2025
Copy link

@Mathilde411 Mathilde411 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 :)
Please look at your runbot and make it green.
Also take a look at the naming conventions: https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#xml-ids-and-naming

Comment on lines 39 to 45
state = fields.Selection(
selection=[
('new', 'New'),
('received', 'Received'),
('accepted', 'Accepted')
]
)

Choose a reason for hiding this comment

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

Suggested change
state = fields.Selection(
selection=[
('new', 'New'),
('received', 'Received'),
('accepted', 'Accepted')
]
)
state = fields.Selection(
selection=[
('new', 'New'),
('received', 'Received'),
('accepted', 'Accepted')
], required=True, default='new'
)

state should always be set, and new by default

buyer_id = fields.Many2one("res.partner")
salesman_id = fields.Many2one("res.users")
tag_ids = fields.Many2many("estate.property.tag")
offer_ids = fields.One2many("estate.property.offer", "partner_id") 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.

Missing newline


class EstateProperty(models.Model):
_name = "estate.property"
_description = "Table that stores the estate properties"

Choose a reason for hiding this comment

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

Suggested change
_description = "Table that stores the estate properties"
_description = "Estate Property"

_description is the human-readable name of the model, not an actual description. It' a misnomer.


</menuitem>
</data>
</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.

Missing newline

</field>
</record>
</data>
</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.

Missing newline

</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.

Missing newline

@@ -0,0 +1 @@
from . import models 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.

Missing newline

Comment on lines 44 to 53
<page string="Description">
<group> <field name="description"/> </group>
<group> <field name="bedrooms"/> </group>
<group> <field name="living_area"/> </group>
<group> <field name="facades"/> </group>
<group> <field name="garage"/> </group>
<group> <field name="garden"/> </group>
<group> <field name="garden_area"/> </group>
<group> <field name="garden_orientation"/> </group>
</page>

Choose a reason for hiding this comment

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

Suggested change
<page string="Description">
<group> <field name="description"/> </group>
<group> <field name="bedrooms"/> </group>
<group> <field name="living_area"/> </group>
<group> <field name="facades"/> </group>
<group> <field name="garage"/> </group>
<group> <field name="garden"/> </group>
<group> <field name="garden_area"/> </group>
<group> <field name="garden_orientation"/> </group>
</page>
<page string="Description">
<group>
<field name="description"/>
<field name="bedrooms"/>
<field name="living_area"/>
<field name="facades"/>
<field name="garage"/>
<field name="garden"/>
<field name="garden_area"/>
<field name="garden_orientation"/>
</group>
</page>

Use only one group per block of fields

Comment on lines 60 to 70
<list string="Estate offers">
<group>
<field name="price"/>
</group>
<group>
<field name="partner_id"/>
</group>
<group>
<field name="status"/>
</group>
</list>

Choose a reason for hiding this comment

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

Suggested change
<list string="Estate offers">
<group>
<field name="price"/>
</group>
<group>
<field name="partner_id"/>
</group>
<group>
<field name="status"/>
</group>
</list>
<list string="Estate offers">
<field name="price"/>
<field name="partner_id"/>
<field name="status"/>
</list>

No groups needed in a list view

Comment on lines 74 to 76
<group> <field name="salesman_id"/> </group>
<group> <field name="buyer_id"/> </group>
<group> <field name="buyer_id"/> </group>

Choose a reason for hiding this comment

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

Same here, only one group needed

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