-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: created estate module #113
Conversation
-Added estate.property model -Created initial views for the model -Added menus under Advertisement -> Property -Created tree ,form and search in estate module -Created to show the smiling_face when property record data not found on default search
…r, tag -Done mapping Many2one between estate_property to estate_property_type. -Done mapping Many2many between estate_property to estate_property_tag -Done mapping One2Many between estate_property to estate_property_offer Also their views and menu -Covered content up to Chapter 7
…t garden - Add the total_area field to estate.property, defined as the sum of the living area and the garden_area. - Add the best_price field to estate.property, defined as the highest of the offers’ price and add the field to the form view - perform Inverse function - create a onchange method() for garden orientation - covered chapter 8
…ing price - ADD Sold and Cancel button with conditions - ADD accept and refused button with conditions -ADD constrain on selling price to check that greater than 90% to expected price - Covered chapter 9 and 10
3f79460
to
11bab82
Compare
- add status bar widget, model ordering on basis of their name, id and manual ordering -Add conditional display of buttons(invisible, optional, readonly) -Add a default filter. make the ‘Available’ filter selected by default in the estate.property action. -add the stat button - Covered chapter 11
11bab82
to
3dfbbeb
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 @irah-odoo
I have left some remarks and a couple of suggestions.
Can you please have a look?
Thanks!!
estate/models/estate_property.py
Outdated
from odoo import models, fields, api | ||
from dateutil.relativedelta import relativedelta | ||
from datetime import date |
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 | |
from dateutil.relativedelta import relativedelta | |
from datetime import date | |
from datetime import date | |
from dateutil.relativedelta import relativedelta | |
from odoo import api, fields, model | |
generally we import the external libraries first and then imports from odoo in alphabetical orders
|
||
|
||
|
||
</odoo> |
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.
Missing newline at EOF
</tree> | ||
|
||
</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.
</p> | ||
</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.
Unnecessary blank lines. make sure to check in other files also.
today1 = fields.Date.from_string(record.create_date) | ||
updated_deadline_date = fields.Date.from_string(record.date_deadline) | ||
record.validity = (updated_deadline_date - today1).days |
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.
today1 = fields.Date.from_string(record.create_date) | |
updated_deadline_date = fields.Date.from_string(record.date_deadline) | |
record.validity = (updated_deadline_date - today1).days | |
record.validity = (record.date_deadline - record.property_id.create_date.date()).days |
we write the inverse method just after the compute.
today = record.create_date | ||
if today: | ||
today = record.create_date | ||
else: | ||
today = date.today() | ||
if record.date_deadline: | ||
record.date_deadline = today + (record.validity - (record.date_deadline - today).days) | ||
else: | ||
record.date_deadline = timedelta(days=record.validity) + today |
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.
today = record.create_date | |
if today: | |
today = record.create_date | |
else: | |
today = date.today() | |
if record.date_deadline: | |
record.date_deadline = today + (record.validity - (record.date_deadline - today).days) | |
else: | |
record.date_deadline = timedelta(days=record.validity) + today | |
record.date_deadline = record.property_id.create_date + relativedelta( | |
days=record.validity | |
) |
Can we do something like this? But make sure to check all the cases.
<button type="action" name="%(estate.estate_property_offer_check)d" string="offers" class="oe_stat_button" | ||
icon="fa-ticket"> | ||
|
||
<div class="o_stat_info"> | ||
<field name="offer_count" widget="statinfo" string="" /> | ||
<span class="o_stat_text"> Offer</span> | ||
</div> | ||
|
||
</button> |
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.
<button type="action" name="%(estate.estate_property_offer_check)d" string="offers" class="oe_stat_button" | |
icon="fa-ticket"> | |
<div class="o_stat_info"> | |
<field name="offer_count" widget="statinfo" string="" /> | |
<span class="o_stat_text"> Offer</span> | |
</div> | |
</button> | |
<div name="button_box"> | |
<button class="oe_stat_button" type="action" name="%(estate.action_estate_property_offer)d" | |
icon="fa-ticket"> | |
<field string="Offers" name="offer_count" widget="statinfo"/> | |
</button> | |
</div> |
we can do something like this to format stat button.
estate/models/estate_property.py
Outdated
|
||
|
||
class estate_property(models.Model): | ||
_name = "estate_property" |
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.
_name = "estate_property" | |
_name = "estate.property" |
we use . while giving model name as per convention make sure to check in other files also.
4593aab
to
a4935cf
Compare
Add business logic and view inheritance for real estate module - Implemented business logic to prevent deletion of properties unless their state is 'New' or 'Canceled'. - Added a new field `property_ids` to the `res.users` model to list properties associated with a salesperson. - Extended the user form view to display the new `property_ids` field in a new notebook page. Completed till chapter 12 Implement invoice creation upon property sale - Created `estate_account` module as a link module with dependencies on `estate` and `account`. - Inherited `estate.property` model in `estate_account` to extend the property sale action. - Overrode the `action_sold` method to call super and initiate invoice creation. - Added logic to create a customer invoice when a property is set to 'Sold'. - Included invoice lines with 6% of the selling price and an additional 100.00 for administrative fees. The new functionality ensures that invoices are generated automatically in the Invoicing module when a property sale is confirmed. Completed till chapter 13
a4935cf
to
3740821
Compare
-Added master data for standard Real Estate Property Types: Residential, Commercial, Industrial, and Land. -Added demo data for the estate module, including properties like Big Villa and Trailer Home. -Created demo data for offers linked to demo properties using existing partners. -Ensured that demo properties have their Property Type set to Residential. -Added date handling for demo offers to be relative to the module installation date. -Utilized Command methods to create offers directly within the One2many field of a new property. -Implemented data extension examples for XML-based record updates. Completed chapter till Demo Data. - Created estate_property_templates.xml to define the report template for displaying property offers. - Added estate_property_reports.xml for the ir.actions.report to include the report in the module's business logic. - Enhanced the report by adding logic to conditionally handle cases with no offers using t-if and t-else. -Extended the property report in the estate_account module to include invoice information for sold properties using QWeb inheritance.
Add Controller - Created the controller in estate - Add pagination - Add redirect of property detail view - Covered the controller section Add Wizard and Security -Implemented the Wizard to add Offer on multiple properties - Created Agent and Manger - Implemented the Access Right to Agent and Manager Add new Wizard task - Added new module make meeting - created a new meeting function to add event to calendar
7cfd0bc
to
a57809c
Compare
-created model -created view -added security features
-added medical aids details like name, phone number, email, company -added sequence in tree view of all required model -added patient history, patient details, guarantor in patient form view -added invoice and report
-Add controller dental module as given in task -Add template -Add static file Design UI
-Add controller dental module as given in task -Add template -Add static file -Design UI
111bfb8
to
ab43e96
Compare
- create form view of each dental patient -create breadcrumb for routing -create form view of medical aids, medical history and dental history
…nvoice - Add setting section for installment - Add wizard for Add EMI - Add Button for document module redirect - Implemented the invoice schedule when exceed the delay process day - Add the Document Upload request smart button - Add wizard for document request for sales order
1ac7a38
to
edaf4ae
Compare
- add warranty configuration in sale setting - add button in sale order -add a new field warranty checkbox in product template - add wizard
- on the deletion of product in sale order line delete the related warranty to it.
d8c2894
to
4f4abaf
Compare
create a estate module for training