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: Manage Your Properties, Maximize Your Returns #135

Draft
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

aneg-odoo
Copy link

-create new estate model
-create offer for a property and relation between properties like one2Many , many2Many, many2One
-create computed fields
-create action fields and action buttons for sold & cancle and offer accept & refused
-create views for property, type, tag and offer
-create security for all the the above model

@aneg-odoo aneg-odoo force-pushed the 17.0-tranning-aneg branch 7 times, most recently from 374f472 to 818ba2b Compare September 24, 2024 11:24
-create new estate model
-create offer for a property and relation between properties like one2Many ,
many2Many, many2One
-create computed fields
-create action fields and action buttons for sold & cancle and offer accept &
refused
-create views for property, type, tag and offer
-create security for all the the above model
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 @aneg-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.

Leave a blank line at the EOF
Make sure to check in 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 108 to 112
# 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 +24 to +31
<div class="d-flex justify-content-end">
<header>
<button name="%(estate.estate_property_offer_action)d" type="action"
class="oe_stat_button"
icon="fa-money" string="Offers">
<field name="offer_count" string="Offer Count" />
</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.estate_property_offer_action)d" type="action"
class="oe_stat_button"
icon="fa-money" string="Offers">
<field name="offer_count" string="Offer Count" />
</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 alignment of stat button

<filter string="group_by_postcode" name="postcode"
context="{'group_by' :'postcode'}" />
</search>

Choose a reason for hiding this comment

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

Remove extra blank lines.
Check for other files also

…eatures

(estate): add property offers report and sample data for testing

- Created a new report for estate property offers (PDF format)
- Added sample data for testing new estate property features
- Fixed XML issues related to ir.actions.report and external ID conflicts
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.

2 participants