Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
8 changes: 8 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
'name': 'estate',
'depends': [
'base'
],
'application': True,
'installable': True,
}
Empty file added estate/data/.gitkeep

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it's best not to push .gitkee, pycache, ...

Empty file.
1 change: 1 addition & 0 deletions estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import estate_property

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We try to always have an empty line at the end of every file.
You can use the Ruff extension with the config from https://runbot211.odoo.com/runbot/static/build/125366383-19-0/logs/ruff_config.txt to have warning about style inside your editor.
Disable auto formatting on save as we try to reduce the quantity of diff when editing file made by someone else
You can also check the ci/style from the runbot (https://runbot.odoo.com/runbot/bundle/190-tuto-surap-512658) to check what it says.

24 changes: 24 additions & 0 deletions estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from odoo import fields, models


class EstateProperty(models.Model):
_name: str = "estate.property"

_description: str | None = None
name: fields.Char = fields.Char()
description: fields.Text = fields.Text()
postcode: fields.Char = fields.Char()
date_availability: fields.Date = fields.Date('Creation Date')
expected_price: fields.Float = fields.Float()
selling_price: fields.Float = fields.Float()
bedroom: fields.Integer = fields.Integer()
living_area: fields.Integer = fields.Integer()
facades: fields.Integer = fields.Integer()
garden: fields.Boolean = fields.Boolean()
garden_area: fields.Integer = fields.Integer()
garage: fields.Boolean = fields.Boolean()
garden_orientation: fields.Selection = fields.Selection(
selection=[("north", "North"), ("south", "South"), ("east", "East"), ("west", "West")],
string='Type',
help="Type is used to separate Leads and Opportunities",
)
2 changes: 2 additions & 0 deletions estate/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,estate.property,model_estate_property,base.group_user,1,1,1,1