Skip to content

[ADD] estate: Chapters 1-11 #873

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

Open
wants to merge 9 commits into
base: 18.0
Choose a base branch
from

Conversation

jekia2000
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Jul 24, 2025

Pull request status dashboard

Copy link

@Megaaaaaa Megaaaaaa left a comment

Choose a reason for hiding this comment

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

Hello 👋

First of all, good job until now, here's a first review for you 😄

There's quite a lot of stuff but don't worry about it, it's a lot of the same details that repeat themselves.

I have commented on a few things that have been flagged by the runbot but not all of them so first things first once you decide to apply the changes I asked you should be to check the runbot ci/style and look at the errors it raises.

Then you can go through all my comments and apply what I suggested or bring your own alternative. Keep in mind that a review is not the utlimate solution, it's only someone seeing things he would have done differently and offering his alternative. You're always free to answer with an other alternative or even say you disagree and bring your arguments.

What I would suggest you do and continue to do while you're not the most comfortable with odoo's structure is to not apply all the changes at once. For example, changing a model's _name has a lot of impact and if you change everything at once, you will probably have a lot of errors when running you database. Splitting the review in multiple steps and trying to run your db in between those can save you a lot of time in the long run.

Also a quick tip for the methodology when applying reviews changes: What I like to do it put a reaction like a thumbsup on a message once I have made the change locally. Then when everything is marked with something, I push, go through my diff and mark as resolved the things that are now outdated so nothing is left forgotten.

If you have any question, don't hesitate to ask them!

@@ -0,0 +1 @@
from . import models

Choose a reason for hiding this comment

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

For multiple reasons, the main one being that we always want to keep the changes history as clean as possible, we always end files with a blank line so that if someone edits your file and add a line at the end, it doesn't modify your last line to add the line break character.

Suggested change
from . import models
from . import models

Comment on lines 1 to 17
{
'name': "estate",
'depends':['base'],
'application': True,
'data':['security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_property_tag_views.xml',
'views/estate_property_offer_views.xml',
'views/estate_property_type_views.xml',
'views/estate_property_menus.xml',
'views/inherited_model_view.xml'


]


}

Choose a reason for hiding this comment

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

Indentation is super important for readability so we always indent files in a pythonish way even in file types that don't require it.

Suggested change
{
'name': "estate",
'depends':['base'],
'application': True,
'data':['security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_property_tag_views.xml',
'views/estate_property_offer_views.xml',
'views/estate_property_type_views.xml',
'views/estate_property_menus.xml',
'views/inherited_model_view.xml'
]
}
{
'name': "estate",
'depends':['base'],
'application': True,
'data':[
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_property_tag_views.xml',
'views/estate_property_offer_views.xml',
'views/estate_property_type_views.xml',
'views/estate_property_menus.xml',
'views/inherited_model_view.xml'
]
}

@@ -0,0 +1 @@
from . import estate_property, estate_property_type, estate_property_tag, estate_property_offer, inherited_model

Choose a reason for hiding this comment

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

Missing EOL (End Of Line character (empty last line at the end of your file))

Comment on lines 1 to 3
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_compare, float_is_zero

Choose a reason for hiding this comment

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

The guidelines for the imports notably asks to sort all import (sources and imported elements alphabtically) so:

Suggested change
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_compare, float_is_zero
from odoo import api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_compare, float_is_zero

from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_compare, float_is_zero

Choose a reason for hiding this comment

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

The runbot ci/style probably says that but we always have two blank lines between the imports and the models

Suggested change

@@ -0,0 +1,72 @@
<?xml version="1.0"?>

Choose a reason for hiding this comment

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

Lots of blank lines that shouldn't be here in this file. 😄



<record id="estate_property_tag_list_view" model="ir.ui.view">
<field name="name">List View</field>

Choose a reason for hiding this comment

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

A more explicit name ?

Copy link
Author

Choose a reason for hiding this comment

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

I changed it to Property Tags List View

Comment on lines 7 to 9
<field name="context">
{'search_default_Available': True}
</field>

Choose a reason for hiding this comment

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

You don't need to put this field on multiple lines but if you do, one more indent when opening a group.

Suggested change
<field name="context">
{'search_default_Available': True}
</field>
<field name="context">
{'search_default_Available': True}
</field>

or keep it simple

Suggested change
<field name="context">
{'search_default_Available': True}
</field>
<field name="context">{'search_default_Available': True}</field>

</record>


</odoo>

Choose a reason for hiding this comment

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

Missing EOL

</xpath>
</field>
</record>
</odoo>

Choose a reason for hiding this comment

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

Missing EOL

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