Skip to content

Conversation

@mekav-odoo
Copy link

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

Module: Estate

Initialized the estate module for Odoo Technical Training. This includes the base model definitions, security access rights, and the initial user interface as outlined in the tutorial steps.

@robodoo
Copy link

robodoo commented Jan 1, 2026

Pull request status dashboard

added fist tale in ch-3 and security (permission rule for group) in ch-4
and start ch-5 , in that add views file
complete field, attribute , view in ch-5 and list and form in ch-6
@mekav-odoo mekav-odoo force-pushed the 19.0-tutorials-mekav branch from c936ac4 to 6b0b9b8 Compare January 2, 2026 06:39
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 @mekav-odoo,
Good work on the PR.
Please have a look at my comments and apply the needed changes.

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,
Good Work going..
Here are some suggestions and questions..

Comment on lines 40 to 43
("north", "North"),
("south", "South"),
("east", "East"),
("west", "West"),

Choose a reason for hiding this comment

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

Use lower case for keys

implement statusbar widget, in List order model ordering & manual ordering and
in form Attributes and options
@mekav-odoo mekav-odoo force-pushed the 19.0-tutorials-mekav branch from 4275261 to 9821fb8 Compare January 9, 2026 04:52
implement statusbar widget, in List order model ordering & manual ordering and
in form Attributes and options
add Attributes and options in List ,  default filter , filter domain in
search and  stat button
add Attributes and options in List ,  default filter , filter domain in
search and stat button
done implementation of  model inheritance & view inheritance to display the list
 of properties linked to a salesperson directly in the Settings / Users form
 view and implemented  ondelete() and create() functions.
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!
Good going on the task..
Here are a few questions and suggestions..

property_ids = fields.One2many('estate.property', 'property_type')
sequence = fields.Integer()
offer_ids = fields.One2many('estate.property.offer', 'property_type_id')
offer_count = fields.Integer(compute='_compute_offer')

Choose a reason for hiding this comment

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

Suggested change
offer_count = fields.Integer(compute='_compute_offer')
offer_count = fields.Integer(compute='_compute_offer_count')

<group>
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="state"/>
<field name="property_type" options="{'no_create_edit': true}"/>

Choose a reason for hiding this comment

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

what will this option do?

def action_property_sold(self):
for record in self:
if record.state == 'cancelled':
raise UserError("cancelled property cannot be sold")

Choose a reason for hiding this comment

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

Explain the events where should I use UserError and ValidationError?

<field name="arch" type="xml">
<list editable="bottom" decoration-success="status=='accepted'" decoration-danger="status=='refused'">
<field name="price"/>
<field name="status" optional="hide"/>

Choose a reason for hiding this comment

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

What's the purpose of using optional hide?

<field name="name">properties</field>
<field name="res_model">estate.property</field>
<field name="view_mode">list,form</field>
<field name="context">{'search_default_active': True}</field>

Choose a reason for hiding this comment

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

This default search is used for filter, what if I want to make a default group by?

)
property_type = fields.Many2one('estate.property.type', string="property type")
salesman_id = fields.Many2one(
'res.users', string="Salesman", 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.

What does this lambda function do?

Comment on lines +18 to +19
<button name="action_accept" type="object" title="accept" icon="fa-check" invisible='status'/>
<button name="action_refuse" type="object" title="refuse" icon="fa-times" invisible='status'/>

Choose a reason for hiding this comment

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

How can I make these buttons invisible once I have accepted an offer?

Comment on lines +44 to +50
<field name="property_ids">
<list>
<field name="name" string="Title"/>
<field name="expected_price"/>
<field name="state"/>
</list>
</field>

Choose a reason for hiding this comment

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

What is the purpose of explicitly defining a list (tree) view here, even though the field is a One2many?
Won't it work just fine even if you write just this <field name="property_ids">?

Comment on lines +8 to +13
<page name="preferences" position="after">
<page name="Estate Property">
<field name="property_ids"/>
</page>
</page>
</field>

Choose a reason for hiding this comment

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

Indentation issue

<form string="Property Types">
<sheet>
<header>
<button class="oe_stat_button" icon="fa-money" type="action" name="%(estate_property_offer_model_action)d">

Choose a reason for hiding this comment

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

What does type action do? And what are the other types?

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