-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[ADD] Estate: init #1028
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
Open
haall-odoo
wants to merge
34
commits into
odoo:19.0
Choose a base branch
from
odoo-dev:19.0-tutorial-haall
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ADD] Estate: init #1028
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
c408da5
[ADD] Estate: init
haall-odoo a946449
[IMP] estate: chapter 3
haall-odoo 6deb7a6
[FIX] estate: CI PEP8 conformity for EoF
haall-odoo e429205
[FIX] estate: PEP8 conformity\nestate_property.py whitespace in blank…
haall-odoo ffb822c
[IMP] estate: Chapter 4
haall-odoo c71e880
[FIX] estate: fix whitespace in blank line
haall-odoo e01993f
[FIX] estate: license fix
haall-odoo de4a315
[IMP] estate: Chapter 5
haall-odoo de78e31
[IMP] Estate: Chapter 5 Sec 1
haall-odoo adb3316
[IMP] Estate: Chapter 6
haall-odoo e66dd36
[FIX] estate: review 1
haall-odoo 55064b2
[FIX] estate: review fix 2 + chapter 7 part 1
haall-odoo 218b8f0
[IMP] estate: chapter 7
haall-odoo ff73e1b
[FIX] estate: PEP8 fix
haall-odoo 871dc8d
[IMP] estate: add computed field for total_area and best_price
haall-odoo 6407935
[IMP] estate: chapter 8 reversed field
haall-odoo 0b791ab
[FIX] gitignore: ignore vscode config
haall-odoo b5fc120
[IMP] estate: chapter 8
haall-odoo ac39bed
[FIX] estate: estate_property.py - EOL
haall-odoo ee8a1be
[IMP] estate: chapter 9
haall-odoo 0faad12
[FIX] estate: chapter 9
haall-odoo be0cfdf
[IMP] estate: chapter 10
haall-odoo 75b4558
[FIX] estate: inline comments spacing in estate_property_odder.py
haall-odoo d76827d
[FIX] estate: PEP8 correction estate_property_tag.py
haall-odoo 88cd366
[FIX] estate: bypass constraint modification
haall-odoo 70eb50e
[IMP] estate: add a ondelete decorator to reset the selling price
haall-odoo bcbe15d
[IMP] estate: chapter 11 part 1
haall-odoo 73aacdc
[IMP] estate: chapter 11 part 2
haall-odoo 5f60173
[FIX] estate: whitespace in blank line in estate_property.py
haall-odoo cd5b754
[IMP] estate: chapter 11 color picker part
haall-odoo c8cb661
[IMP] estate: chapter 11 part 3
haall-odoo 6f106c1
[FIX] estate: PEP8 fix in estate_property_offer.py
haall-odoo 3607166
[IMP] estate: chapter 11 end
haall-odoo 09fdf45
[FIX] estate: estate.property.offer stored -> store
haall-odoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| 'name': 'Estate', | ||
| 'version': '0.0', | ||
| 'depends': ['base'], | ||
| 'author': 'haall-odoo', | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 'application': True, | ||
| 'installable': True, | ||
| 'category': '', | ||
| 'description': '', | ||
| 'license': 'GPL-3', | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_menus.xml' | ||
| ] | ||
| } | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import estate_property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import datetime as dt | ||
|
|
||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): | ||
| _name = "estate.property" | ||
| _description = "An awesome estate module" | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| name = fields.Char(required=True) | ||
| description = fields.Text() | ||
| postcode = fields.Char() | ||
| date_availability = fields.Date(copy=False, default=dt.datetime.today() + dt.timedelta(days=90)) | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| expected_price = fields.Float(required=True) | ||
| selling_price = fields.Float(readonly=True, copy=False) | ||
| bedrooms = fields.Integer(default=2) | ||
| 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'), ('west', 'West'), ('south', 'South'), ('east', 'East')], | ||
| help="Choose the appropriate orientation of the garden" | ||
| ) | ||
| active = fields.Boolean(default=True) | ||
| state = fields.Selection( | ||
| string="Estate status", | ||
| selection=[('new', 'New'), ('offer received', 'Offer Received'), ('offer accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')], | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| help='This field explain the estate status.', | ||
| required=True, | ||
| copy=False, | ||
| default='new' | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink | ||
| access_estate_model,estate_property,model_estate_property,base.group_user,1,1,1,1 | ||
| portal_access_estate_model,estate_property,model_estate_property,base.group_portal,1,0,0,0 | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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="Estate"> | ||
| <menuitem id="estate_first_level_menu" name="Advertisements"> | ||
| <menuitem id="estate_model_menu_action" action="estate_model_action"/> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <?xml version="1.0"?> | ||
| <odoo> | ||
| <record id="estate_property_view_tree" model="ir.ui.view"> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="name">estate.property.name</field> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Channel"> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="name" string="Title"/> | ||
| <field name="postcode"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area" string="Living Area (sqm)"/> | ||
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
| <field name="date_availability" string="Available From"/> | ||
| </list> | ||
| </field> | ||
| </record> | ||
|
|
||
| <record id="estate_property_form_view" model="ir.ui.view"> | ||
| <field name="name">estate.property.name</field> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <form string="My new house"> | ||
| <sheet> | ||
| <group> | ||
| <h1><field name="name" string="" placeholder="My new house"/></h1> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </group> | ||
| <group> | ||
| <group> | ||
| <field name="postcode" default="1000"/> | ||
| <field name="date_availability" string="Available From"/> | ||
| </group> | ||
| <group> | ||
| <field name="expected_price" default="150000"/> | ||
| <field name="selling_price"/> | ||
| </group> | ||
| </group> | ||
| <notebook> | ||
| <page string="Description"> | ||
| <group> | ||
| <field name="description" help="When duplicated, status and date are not copied"/> | ||
| <field name="bedrooms" default="4"/> | ||
| <field name="living_area" string="Living Area (sqm)"/> | ||
| <field name="facades" default="4"/> | ||
| <field name="garage"/> | ||
| <field name="garden" default="True"/> | ||
| <field name="garden_area" string="Garden Area (sqm)"/> | ||
| <field name="garden_orientation"/> | ||
| </group> | ||
| </page> | ||
| </notebook> | ||
| </sheet> | ||
| </form> | ||
| </field> | ||
| </record> | ||
|
|
||
| <record id="estate_property_search_view" model="ir.ui.view"> | ||
| <field name="name">estate.property.name</field> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <search string="TestSearch"> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <field name="name" string="Title"/> | ||
| <field name="postcode"/> | ||
| <field name="expected_price"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area" string="Living Area (sqm)"/> | ||
| <field name="facades"/> | ||
| <separator/> | ||
| <filter name="Available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offer received')]"/> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <filter name="Postcode" context="{'group_by': 'postcode'}"/> | ||
| </search> | ||
| </field> | ||
| </record> | ||
|
|
||
| <record id="estate_model_action" model="ir.actions.act_window"> | ||
| <field name="name">Properties</field> | ||
| <field name="res_model">estate.property</field> | ||
| <field name="view_mode">list</field> | ||
haall-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </record> | ||
| </odoo> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.