Skip to content

Conversation

@shtha-odoo
Copy link

@shtha-odoo shtha-odoo commented Jan 1, 2026

Developed the fundamental business logic for the Real Estate Advertisement (Estate) module as part of Odoo technical training. This PR follows the tutorial instructions step by step and includes setting up the module framework, defining core models, and configuring the initial user interface.

@robodoo
Copy link

robodoo commented Jan 1, 2026

Pull request status dashboard

@shtha-odoo shtha-odoo force-pushed the 19.0-tutorials-shtha branch from 958aa54 to f7d4a9d Compare January 2, 2026 07:04
Copy link

@mash-odoo mash-odoo left a comment

Choose a reason for hiding this comment

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

Hello @shtha-odoo,
Good work on the new module.
Please have a look at the comments and apply the needed changes.

@shtha-odoo shtha-odoo closed this Jan 7, 2026
@shtha-odoo shtha-odoo reopened this Jan 7, 2026
Copy link

@mash-odoo mash-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
Please update the PR name and description.
Check your entire module, the coding guidelines aren't followed in the naming conventions, indentations, quotes usage, etc. Update it ASAp, the PR isn't readable properly.
Also, please apply the changes which are suggested in this PR.

@mash-odoo
Copy link

Can you explain this behavior?
Also what's the point of adding property_id in the offer when you are already adding offer in that property itself.
Can you explain the relation between the offers and the property?

@shtha-odoo shtha-odoo changed the title 19.0 tutorials shtha [ADD] Estate: Add Estate Module Jan 8, 2026
@shtha-odoo
Copy link
Author

Can you explain this behavior? Also what's the point of adding property_id in the offer when you are already adding offer in that property itself. Can you explain the relation between the offers and the property?

It was asked to do in tutorial, i have modified it as per your guidance

@shtha-odoo shtha-odoo force-pushed the 19.0-tutorials-shtha branch from 9ae40e8 to b9a1488 Compare January 12, 2026 09:26
Copy link

@mash-odoo mash-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
I have added some comments, can you please have a look at it?
Also please fix stylings all over the module, there are a lot of unnecessary spaces in the xml file

facades = fields.Integer("facades")
garage = fields.Boolean("Garage", default=True)
garden = fields.Boolean("Garden")
garden_area = fields.Integer("Garden area", default=0)

Choose a reason for hiding this comment

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

Is there a need to give a default value here?

best_price = fields.Float("Best price", compute='_compute_best_price', store=True)
active = fields.Boolean("Active", default=True)
property_type_id = fields.Many2one("estate.property.type")
salesman_id = fields.Many2one("res.users", default=lambda self: self.env.user)

Choose a reason for hiding this comment

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

How is this default value calculated and why can't we directly write default=self.env.user?

Comment on lines +85 to +87
if record.selling_price and float_compare(
record.selling_price, (0.9 * record.expected_price)
,2 ) == -1 :

Choose a reason for hiding this comment

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

explain the params of float_compare

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

<record id="estate_property_type_form" model="ir.ui.view">

Choose a reason for hiding this comment

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

Fix indentation of this record

<field name = "name"/>
<field name="expected_price"/>
<separator/>
<filter string="offer received" name="offerReceived" domain="[('state','in',('new', 'offer_received'))]"/>

Choose a reason for hiding this comment

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

What are required params in the filter? How to add a default filter?

<field name="name">estate.property.view.list</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<list string="Channel" editable="bottom" open_form_view="True" decoration-success="state=='offer_received'" decoration-muted="state=='sold'" >

Choose a reason for hiding this comment

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

Can we apply these decorations in the form view?

record.best_price = max(record.offer_ids.mapped('price'), default=0.0)

@api.onchange('garden')
def _onchange_partner(self):

Choose a reason for hiding this comment

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

Suggested change
def _onchange_partner(self):
def _onchange_garden(self):

Give meaningful names

access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1
access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1
access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1
access_estate_property_maintenance,access_estate_property_maintenance,model_estate_property_maintenance,base.group_user,1,1,1,1 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.

Add a line at the end of file

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