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: add real estate module #223

Closed
wants to merge 15 commits into from

Conversation

yame-odoo
Copy link

Create a real estate module for technical training purposes.

technical training : till ch-8
technical training: till ch-11
completion of Server Framework 101 with Define module data
Enhance security: Restrict access to properties and invoicing features

- Implement security rules to limit access based on user roles (agents, managers).
-  multi-company support to isolate properties and users by agency.
- Bypass access rights for real-estate agents to confirm property sales without invoicing access.
- Restrict real-estate agent's access from view and other administrative features.
Implemented 'Add Offer' wizard to streamline the process of making offers on multiple properties at once
…ting

- Added a controller to list properties on the website.
- Integrated a pager for efficient navigation through property listings.
- Improved user experience by enabling seamless browsing of properties.
@robodoo
Copy link

robodoo commented Jan 16, 2025

Pull request status dashboard

Copy link

@adsh-odoo adsh-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello yame-odoo
Some comments
Thanks!!

from odoo.http import request


class Academy(http.Controller):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give the name of class something relatable to our usecase

Comment on lines +1 to +5
from odoo import fields, models, api, _
from datetime import datetime
from odoo.exceptions import UserError
from odoo.exceptions import ValidationError
from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from odoo import fields, models, api, _
from datetime import datetime
from odoo.exceptions import UserError
from odoo.exceptions import ValidationError
from dateutil.relativedelta import relativedelta
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError

Generally we first make external imports and then we import from odoo in alphabetical order.
Need to adapt in all files

"res_model": "propery.offers",
"view_mode": "form",
"context": {
"default_property_ids": self.ids,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this we can get the selected properties using self.context.get('active_ids')

_description = "TransientModelmodel for offers"

price = fields.Float("price", required=True)
property_ids = fields.Many2many("estate.property", string="property_id")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to to link this wizard with estate.property

Comment on lines 15 to 25
for property in self.property_ids:
try:
self.env["estate.property.offer"].create(
{
"price": self.price,
"property_id": property.id,
"buyer_id": self.buyer_id.id,
"validity": self.validity,
}
)
except Exception as e:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adapt this implementation using active_ids (refer previous comment)

"version": "0.1",
# any module necessary for this one to work correctly
"depends": ["base", "web", "estate", "account"],
"application": True,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinks we remove application="true" because it's bridge and it's ok if it is not there apps filters

Added a computed field book_price to Sales Order Lines and Account Move Lines to display the original product price ("Book Price") based on the selected  product

Updated Sales Order Lines list view to include the new "Book Price" field.

Updated Invoice Lines list view (customer invoices only) to include the new "Book Price" field.
- Created Kanban view for budget management
- Overrode 'New' button to allow multi-budget creation using a wizard
- Clicking on a Kanban card now opens the budget line for the particular budget
- Added a menu on budget cards with a 'Configure' button to
open the budget form view
- Budget line detail opens the Account Analytic Line list
- Added validation to trigger a warning or restrict analytic line creation if
 the budget exceeds the allocated amount
Implemented all OWL features mentioned in Chapter 1.
Added tutorials covering hooks, reactivity, and reusable components.
Provides a basic understanding of core OWL concepts.
Implemented a lazy-loaded dashboard for the JS awesome_dashboard tutorial.
Dashboard retrieves data from the awesome_dashboard.statistics service.
Displays various numerical data using graphs and cards.
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