Skip to content

estate module: Write importable modules tutorial #806

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

Draft
wants to merge 13 commits into
base: 18.0
Choose a base branch
from

Conversation

arthurrrm
Copy link

No description provided.

@robodoo
Copy link

robodoo commented May 30, 2025

Pull request status dashboard

@arthurrrm arthurrrm marked this pull request as ready for review May 30, 2025 15:14
@arthurrrm arthurrrm closed this Jun 3, 2025
@arthurrrm arthurrrm reopened this Jun 3, 2025
@arthurrrm arthurrrm marked this pull request as draft June 4, 2025 10:06
Copy link

@frva-odoo frva-odoo left a comment

Choose a reason for hiding this comment

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

Looks great, good job ! Just a few short comments 🙂

Copy link

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

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

Good job @arthurrrm !
Don't hesitate to ask if one of my comment is unclear or does not make sense. Most of these are suggestions, so we can discuss pros / cons if you like.
Cheers!

Copy link

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

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

Missed those two ones

Comment on lines +90 to +91
<field name="compute"><![CDATA[for property in self:
property['x_garden_area'] = 0 if not property.x_garden else 1000

Choose a reason for hiding this comment

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

back to this: this is not correct. It is in an onchange, to set back to a default value when editing the boolean in the form. But here you would totally erase the value entered by the user.

Comment on lines +8 to +13
for offer in records:
offer.write({'x_status': 'accepted'})
offer.x_property_id.write({'x_selling_price': offer.x_price, 'x_partner_id': offer.x_partner_id})
for other_offer in offer.x_property_id.x_offer_ids:
if other_offer != offer:
other_offer.write({'x_status': 'refused'})

Choose a reason for hiding this comment

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

Ok, but what if you accept two offers for the same property? It seems like only one will be accepted, but it is kind of magic, no? Shouldn't we take more care (and maybe raise in such cases)?

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.

4 participants