Skip to content

chean - Technical Onboarding#1341

Open
anchevalier wants to merge 14 commits into
odoo:19.0from
odoo-dev:19.0-onboarding-chean
Open

chean - Technical Onboarding#1341
anchevalier wants to merge 14 commits into
odoo:19.0from
odoo-dev:19.0-onboarding-chean

Conversation

@anchevalier

Copy link
Copy Markdown

No description provided.

Python cache files are environment-specific generated artifacts.

Remove tracked pycache files and add the corresponding .gitignore
rules.
@anchevalier anchevalier requested a review from ziriraha June 16, 2026 08:59
@anchevalier anchevalier self-assigned this Jun 16, 2026
@robodoo

robodoo commented Jun 16, 2026

Copy link
Copy Markdown

Pull request status dashboard

@anchevalier anchevalier force-pushed the 19.0-onboarding-chean branch from 924da73 to fcca45b Compare June 16, 2026 11:26
Comment thread estate/models/estate_property.py
Comment thread estate/models/estate_property.py Outdated
Add ensure_one() to actions intended to run on a single record and
use more explicit variable names to improve code readability.
Add status ribbons for sold and cancelled properties and display tags
in the property list view for better visibility.
@anchevalier anchevalier requested a review from ziriraha June 18, 2026 15:04

@ziriraha ziriraha 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.

Good work, can you please squash all the commits into a single one?

Comment on lines +56 to +59
property_type_id = fields.Many2one(
comodel_name="estate.property.type",
string="Property Type",
)

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
property_type_id = fields.Many2one(
comodel_name="estate.property.type",
string="Property Type",
)
property_type_id = fields.Many2one("estate.property.type", "Property Type")

No need to apply this change, but just so you know, this is possible to do

< 0
):
raise ValidationError(
_(

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
_(
self.env._(

we no longer use the _ import, its better to use self.env._ (basically because its horrible when you want to do a for _ in ... and you cant)

raise UserError(_("You cannot refuse an offer once it has been accepted."))

self.status = "refused"
return True

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

fyi (i dont know if its explained in the tutorial) actions can return action objects so you can say things like: open this popup, reload the page, redirect to here

access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1
access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1
access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1
access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

new line at eof

parent="estate_settings_menu"
sequence="20"
/>
</odoo> No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

new line at eof (on the others too)

<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">

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
<xpath expr="//notebook" position="inside">
<notebook position="inside">

I think you can also do overrides like this without xpath

"partner_id": record.buyer_id.id,
"move_type": "out_invoice",
"invoice_line_ids": [
Command.create(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

you can also do

Suggested change
Command.create(
(0, 0,

some people hate Command... but i dont know why

@ziriraha ziriraha 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.

forgot to add

properties = self.env["estate.property"].browse(
[vals["property_id"] for vals in vals_list]
)
properties_by_id = {property_.id: property_ for property_ in properties}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is good but isnt needed, you just call properties.browser(id) after and it would be the same effect

Something like:

properties = self.env["estate.property"].browse([vals["property_id"] for vals in vals_list])

for vals in vals_list:
    property = properties.browse(vals["property_id"])

@@ -0,0 +1,4 @@
{
"name": "Estate Account",
"depends": ["estate", "account"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sometimes we add auto_install: True to tell it to install automatically when all the depends modules are installed.

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