Conversation
initial setup of real estate module - Done Basic structure of estate module - Done Estate Property Model Using ORM -Done
bea4c23 to
c66d6ed
Compare
Solved Previous Issue Chapter 4 - done Security File Added
c66d6ed to
002667b
Compare
Views folder created with XML data file Action and Menu added in UI Learned how actions and menus work
Remaining Exercises - Done Added Active fields with Default Value Added State field with their Values
312f1cb to
8a9ce27
Compare
2 Exercise Solved Added List view to display records Added Form view to display one record in detail
mash-odoo
left a comment
There was a problem hiding this comment.
Hello!
Great start on the app..
I have added some comments..mostly nits.
Also please update the PR title
Applied all requested changes Added Search view Added Domain by filter and Group by filter
Completed Exercise 1 ,2 and 3 Added New models, fields, Action and Menus Completed Many2one and Many2many relations
22f5196 to
c78f742
Compare
Completed last Exercise Added New model with their Form and list View Completed One2many relations
c78f742 to
44870df
Compare
mash-odoo
left a comment
There was a problem hiding this comment.
Hello!
Good going on the task...
Here are a few questions and suggestions.
| postcode = fields.Char() | ||
| date_availability = fields.Date(string="Available from", copy=False, default=lambda self: fields.Date.today() + timedelta(days=90)) | ||
| expected_price = fields.Float(required=True) | ||
| selling_price = fields.Float(readonly=True, copy=True) |
There was a problem hiding this comment.
Do you know like where should we give readonly?
- While declaring a field in .py file
- While displaying it in UI side
| status = fields.Selection( | ||
| [ | ||
| ('Accepted', "Accepted"), | ||
| ('Refused', "Refused") | ||
| ] | ||
| , copy=False) |
There was a problem hiding this comment.
| status = fields.Selection( | |
| [ | |
| ('Accepted', "Accepted"), | |
| ('Refused', "Refused") | |
| ] | |
| , copy=False) | |
| status = fields.Selection( | |
| [ | |
| ('accepted', "Accepted"), | |
| ('refused', "Refused") | |
| ], | |
| copy=False) |
Try keeping the key in lowercase
| <filter name="available" string="Available" | ||
| domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/> |
There was a problem hiding this comment.
Can you rewrite this domain in an optimized way?
| <filter name="available" string="Available" | ||
| domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/> | ||
| <filter name="group_postcode" string="Postcode" | ||
| context="{'group_by':'postcode'}"/> |
There was a problem hiding this comment.
| context="{'group_by':'postcode'}"/> | |
| context="{'group_by': 'postcode'}"/> |
| <sheet> | ||
|
|
||
| <h1> | ||
| <field name="name" placeholder="Enter title..."/> | ||
| </h1> | ||
|
|
||
| <group> | ||
| <group> | ||
| <field name="tag_id" widget="many2many_tags"/> | ||
| <field name="postcode"/> |
There was a problem hiding this comment.
| <sheet> | |
| <h1> | |
| <field name="name" placeholder="Enter title..."/> | |
| </h1> | |
| <group> | |
| <group> | |
| <field name="tag_id" widget="many2many_tags"/> | |
| <field name="postcode"/> | |
| <sheet> | |
| <h1> | |
| <field name="name" placeholder="Enter title..."/> | |
| </h1> | |
| <group> | |
| <group> | |
| <field name="tag_id" widget="many2many_tags"/> | |
| <field name="postcode"/> |
Remove unnecessary empty lines from the entire file
| from datetime import timedelta | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): |
There was a problem hiding this comment.
What are the different types of models which we can use?
Also why have you used models.Model here specifically?
|
|
||
| property_type_id = fields.Many2one('estate.property.type', string="Property Type") | ||
| buyer_id = fields.Many2one('res.partner', string="Buyer", copy=False) | ||
| seller_id = fields.Many2one('res.users', string="Seller", default=lambda self: self.env.user) |
There was a problem hiding this comment.
What is a lambda function? And why do we need to use this function here?

initial setup of real estate module - Done
Basic structure of estate module - Done
Estate Property Model Using ORM -Done