Skip to content
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

Draft
wants to merge 12 commits into
base: 18.0
Choose a base branch
from

Conversation

sbha-odoo
Copy link

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

@robodoo
Copy link

robodoo commented Feb 6, 2025

Pull request status dashboard

'depends': ['base'],
'author': 'Shiv Bhadaniya',
'application': True,
'auto_install': True,
Copy link

@sauc-odoo sauc-odoo Feb 7, 2025

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.

Copy link
Author

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.

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))

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.

Comment on lines 2 to 11
<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>

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"?>

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?

Copy link
Author

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>

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.

Copy link
Author

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
@sbha-odoo sbha-odoo force-pushed the 18.0-tutorials-sbha branch from 415ee0e to 854ce16 Compare February 7, 2025 10:09
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.
Comment on lines 37 to 38
buyer = fields.Many2one('res.partner', string="Buyer", copy=False)
seller = 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.

Keep a good practice to give _id suffix to m2o fields

Copy link
Author

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

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

@@ -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)

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

@@ -97,6 +97,7 @@ def _onchange_garden(self):
# ------------------------------------------------------------

def action_property_sold(self):
print("This method is called from estate ---------------------------")

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.
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
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