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: created estate module #113

Closed
wants to merge 16 commits into from

Conversation

irah-odoo
Copy link

create a estate module for training

-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
@irah-odoo irah-odoo force-pushed the 17.0-training-irah branch 5 times, most recently from 3f79460 to 11bab82 Compare August 12, 2024 12:03
- 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
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 @irah-odoo

I have left some remarks and a couple of suggestions.
Can you please have a look?

Thanks!!

Comment on lines 1 to 3
from odoo import models, fields, api
from dateutil.relativedelta import relativedelta
from datetime import date

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

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>

Choose a reason for hiding this comment

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

Suggested change

</p>
</field>
</record>

Choose a reason for hiding this comment

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

Suggested change

Unnecessary blank lines. make sure to check in other files also.

Comment on lines 45 to 47
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

Choose a reason for hiding this comment

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

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

Comment on lines 26 to 34
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

Choose a reason for hiding this comment

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

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

Comment on lines 29 to 37
<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>

Choose a reason for hiding this comment

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

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



class estate_property(models.Model):
_name = "estate_property"

Choose a reason for hiding this comment

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

Suggested change
_name = "estate_property"
_name = "estate.property"

we use . while giving model name as per convention make sure to check in other files also.

@irah-odoo irah-odoo force-pushed the 17.0-training-irah branch 2 times, most recently from 4593aab to a4935cf Compare August 14, 2024 08:42
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
-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
-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
- 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
- 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.
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