-
Notifications
You must be signed in to change notification settings - Fork 2.5k
First commit - 02_newapp.html #950
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?
Changes from all commits
20ec969
8b0fcbc
c8ccdda
edb6e5b
0f0987f
2743a1e
fa7d593
fbff52d
da0cfeb
54e87a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import models |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed |
||
{ | ||
'name': 'Estate', | ||
'version': '0.0.1', | ||
'category': 'Sales', | ||
'depends': [ | ||
'base', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'data/estate_property_views.xml', | ||
'data/estate_menus.xml', | ||
], | ||
'summary': 'Real Estate Module - Training', | ||
'website': 'https://www.odoo.com/jobs', | ||
'installable': True, | ||
'application': True, | ||
'author': 'Jérémie Parisel', | ||
'license': 'LGPL-3', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<menuitem id="estate_menu_root" name="Real Estate"> | ||
<menuitem id="estate_first_level_menu" name="Adverstissement"> | ||
<menuitem id="estate_model_menu_action" action="estate_model_create"/> | ||
</menuitem> | ||
</menuitem> | ||
</odoo> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing an end of file line here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_model_create" model="ir.actions.act_window"> | ||
|
||
<field name="name">Create new property</field> | ||
<field name="res_model">estate.property</field> | ||
<field name="view_mode">list,form</field> | ||
<field name="help" type="html"> | ||
<p class="o_view_nocontent_smiling_face"> | ||
Create a new real estate good in the database | ||
</p> | ||
</field> | ||
</record> | ||
</odoo> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import estate_property |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||||
from odoo import fields, models | ||||||||
from dateutil import relativedelta | ||||||||
|
||||||||
class EstateProperty(models.Model): | ||||||||
_name = "estate.property" | ||||||||
_description = "Real Estate Properties to sell" | ||||||||
|
||||||||
name = fields.Char(required=True) | ||||||||
active = fields.Boolean('Active', default=True) | ||||||||
state = fields.Selection( | ||||||||
selection =[ | ||||||||
('new', 'New'), | ||||||||
('offer_received','Offer Received'), | ||||||||
('offer_accepted','Offer Accepted'), | ||||||||
('sold','Sold'), | ||||||||
('canceled', 'Cancelled')], | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
required = True, | ||||||||
default = 'new', | ||||||||
copy = False, | ||||||||
) | ||||||||
description = fields.Text() | ||||||||
postcode = fields.Char() | ||||||||
date_availability = fields.Date(default=fields.Date.today() + relativedelta.relativedelta(months=3)) | ||||||||
expected_price = fields.Float(required=True) | ||||||||
selling_price = fields.Float() | ||||||||
bedrooms = fields.Integer('Bedrooms',default=2) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
living_area = fields.Integer() | ||||||||
facades = fields.Integer() | ||||||||
garage = fields.Boolean() | ||||||||
garden = fields.Boolean() | ||||||||
garden_area = fields.Integer() | ||||||||
garden_orientation = fields.Selection( | ||||||||
string='Orientation', | ||||||||
selection=[('north', 'North'), ('south', 'South'),('east', 'East'),('west', 'West')], | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation please, new line for each pair :D |
||||||||
help="Orientation of the garden of the property") |
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,access_estate_property,model_estate_property,base.group_user,1,1,1,1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing an end of file line here |
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 needed