-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ADD] estate: module with property model and corresponding views. (framework 101) #1082
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?
Conversation
|
Hello, could you please make one commit per chapter and also ensures that the runbot is green 😄 |
|
For you pr message, you don't have to specify all the technical part. The title is what it is done and the message is "why". You should try to explain the functional part of the feature or fix, ... So for instance, Adding a new module estate to better manage properties, ... You can add offers to a property as well as addings tags, ... Something like this. |
lost-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.
I already made a small review.
Be careful with the final new lines, spacing and double quotes vs single quotes 😄
| 'version': '1.0', | ||
| 'category': 'Sales', | ||
| 'sequence': 1, | ||
| 'summary': 'Sell and bid on the hottest real estate properties.', |
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.
You could explain that in your pr message for instance
estate/models/estate_property.py
Outdated
| selection =[('new', 'New'), ('offer_received', 'Offer Received'), ('offer_accepted', 'Offer Accepted'), | ||
| ('sold', 'Sold'), ('canceled', 'Canceled')], |
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.
You can expand this into multiple lines.

/estate/init.py file imports all the models inside models related to estate
/estate/manifest.py file defines the name. version, category, sequence, summary, website link, dependencies, related data (views and access right files) of the "Estate" application.
/estate/models/estate_property.py creates the table "estate.property" with all its attributes:
fields.Charis the title of the posted propertyfields.Selectionis the type of the posted property (office, apartment, house, studio)fields.Charis the postcode where the property is locatedfields.Dateis the date from when the apartment is availablefields.Textis the description of the posted propertyfields.Integeris the number of the bedrooms in the apartmentfields.Integeris the area (in sqm) of the apartmentfields,Many2oneimports the EUR currencyfields.Monetaryis the expected price of the posted apartment in eurosfields.Monetaryis the selling price of the posted apartment in eurosfields.Integeris the number of facades in the posted apartmentfields.Booleanindicates if there's a garage for the apartmentfields.Booleanindicates if there's a garden for the apartmentfields.Integeris the area (in sqm) of the apartment's gardenfields.Selectionis the orientation of the posted property's garden (north, south, east, west)fields.Integeris the total area (in sqm) of the apartmentfields.Selectionis the status of the posted property in regards to offers (new. offer_received, offer_accepted, sold, canceled)fields.Booleanindicates if the posting of the property is still active/estate/models/init.py file imports the estate_property.py table
/estate/models/security/ir.model.access.csv file defines the access rights of the estate_property model
/estate/models/views/estate_menus.xml: defines the top menu in the Estate application which views properties returned from the action
estate_property_action/estate/models/views/estate_property_views.xml:
estate_property_actionwhich retrieves all the properties inside the estate.propety model in list or form views.= search for a property using the fields name, postcode, expected_price, bedrooms. living_area, or facades
= filter the apartments based on the availability state (results will show the apartments where the 'state' field is 'new' or 'offer_received')
= group properties by postcode