Skip to content

[ADD] estate: add initial module structure#1366

Open
tonymchl wants to merge 13 commits into
odoo:19.0from
odoo-dev:19.0-technical-training-tomic
Open

[ADD] estate: add initial module structure#1366
tonymchl wants to merge 13 commits into
odoo:19.0from
odoo-dev:19.0-technical-training-tomic

Conversation

@tonymchl

Copy link
Copy Markdown

No description provided.

@robodoo

robodoo commented Jul 20, 2026

Copy link
Copy Markdown

Pull request status dashboard

@SaddemAmine

Copy link
Copy Markdown

I see you have a lot of files leftover from when you were using PyCharm, let's try to remove them!

@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from 2ebe8ce to 41367ac Compare July 22, 2026 08:07
@SaddemAmine
SaddemAmine force-pushed the 19.0-technical-training-tomic branch from 1bad78c to 1f717c8 Compare July 22, 2026 13:53
@SaddemAmine

Copy link
Copy Markdown

Enjoy

@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from 1f717c8 to caea9be Compare July 22, 2026 14:35
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from caea9be to a60801f Compare July 22, 2026 14:40
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from bd3002b to af1db63 Compare July 22, 2026 15:24
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch 2 times, most recently from 5b95430 to 7055963 Compare July 23, 2026 12:26
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch 3 times, most recently from de3504a to b098b9e Compare July 23, 2026 14:40
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch 3 times, most recently from 0d35e8e to a2837a2 Compare July 24, 2026 09:58
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from e3bfc94 to 9e60d69 Compare July 24, 2026 11:10
@tonymchl
tonymchl force-pushed the 19.0-technical-training-tomic branch from 09fb758 to ab1e0d4 Compare July 24, 2026 11:40

@SaddemAmine SaddemAmine left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very good stuff, thank you for the PR Tony!

I see that in older commits, the ci/style issues pop up again, usually you would need to make sure every commit passes CI on its own. For the purposes of this tutorial, I'll leave that up to you to decide if you want to go back and fix the styling errors.

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need for the extra lines here and at L20 btw!

name="Property Tags"
parent="estate_menu_settings"
action="estate_property_tag_action"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nitpicking but this is an unnecessary line break

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same in this file about the line breaks. Again, mostly my style of coding and not a blocking thing per se

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- 1. Action -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<!-- 1. Action -->
<!-- 1. Actions -->

Comment thread estate/__manifest__.py
{
'name': 'Real Estate',
'version': '1.0',
'author': 'tomic',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same same

Comment on lines +13 to +26
"partner_id": record.buyer_id.id,
"move_type": "out_invoice",
"invoice_line_ids": [
Command.create({
"name": f"Commission (6%) - {record.name}",
"quantity": 1,
"price_unit": 0.06 * record.selling_price,
}),
Command.create({
"name": "Administrative fees",
"quantity": 1,
"price_unit": 100.00,
}),
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Btw a nice convention we started adopting in my team recently in using single quotes for technical strings and double quotes for the user facing ones. Feel free to start doing that too if it speaks to you. The idea is to be able to tell at a glance if a string is meant to be visible by the user.

"move_type": "out_invoice",
"invoice_line_ids": [
Command.create({
"name": f"Commission (6%) - {record.name}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Translation

"price_unit": 0.06 * record.selling_price,
}),
Command.create({
"name": "Administrative fees",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same here

})

if invoices_vals:
self.env["account.move"].with_context(default_move_type="out_invoice").create(invoices_vals)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why are we using default_move_type here?

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