-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ADD] Estate: Add Estate Module #1096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Conversation
I have connected a database named 'home.plan' to my module estate and and added layer of security (ch-3,4)
958aa54 to
f7d4a9d
Compare
mash-odoo
left a comment
There was a problem hiding this 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.
mash-odoo
left a comment
There was a problem hiding this 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.
|
Can you explain this behavior? |
It was asked to do in tutorial, i have modified it as per your guidance |
…, Attributes and Options, List (ch-10,11)
9ae40e8 to
b9a1488
Compare
mash-odoo
left a comment
There was a problem hiding this 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
| if record.selling_price and float_compare( | ||
| record.selling_price, (0.9 * record.expected_price) | ||
| ,2 ) == -1 : |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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'))]"/> |
There was a problem hiding this comment.
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'" > |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
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

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.