-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[ADD] estate: create an estate app #342
base: 18.0
Are you sure you want to change the base?
Conversation
estate/__manifest__.py
Outdated
'depends': ['base'], | ||
'author': 'Shiv Bhadaniya', | ||
'application': True, | ||
'auto_install': True, |
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.
Why you have added auto_install
can you please explain it?
Also add description for the module.
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.
auto_install is used to install linked modules.
A description has been added.
estate/models/estate_property.py
Outdated
name = fields.Char(required=True) | ||
description = fields.Text() | ||
postcode = fields.Char() | ||
date_availability = fields.Date(copy=False,default= fields.Date.add(fields.Date.today(), months=+3)) |
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.
make the default value dynamic as per the current timestamp.
estate/views/estate_menus.xml
Outdated
<odoo> | ||
|
||
<!-- Top menu item --> | ||
<menuitem | ||
id="menu_estate_root" | ||
name="Estate" | ||
> | ||
<!-- Advertisement Submenu --> | ||
<menuitem id="menu_advertisement" | ||
name="Advertisement" | ||
> | ||
<menuitem | ||
id="menu_advertisement_property" | ||
name="Properties" | ||
action="action_estate_property" | ||
/> | ||
</menuitem> | ||
</menuitem> |
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.
Improper code formatting
@@ -0,0 +1,20 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
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.
Why you have added this line, can you explain it?
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.
It is used for XML declaration.
<field name="name">Estate</field> | ||
<field name="res_model">estate.property</field> | ||
<field name="view_mode">list,form</field> | ||
</record> |
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.
I'm not able to see the list & form view but your commit message says that you have completed basic views.
So either add the views or change the commit message as per it. And also from next time this should not happen.
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.
Form and list have been added.
Created an estate application for Odoo Added models with basic fields Implemented security rules for models Configured menus and basic views (Form and List) Introduced application structure and architecture overview
415ee0e
to
854ce16
Compare
Removed auto install Added search options for estate properties. Implemented filters to refine property listings. Added group-by functionality for better data organization.
Implemented many2one, many2many, and one2many relations. Added computed fields and onchanges . Added computed fields for automatic updates. Added action buttons for property sale, cancellation, and offer management.
estate/models/estate_property.py
Outdated
buyer = fields.Many2one('res.partner', string="Buyer", copy=False) | ||
seller = fields.Many2one('res.users', string="Salesman", 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.
Keep a good practice to give _id
suffix to m2o fields
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.
Noted. Thank you for your suggestion.
…ields - Implemented "Cancel" and "Sold" buttons with relevant constraints - Added "Accept" and "Refuse" buttons with conditional display - Applied SQL and Python constraints to various fields across models - Added statusbar widget to display the state of the estate.property - Default filter applied to the property list view for better usability - Added a filter_domain for the "Living Area" field - Introduced a stat button for offers categorized by property type
Used ondelete decorator for safe record deletions via Inheritance. Created estate account module to inherit estate property & generate invoices.
Introduced Kanban View for better visual representation of properties. Sets different access rights on different models. Added Manager and Agent access rights. Refactor the code for better quality.
from . import estate_property_offer | ||
from . import estate_property_tag | ||
from . import estate_property_type | ||
from . import res_users |
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 EOF
estate/models/estate_property.py
Outdated
@@ -37,7 +37,7 @@ class EstateProperty(models.Model): | |||
# Many2one relationship | |||
property_type_id = fields.Many2one('estate.property.type', string="Property Type") | |||
buyer = fields.Many2one('res.partner', string="Buyer", copy=False) |
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.
Keep a good practice to add _id
suffix to m2o fields
estate/models/estate_property.py
Outdated
@@ -97,6 +97,7 @@ def _onchange_garden(self): | |||
# ------------------------------------------------------------ | |||
|
|||
def action_property_sold(self): | |||
print("This method is called from estate ---------------------------") |
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.
Remove print statements before pushing the code
Implemented Record Rules for data visibility control. Used security bypass where necessary. Programmatically checked security permissions to ensure proper access. Added demo data for structured testing. Extended models using inheritance for modularity. Added X2many fields to enhance relational data handling. Enabled chatter functionality for improved communication and tracking.
3829e4a
to
aa46686
Compare
Enabled Chatter functionality for improved communication and tracking. Added a property offers report in the Print menu. Improved reports with conditional logic using t-if/t-else. Created a new report for res.users to list their properties and offers. Implemented basic controller functionality.
Displayed property listings on the website using web controllers. Added a date-picker for enhanced user interaction. Implemented wizards for easier data entry and an improved user experience. Add test cases for sold properties without offers, and vice versa. Fix minor typos.
Built a counter using useState with an increment method. Extracted Counter into a separate component and reused it. Created a Card component with prop validation. Started work on the Todo list.
- Added a To-Do List component using `useState` and `useRef` - Improved understanding of the component lifecycle and Hooks - Utilized slots for better component structure
Designed a dashboard layout with quick navigation Utilized a service to fetch and display customers and leads
Created an estate application for Odoo
Added models with basic fields
Implemented security rules for models
Configured menus and basic views (Form and List)
Introduced application structure and architecture overview