-
Notifications
You must be signed in to change notification settings - Fork 2.9k
First try #1130
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
base: 19.0
Are you sure you want to change the base?
First try #1130
Conversation
artn-odoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far !
All there is to say are small styling nitpicks, but the tests won't pass if they are not fixed.
We try to always leave an empty line at the end of a file, if you are using vscode, this can be done automatically by checking the Insert Final Newline option.
We also have pretty strict guidelines for the commit name and definition, which can be found here. https://www.odoo.com/documentation/16.0/contributing/development/git_guidelines.html
artn-odoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good nice one !
When you have time, a good exercise would be to try to rebase your branch to change the first commits' name to follow the guidelines.
| }, | ||
| 'license': 'AGPL-3' | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blank line seems unnecessary
estate/__init__.py
Outdated
| @@ -0,0 +1 @@ | |||
| from . import models No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to add an empty line at the end of the file ! The automatic option is only triggered when saving the file, so if you activated it and never changed this file again it won't be affected
estate/models/estate_property.py
Outdated
| name = fields.Char( | ||
| required=True | ||
| ) | ||
| description = fields.Text() | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date( | ||
| copy=False, | ||
| default=lambda self: fields.Date.context_today(self) + relativedelta(months=3), | ||
| ) | ||
| expected_price = fields.Float( | ||
| required=True, | ||
| ) | ||
| selling_price = fields.Float( | ||
| readonly=True, | ||
| copy=False | ||
| ) | ||
| bedrooms = fields.Integer( | ||
| default=2, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the field definition line is not too long, we prefer to leave it as a single line
| name = fields.Char( | |
| required=True | |
| ) | |
| description = fields.Text() | |
| postcode = fields.Char() | |
| date_availability = fields.Date( | |
| copy=False, | |
| default=lambda self: fields.Date.context_today(self) + relativedelta(months=3), | |
| ) | |
| expected_price = fields.Float( | |
| required=True, | |
| ) | |
| selling_price = fields.Float( | |
| readonly=True, | |
| copy=False | |
| ) | |
| bedrooms = fields.Integer( | |
| default=2, | |
| ) | |
| name = fields.Char(required=True) | |
| description = fields.Text() | |
| postcode = fields.Char() | |
| date_availability = fields.Date( | |
| copy=False, | |
| default=lambda self: fields.Date.context_today(self) + relativedelta(months=3), | |
| ) | |
| expected_price = fields.Float(required=True) | |
| selling_price = fields.Float(readonly=True, copy=False) | |
| bedrooms = fields.Integer(default=2) |
estate/models/estate_property.py
Outdated
| active = fields.Boolean( | ||
| default=True | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and if you need to leave it as multiple lines, try to close the bracket at the same level it started
| active = fields.Boolean( | |
| default=True | |
| ) | |
| active = fields.Boolean( | |
| default=True | |
| ) |
But this is just an example, in this case you can also write it in one line
| # -*- coding: utf-8 -*- | ||
| { | ||
| 'name': "Awesome Clicker", | ||
| 'name': 'Awesome Clicker', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it was necessary to change this, we try not to change code for aestetic reasons once it has been merged, as it makes it harder to get the git blame to see who wrote it and find the commit that introduced the line.
Co-authored-by: Arthur Nanson <[email protected]>
Co-authored-by: Arthur Nanson <[email protected]>
This addition will allow to make the newly created model usable through the Odoo frontend and to validate access rights and views integration.
This commit enhances the estate.property model by introducing reserved fields and field attributes required in the UI.
The default auto-generated views are not suitable for real usage. This change provides a clearer and more efficient UI for users by presenting the key information in a structured way and enabling faster retrieval of relevant properties via dedicated search options.
This addition will allow to have categories of types and tags for a property and track all the offers made for a specific property
07ceaa0 to
ed9fb0b
Compare
Onchange on validity and deadline will allow consistency between the two and the calculation of best price will simplify the procedure to user.
Now it is possible to have a flow for the events makeing an interaction between the property and the offer.

No description provided.