Skip to content

Conversation

@dianv-odoo
Copy link

Dilya Anvarbekova - Chapter 2 of the Server Framework 101 tutorial. Created the real estate module.

@dianv-odoo dianv-odoo requested a review from artn-odoo January 19, 2026 14:30
@robodoo
Copy link

robodoo commented Jan 19, 2026

Pull request status dashboard

Copy link

@artn-odoo artn-odoo left a comment

Choose a reason for hiding this comment

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

Nice job so far !
Just a few styling nitpicks, the rest is good overall
We have pretty strict guidelines when it comes to commit names and messages, you can find them here https://www.odoo.com/documentation/16.0/contributing/development/git_guidelines.html
Also, we try to always put an empty line at the end of every file. If you are using vscode, this can be done automatically by activating the Insert Final Newline option.

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-

Choose a reason for hiding this comment

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

This is not mandatory anymore in newer Odoo versions

Suggested change
# -*- coding: utf-8 -*-

Comment on lines +2 to +4

class EstateProperty(models.Model):

Choose a reason for hiding this comment

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

We try to always put 2 newlines before a class definition

Suggested change
class EstateProperty(models.Model):
class EstateProperty(models.Model):

@dianv-odoo dianv-odoo changed the title [TUTORIAL] estate: Created the estate module for Ch2 of the tutorial. [ADD] estate: add estate model for tutorials Jan 21, 2026
- created init and manifest files
- added the name and dependencies
- create the estate property model
- add fields and attributes
- created access.csv file
- defined the read/write permissions to be able to access the model
@dianv-odoo dianv-odoo force-pushed the 19.0-tutorial-ch2-dianv branch from e1cc4ea to 4e859ee Compare January 21, 2026 13:00
Copy link

@artn-odoo artn-odoo left a comment

Choose a reason for hiding this comment

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

Good job looking good !

@@ -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 to put a newline at the end of the file! The option that does it automatically is only triggered once you save the file, so if you didn't touch this file since activating the option, it wasn't added

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, can't believe I missed that one

_description = 'Estate Property Tag Information'

name = fields.Char(string='Tag Name', required=True)

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.

Seems like this line contains some whitespaces, so it wasn't counted as a newline

- created menus to see the fields of the model
- added the list view with several fields
- edited the form view to have two columns and a "Description" tab
- added a search view with search fields, filter for available properties, and group properties by postcode.
- fixed style: added newline at the end of files and two lines before class definition
Chapter 7 of the Server 101 tutorial on model relationships.
- Added a model for property types and added buyers and salesmen to the estate property model to showcase many2one relationships
- Added tags to showcase many2many relationships
- Added a model for offers to showcase one2many relationships
- Created list and form views for the models and added fields to the property model
- added computed fields to calculate total area and best offer price
- added a compute function to calculate the deadline from the number of validity days
- added an inverse function to determine the validity in days from the deadline
- added onchange function to adjust the garden area and orientation based on whether the garden option is set
@dianv-odoo dianv-odoo force-pushed the 19.0-tutorial-ch2-dianv branch from ebe7950 to 95d3d2a Compare January 21, 2026 13:19
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