[ADD] estate: started the server framework,completed the coding guidelines, setup guide, and chapter 1#1265
[ADD] estate: started the server framework,completed the coding guidelines, setup guide, and chapter 1#1265abkus-odoo wants to merge 22 commits into
Conversation
There was a problem hiding this comment.
Hello @abkus-odoo
Good Work!
Can you please add the PR Description?
Also followe this commit message documentation - https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html
Thanks
| @@ -0,0 +1 @@ | |||
| from . import estate_property No newline at end of file | |||
There was a problem hiding this comment.
Should be one empty line at the end of the file,
There was a problem hiding this comment.
ok sir, i will take care of it
|
|
||
| name = fields.Char(required=True) | ||
| description = fields.Text() | ||
|
|
|
|
||
| postcode = fields.Char() | ||
| date_availability = fields.Date() | ||
|
|
| ('south', 'South'), | ||
| ('east', 'East'), | ||
| ('west', 'West'), | ||
| ]) No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
98637d4 to
f730e20
Compare
| from dateutil.relativedelta import relativedelta | ||
| from odoo import fields, models |
There was a problem hiding this comment.
Can you please follwe the import coding guidelines?
https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#imports
| parent="estate_property_type_menu" | ||
| action="estate_property_type_action" | ||
| /> | ||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| <field name="res_model">estate.property.type</field> | ||
| <field name="view_mode">list,form</field> | ||
| </record> | ||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| <form string="Properties"> | ||
| <sheet> | ||
| <div> | ||
| <h1><field name="name"/></h1> |
| <page string="Description"> | ||
| <group> | ||
| <field name="description"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area"/> | ||
| <field name="facades"/> | ||
| <field name="garage"/> | ||
| <field name="garden"/> | ||
| <field name="garden_area"/> | ||
| <field name="garden_orientation"/> | ||
| <field name="active"/> | ||
| <field name="state"/> | ||
| </group> | ||
| </page> |
| </field> | ||
| </record> | ||
|
|
||
| <!--Search View--> |
There was a problem hiding this comment.
Writing a comment is good, but we can write only whenever it's required.
4d38cf6 to
cd5b099
Compare
8e31c04 to
00037e5
Compare
bit-odoo
left a comment
There was a problem hiding this comment.
Hello
I have added some quick comments. You are doing rapitadly the same mistake. Please try to avoid it.
Thanks
| from . import estate_property_type | ||
| from . import estate_property_tag | ||
| from . import estate_property_offer | ||
|
|
| raise ValidationError( | ||
| "Selling price cannot be lower than 90% of the expected price" | ||
| ) |
There was a problem hiding this comment.
It is good to make the error message translatable.
| raise ValidationError( | |
| "Selling price cannot be lower than 90% of the expected price" | |
| ) | |
| raise ValidationError(_( | |
| "Selling price cannot be lower than 90% of the expected price" | |
| )) |
| "application": True, | ||
| "installable": True | ||
| } | ||
|
|
| <!--Form | ||
| View--> |
There was a problem hiding this comment.
No need to add comments for all. It's only necessary when the code is complex, etc.
| <field name="res_model">estate.property.type</field> | ||
| <field name="view_mode">list,form</field> | ||
| </record> | ||
| </odoo> No newline at end of file |
| <field name="view_mode">list,form</field> | ||
| </record> | ||
|
|
||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| </field> | ||
| </record> | ||
|
|
||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
2f1b1f7 to
aa9a01d
Compare
Added the basic structure for the new module by creating the and files.
- Added real_estate module - Completed Chapter 2 exercises - Understood ORM basics and how it works - Began working with Odoo ORM structure
- Created estate.property model - Added all required basic fields - Configured required field attributes - Verified PostgreSQL schema updates using Odoo ORM
- Created ir.model.access.csv for estate.property model - Added read, write, create and delete permissions - Learned how Odoo security works using access rights - Added security file in __manifest__.py - Fixed access warning for estate.property model
- Added estate_property_views.xml with basic act_window action - Connected estate.property model with UI through action - Understood how menu > action >view >model flow works in Odoo - Created views folder and add the estate_property_views.xml file - After adding this file Odoo loads it successfully during module update - Action gets created in the database but nothing shows in UI bcz menu is not added
- Added estate_menu.xml and connected menu with action - Added estate_property_views.xml with list and form views - Learned basic structure of Odoo views and actions - Completed Chapter 5 and understood form/list view concepts - Practiced menu >action >view connection flow
- Added custom search view for estate properties - Implemented search fields for property filtering - Added predefined filters and group by functionality - Practiced and understood search views, filters, domains, and group by concepts from Chapter 6 exercise
- Started Chapter 7 on relational fields - Revised earlier Odoo tutorial chapters - Reviewed models, views, ORM, and field concepts
- Fixed code formatting issues and removed unnecessary whitespace - Cleaned up XML and Python structure for better readability - Started learning relational fields (Many2one) - Began exercises from the chapter on Many2one fields
- Studied Many2one field behavior and relationships - Explored res.partner and res.users models - Started implementing Many2one field exercises in estate module - Improved understanding of relational fields in Odoo
Completed Many2many field exercise for property tags - Added estate.property.tag model estate_property_tag.py - Created views for property tags list and form views - Added menu and action for Property Tags in Estate module
- Completed One2many field exercise, added estate_property_offer model, and implemented its views - Added offer_ids field in estate_property_offer.py
- Started learning computed fields and completed the first exercise - Added total_area field in estate_property.py - Computed total_area from living_area and garden_area using a compute method
- Added best_offer field on estate.property - Implemented compute method using mapped() to determine highest offer price - Updated dependencies on offer_ids.price for automatic recomputation
- Added validity and date_deadline fields to estate.property.offer - Implemented computed date_deadline field with @api.depends - Added inverse method to recalculate validity from deadline date - Added garden onchange in estate.property to auto-set garden area and orientation - Configured default values and field synchronization for offer deadlines
- Added Cancel and Sold actions on estate.property with state transition validation - Prevented cancelled properties from being sold and sold properties from being cancelled using UserError - Added Accept and Refuse actions on estate.property.offer - Implemented offer status updates and corresponding form view buttons with icons
- Added SQL constraints in estate models: - property: expected_price > 0, selling_price >= 0 - offer: price > 0 - tag: UNIQUE(name) - property type: UNIQUE(name
…dget - Added property_ids One2many field in estate.property.type - Implemented inline list view for properties in property type form - Added statusbar widget in estate.property state field - Updated form view to display related properties with limited fields
- Added model ordering for properties, offers, tags, and property types Added sequence field with manual ordering support for property types Configured property type field to disable create/edit from property form Added color field to tags and enabled color picker widget
- Added invisible rules for garden fields and offer buttons - Restricted offer creation based on property state (readonly) - Made list views editable for property, offer and tags - Updated list view fields (optional date_availability, hidden by default) - Added decorations for property and offer states - Set default 'Available' filter and updated living area search domain
aa9a01d to
93650b3
Compare

Added the initial setup for the estate tutorial module, including the server framework, coding guidelines, setup instructions, and completion of chapter 1. This sets up the base structure for the rest of the Server framework 101 Chapters.