Skip to content

Conversation

tshe-odoo
Copy link

  • Created an estate application for Odoo
  • Added access rights in ir.model.access.csv for estate.property
  • Created XML data files for actions and menus in the estate module
  • Defined three-level menu structure for property management
  • Implemented default values and field attributes for estate.property
  • Defined list and form views for different models and added some filters
  • Added active and state fields with predefined behaviors
  • Defined Relations between models

@robodoo
Copy link

robodoo commented Aug 20, 2025

Pull request status dashboard

@tshe-odoo tshe-odoo force-pushed the 18.0-tutorials-tshe branch 4 times, most recently from 35ef67e to 4493204 Compare August 21, 2025 06:22
…tomation

- Added computed fields with inverse methods for dynamic data synchronization.
- Implemented onchange methods to auto-fill related fields in the form view.
- Reduced manual input, improved accuracy, and streamlined data handling.
@tshe-odoo tshe-odoo force-pushed the 18.0-tutorials-tshe branch 2 times, most recently from a004406 to 34172e1 Compare August 21, 2025 06:43
…e changes

- Add 'Cancel' and 'Sold' buttons to estate.property
- Add 'Accept' and 'Refuse' buttons to estate.property.offer
- Prevent accepting more than one offer
- Set selling price and buyer on offer acceptance
- Prevent cancelling sold properties and vice versa
@tshe-odoo tshe-odoo force-pushed the 18.0-tutorials-tshe branch from 34172e1 to f9d70ab Compare August 21, 2025 06:45
Copy link

@bit-odoo bit-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,
Can you please adapt your commit message and PR description according to this guideline?
https://www.odoo.com/documentation/18.0/contributing/development/git_guidelines.html

if record.state != "cancelled":
record.state = "sold"
else:
raise exceptions.UserError("A cancelled property cannot be set as sold")

Choose a reason for hiding this comment

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

If state=cancelled then we should hide sold button.

Comment on lines +89 to +90
<field name="garden_area" string="Garden Area (sqm)" />
<field name="garden_orientation" string="Garden Orientation" />

Choose a reason for hiding this comment

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

Visible only if the garden is available.

git Outdated

Choose a reason for hiding this comment

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

Unnecessary file.

</field>
</record>

</odoo>

Choose a reason for hiding this comment

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

Should one empty line at the end of the file.

<field name="res_model">estate.property.type</field>
<field name="view_mode">list,form</field>
</record>
</odoo>

Choose a reason for hiding this comment

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

Should one empty line at the end of the file.

<field name="res_model">estate.property.tag</field>
<field name="view_mode">list,form</field>
</record>
</odoo>

Choose a reason for hiding this comment

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

Should one empty line at the end of the file.

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

Choose a reason for hiding this comment

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

Should one empty line at the end of the file.

</menuitem>


</odoo>

Choose a reason for hiding this comment

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

Should one empty line at the end of the file.

<form string="edit_form">
<header>
<button name="action_cancel" type="object" string="Cancel" />
<button name="action_sold" type="object" string="Sold" />

Choose a reason for hiding this comment

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

state should be displayed in the header.

</group>
</page>
<page string="Offers">
<field name="offers_ids" />

Choose a reason for hiding this comment

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

Should be able to add an offer directly from the list instead of opening the wizard.

…nique names

Enforced strict validation to ensure:
- Property, Selling and offer prices are strictly positive
- Selling price cannot be less than 90% of the expected price
- Property type and tag names are unique across records
record.property_id.buyer = record.partner_id
record.property_id.state = "offer_accepted"
else:
raise exceptions.UserError("Already One Offer is Accepted")

Choose a reason for hiding this comment

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

No need of usererror, we can hide the accept and refuse buttons.


def action_refused(self):
for record in self:
record.status = "refused"

Choose a reason for hiding this comment

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

should not be able to refuse, once this offer is approved.

Comment on lines +39 to +40


Choose a reason for hiding this comment

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

unnecessary empty line.

git

Choose a reason for hiding this comment

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

Unnecessary file.

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