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 new estate module and added types,offers,tags,v… #137

Closed
wants to merge 6 commits into from

Conversation

koye-odoo
Copy link

…iews

  • created a new estate module -defined init and manifest
    -created an estate_property model with the below fields and methods:
    -postcode,date_availability,selling_price,bed_rooms,facades.garden,
    orientation
    -compute_total,on_change,action_sold,action_cancel

-created estate_property_type,tags,offers models and their corresponding views

…iews

- created a new estate module
-defined init and manifest
-created an estate_property model with the below fields and methods:
     -postcode,date_availability,selling_price,bed_rooms,facades.garden,
       orientation
    -compute_total,on_change,action_sold,action_cancel

-created estate_property_type,tags,offers models and their corresponding views
…plates

Added new features to the estate module, including the ability to generate
comprehensive reports and the option to add dummy data for testing purposes.
These enhancements improve the module's functionality and usability, allowing
 for better data visualization and easier testing scenarios.
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 @koye-odoo
Some comments mostly regarding the guidelines.
Can you please check.
Thanks!!

]"/>
</record>

</odoo>

Choose a reason for hiding this comment

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

Need a blank line at EOF
Check for other files also.

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

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

Generally, we follow a convention in which we first import external libraries and then we make import from odoo in alphabetical order. Do same for other files also

Comment on lines 113 to 116
# def check_limit(self, vals):
# self.status == "Offer Received"
# if vals.get("price") <= self.best_price:
# raise ValidationError("the offer must be higher than best price")

Choose a reason for hiding this comment

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

Try to avoid pushing the commented code.

Comment on lines 23 to 31
<div class="d-flex justify-content-end">
<header>
<button name="%(estate.action_open_offer)d" type="action" string="Offer"
icon="fa-money" class="oe_stat_button">
<field name="offer_count" string="Offer Count">
</field>
</button>
</header>
</div>

Choose a reason for hiding this comment

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

Suggested change
<div class="d-flex justify-content-end">
<header>
<button name="%(estate.action_open_offer)d" type="action" string="Offer"
icon="fa-money" class="oe_stat_button">
<field name="offer_count" string="Offer Count">
</field>
</button>
</header>
</div>
<div name="button_box">
<button class="oe_stat_button" type="action" name="%(estate.action_open_offer)d"
icon="fa-ticket">
<field string="Offers" name="offer_count" widget="statinfo"/>
</button>
</div>

You can do something like this for better placement of stat button

</form>
</field>
</record>

Choose a reason for hiding this comment

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

remove extra blankline

- Created 'security.xml'`to define security groups for Real Estate users.
- Added 'category' field to the `__manifest.py  with value  'Real Estate/
Brokerage'.
- Created security groups:
  - `estate_group_user` (Agent) with category `
     base.module_category_real_estate_brokerage`.
  - `estate_group_manager` (Manager) which implies `estate_group_user`.
- Configured user roles so real estate agents only have access to the
Real Estate app.
- Tested access control by logging in with a real estate agent user
and verifying limited access.
- Implemented rule limiting agents to view/modify only properties with
no salesperson or where they are the assigned salesperson.
- Ensured real estate managers retain access to all properties.
- Verified estate_group_manager inherits permissions from estate_group_user
as required.
- Restricted the creation of Property Types and Tags to agents by updating
access control rules.
- Made the Settings menu only visible to estate managers and another group by
adding group-based restrictions.
- Applied multi-company rules to silo data access between different
companies/agencies in the estate module.
…operties.

- Added 'Add Offer' button in the estate property tree view header.
- Enabled selection of multiple properties for offer creation.
- Created wizard with fields for price, offer status, and buyer.
- Included 'Make an Offer' button to handle business logic and 'Cancel' button
for form cancellation.
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