Skip to content

Conversation

@vikri-odoo
Copy link

Here I have created new add-on for on-boarding tutorial project

@robodoo
Copy link

robodoo commented Dec 16, 2025

Pull request status dashboard

Copy link

@barracudapps barracudapps left a comment

Choose a reason for hiding this comment

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

Some comments here and there. Can you also please review your PR title and description following our guidelines (https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html)?
A clear commit message is really important to describe what you did and why you did it.

@@ -0,0 +1 @@
from . import models No newline at end of file

Choose a reason for hiding this comment

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

Don't forget Unix conventions on text files' structure based on a line definition (cf. https://peps.python.org/pep-0008/ and https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206)

Suggested change
from . import models
from . import models

Please review all your files

Copy link
Author

Choose a reason for hiding this comment

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

thanks for the documentation clear. I have added ruff now so it'll do the formatting from now on.

'version': '0.1',

'application': True,
'installable': True,

Choose a reason for hiding this comment

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

installable is true by default (at least with application) so not required

Copy link
Author

Choose a reason for hiding this comment

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

removed installable and used application only as suggested.

Comment on lines 16 to 18
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list

Choose a reason for hiding this comment

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

Not needed here as obvious, just remove these lines

Copy link
Author

Choose a reason for hiding this comment

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

removed the unused comment lines

Comment on lines 5 to 7
'summary': """
This is a custom real estate application for understanding Odoo
""",

Choose a reason for hiding this comment

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

Try to keep as much single-lines as possible. Same further.

Copy link
Author

Choose a reason for hiding this comment

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

As mentioned, since it's just one line made one liner string.


class Estate(models.Model):
_name = 'estate'
_description = 'Real_Estate'

Choose a reason for hiding this comment

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

Use double quotes for non-technical strings

Copy link
Author

Choose a reason for hiding this comment

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

got it and made the non-technical strings in single quotes

Comment on lines 4 to 6

<menuitem id="estate_first_level_menu" name="Advertisements" parent="estate_menu_root"/>

Choose a reason for hiding this comment

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

Suggested change
<menuitem id="estate_first_level_menu" name="Advertisements" parent="estate_menu_root"/>
<menuitem id="estate_first_level_menu" name="Advertisements" parent="estate_menu_root"/>

Avoid useless spaces. Here, the file is still readable without spaces

Copy link
Author

Choose a reason for hiding this comment

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

thanks will removed the spaces and extra lines.

<field name="active" eval="False"/>
</record>
<!-- Enable product categories in the left // View template in: odoo/addons/website_sale/views/templates.xml -->
<!-- Enable product categories in the left // View template in: odoo/addons/website_sale/views/estate_templates.xml -->

Choose a reason for hiding this comment

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

This can be moved to the commit message if you want to explicitly explain your choice

Copy link
Author

Choose a reason for hiding this comment

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

it was a mistake from my end and reverted the changes in this line

Completed till chapter 7 many to one
@vikri-odoo vikri-odoo changed the title [ADD] new addon for real estate onboarding project 19.0 Estate tutorial (VIKRI) Dec 17, 2025
Added new tags model to understand many2many
postcode = fields.Char(string="Postcode")
date_availability = fields.Datetime(string="Date Availability", default=_set_default_start_date(), copy=False)
date_availability = fields.Datetime(
string="Date Availability", default=_set_default_start_date(), copy=False

Choose a reason for hiding this comment

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

Add a trailing coma here so if someone has to add a new parameter on a new line, that person won't have to change your line (and change the git history)

<field name="description">Description 3</field>
<field name="postcode">1040</field>
<field name="date_availability" eval="DateTime.now()" />
<field name="date_availability" eval="DateTime.now()"/>

Choose a reason for hiding this comment

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

date_availability is already pre-defined in your model with your default value

state = fields.Selection(
string="State",
selection=[
("new", "New"),

Choose a reason for hiding this comment

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

Use double quotes (") only for non-technical strings.
Please check all your files

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_type,access.estate.property.type,model_estate_property_type,base.group_user,1,1,1,1
access_estate_property_tags,access.estate.property.tags,model_estate_property_tags,base.group_user,1,1,1,1

Choose a reason for hiding this comment

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

Don't forget Unix conventions on text files' structure based on a line definition (cf. https://peps.python.org/pep-0008/ and https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206)

Check other files too

Comment on lines 3 to 8
<menuitem
id="estate_menu_action"
action="test_model_action"
parent="estate_menu_root"
sequence="1"
/>

Choose a reason for hiding this comment

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

You can keep this on a single line. It's not always easy to know when to write multiple lines but the basic rule is that you try to optimize readability AND number of lines

<?xml version="1.0"?>
<odoo>
<!-- Root menuitem action which will help us to see the default action window-->
<!-- Root menuitem action which will help us to see the default action window-->

Choose a reason for hiding this comment

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

This comment is useless as the majority of the developers will easily know what your code is doing

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