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 #227

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

Conversation

hipr-odoo
Copy link

create real estate module module for training purpose

Add Views and Model :
Model :
estate_property,
estate_property_offer,
estate_property_tag,
estate_property_type

Views:
estate_menus,
estate_property_offer_views,
estate_property_tag_views,
estate_property_type_views,
estate_property_views
Make Connection in property fields using Computed Field, Inverse Function and
onchanges, type object
Inline Views
Widgets
List Order
Attributes and options
-> List
-> Form
-> Search
Stat buttons
Perform inheritance in the estate Module,
Implement Inheritance to Display Estate Properties in
Settings -> users & company -> users -> Mitchell Admin
inherit the method of estate.property
Make a kanban view group using property type
Add fields using CSV and XML Files
in PDF Display Product-wise offers, Display Salesperson-wise Product
Make Report using Inherit the template
after Improve security:
Make a group of users & Managers to access Rights
provide Record Rules & check Bypassing Security and Programmatically checking
security
Security : Give access to Manager to access the Property Tag & Types
Wizard : Make a view offers can be add in multiple property
Controller : Make URL connection in website
@robodoo
Copy link

robodoo commented Jan 17, 2025

Pull request status dashboard

Using Controller, Listing Property and also Display Property Details
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 @hipr-odoo
Left some comments
Thanks

Comment on lines 94 to 95


Choose a reason for hiding this comment

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

unnecessary blank lines

Comment on lines 1 to 2
from odoo import models, fields, api, exceptions
from datetime import timedelta

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 models, fields, api, exceptions
from datetime import timedelta
from datetime import timedelta
from odoo import api, fields, models,
from odoo.exceptions import UserError

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

@@ -0,0 +1 @@
from . import estate_property, estate_property_type, estate_property_tag, estate_property_offer, res_users

Choose a reason for hiding this comment

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

Need blank line at EOF

'view_mode': 'form',
'res_model': 'estate.property.make.offer',
'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 one we can use this instead self.env.context.get('active_ids')

Comment on lines 11 to 13
_sql_constraints = [
('price_positive', 'CHECK(price > 0)', 'The offer price must be strictly positive!')
]

Choose a reason for hiding this comment

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

generally we put constraints after field defination

<field name="name">Salesperson access rule for property</field>
<field name="model_id" ref="estate.model_estate_property"/>
<field name="groups" eval="[Command.link(ref('estate.estate_group_manager'))]"/>
<field name="domain_force">[]</field>

Choose a reason for hiding this comment

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

Suggested change
<field name="domain_force">[]</field>
<field name="domain_force">[(1, '=', 1)]</field>


price = fields.Float(string="price")
partner_id = fields.Many2one('res.partner',required=True)
property_ids = fields.Many2many('estate.property', required=True)

Choose a reason for hiding this comment

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

there will be no need to link this wizard with estate property

Comment on lines 13 to 23
for property in self.property_ids:
try:
# Create the offer record
self.env['estate.property.offer'].create(
{
'price': self.price,
'property_id': property.id,
'partner_id': self.partner_id.id,
'validity': self.validity
}
)

Choose a reason for hiding this comment

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

implement it by fetching active_ids(from previous comment)

Comment on lines 14 to 18
'data':[
],
'demo':[

]

Choose a reason for hiding this comment

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

no need for this one

Users without the required permissions will be denied the ability to confirm a
sale order.
Once the administrator grants the necessary rights to the user, they will be
able to confirm the sale order.
@hipr-odoo hipr-odoo closed this Jan 24, 2025
@hipr-odoo hipr-odoo reopened this Jan 27, 2025
Created a budget management module to handle budgets for different periods
(monthly and quarterly).
Users can set a budget amount for each account.
Automatically calculates expenses based on the provided amount.
Shows a warning if the expense exceeds the budget amount.
Added 3 types of charts: Gantt, Pivot, and Graph for better budget tracking.
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