-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
base: 18.0
Are you sure you want to change the base?
Conversation
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
Using Controller, Listing Property and also Display Property Details
8025435
to
8eaa8df
Compare
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.
Hello @hipr-odoo
Left some comments
Thanks
estate/models/estate_property.py
Outdated
|
||
|
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.
unnecessary blank lines
estate/models/estate_property.py
Outdated
from odoo import models, fields, api, exceptions | ||
from datetime import timedelta |
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.
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
estate/models/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
from . import estate_property, estate_property_type, estate_property_tag, estate_property_offer, 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.
Need blank line at EOF
estate/models/estate_property.py
Outdated
'view_mode': 'form', | ||
'res_model': 'estate.property.make.offer', | ||
'context': { | ||
'default_property_ids': self.ids, |
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.
no need for this one we can use this instead self.env.context.get('active_ids')
_sql_constraints = [ | ||
('price_positive', 'CHECK(price > 0)', 'The offer price must be strictly positive!') | ||
] |
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.
generally we put constraints after field defination
estate/security/security.xml
Outdated
<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> |
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.
<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) |
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.
there will be no need to link this wizard with estate property
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 | ||
} | ||
) |
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.
implement it by fetching active_ids(from previous comment)
estate_account/__manifest__.py
Outdated
'data':[ | ||
], | ||
'demo':[ | ||
|
||
] |
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.
no need for this one
682f809
to
35f9023
Compare
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.
35f9023
to
1d65eaa
Compare
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.
8a0302b
to
4efea14
Compare
create real estate module module for training purpose