Skip to content

Conversation

trcazier
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Sep 15, 2025

Pull request status dashboard

@cgun-odoo
Copy link

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import models

Choose a reason for hiding this comment

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

Add an empty line at the end of every file

'views/estate_property_views.xml',
'views/estate_menus.xml', # depends on estate_property_views.xml
]
}

Choose a reason for hiding this comment

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

Add an empty line at the end of every file

Comment on lines +3 to +4


Choose a reason for hiding this comment

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

Suggested change

'data': [
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml', # depends on estate_property_views.xml

Choose a reason for hiding this comment

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

Comments like this can be nice but this is not maintainable because the menus will depend on every view you add so you would need to update this comment every time you add a new view 😄

I think if the dependency is not easy to understand adding a comment is important but in this case not really necessary.

Copy link
Author

Choose a reason for hiding this comment

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

I was doing that for myself in order to remember it since this is a tutorial. Should I delete the comments?

Choose a reason for hiding this comment

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

No of course not 😄 I'm trying to get you used to the nitpicking that will happen on your PR's after the onboarding.

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import estate_property

Choose a reason for hiding this comment

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

Add an empty line at the end of every file

</search>
</field>
</record>
</odoo>

Choose a reason for hiding this comment

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

Add one empty line at the end of the file

<field name="living_area" />
<field name="facades" />
<filter string="Available" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offerreceived')]"/>
<group expand="0" string="Group By">

Choose a reason for hiding this comment

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

Wait does this work 😮
We had a problem with lecan in the morning and it was caused by the attributes in group

active = fields.Boolean(default=True)
state = fields.Selection(
string='State',
selection=[("new", "New"), ("offerreceived", "Offer Received"), ("offeraccepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")],

Choose a reason for hiding this comment

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

Suggested change
selection=[("new", "New"), ("offerreceived", "Offer Received"), ("offeraccepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")],
selection=[("new", "New"), ("offer_received", "Offer Received"), ("offer_accepted", "Offer accepted"), ("sold", "Sold"), ("cancelled", "Cancelled")],

use snake case for values with multiple words

<field name="facades" />
<filter string="Available" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offerreceived')]"/>
<group expand="0" string="Group By">
<filter string="Postcode" name="group_by_postcode" domain="[]" context="{'group_by':'postcode'}"/>

Choose a reason for hiding this comment

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

Suggested change
<filter string="Postcode" name="group_by_postcode" domain="[]" context="{'group_by':'postcode'}"/>
<filter string="Postcode" name="group_by_postcode" context="{'group_by':'postcode'}"/>

<field name="arch" type="xml">
<form string="Property form test string?">
<sheet>
<div class="oe_title">

Choose a reason for hiding this comment

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

Why is everything inside an oe_title div 😄

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