-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Chapter 1 -5 #1124
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
TudorCalinCS
wants to merge
5
commits into
odoo:19.0
Choose a base branch
from
odoo-dev:19.0-training-tupan
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
Chapter 1 -5 #1124
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
52a1b26
Chapter 1-5
9e89a58
Update estate/models/estate_property.py
TudorCalinCS 4e18bb1
Update estate/__manifest__.py
TudorCalinCS fbb492c
Update estate/__manifest__.py
TudorCalinCS 84cb545
[IMP] estate: added list, form, and search views (CHAPTER 6)
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
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,20 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
|
||
|
|
||
| { | ||
| 'name': "Estate", | ||
| 'depends': [ | ||
| 'base' | ||
| ], | ||
| 'data': [ | ||
| 'data/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_menu.xml', | ||
| 'views/estate_list_view.xml', | ||
| 'views/estate_form_view.xml', | ||
| 'views/estate_search_view.xml', | ||
| ], | ||
| 'installable': True, | ||
| 'application': True | ||
| } |
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,2 @@ | ||
| id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
| estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1 |
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,49 @@ | ||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class EstateProperty(models.Model): | ||
| _name = "estate.property" | ||
| _description = "Estate Property" | ||
|
|
||
| name = fields.Char("Name", required=True) | ||
| description = fields.Text("Description") | ||
| postcode = fields.Char("Postcode") | ||
| date_availability = fields.Date( | ||
| "Date Availability", | ||
| copy=False, | ||
| default=lambda self: fields.Date.add(fields.Date.today(), months=3), | ||
| ) | ||
| expected_price = fields.Float("Expected Price", required=True) | ||
| selling_price = fields.Float("Selling Price", readonly=True, copy=False) | ||
| bedrooms = fields.Integer("Bedrooms", default=2) | ||
| living_area = fields.Integer("Living Area (sqm)") | ||
| facades = fields.Integer("Facades") | ||
| garage = fields.Boolean("Garage") | ||
| garden = fields.Boolean("Garden") | ||
| garden_area = fields.Integer("Garden Area") | ||
| garden_orientation = fields.Selection( | ||
| string="Type", | ||
| selection=[ | ||
| ("north", "North"), | ||
| ("south", "South"), | ||
| ("east", "East"), | ||
| ("west", "West"), | ||
| ], | ||
| ) | ||
| active = fields.Boolean("Active", default=True) | ||
| state = fields.Selection( | ||
| string="State", | ||
| selection=[ | ||
| ("new", "New"), | ||
| ("offer_received", "Offer Received"), | ||
| ("offer_accepted", "Offer Accepted"), | ||
| ("sold", "Sold"), | ||
| ("canceled", "Canceled"), | ||
| ], | ||
| default="new", | ||
| required=True, | ||
| copy=False, | ||
| ) | ||
| _sql_constraints = [ | ||
| ("value", "CHECK(value >= 0)", "The value be negative."), | ||
| ] | ||
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,46 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo> | ||
| <record id="estate_form_view" model="ir.ui.view"> | ||
| <field name="name">estate.form.view</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <form string="Estate Property"> | ||
| <sheet> | ||
| <div class="oe_title"> | ||
| <h1> | ||
| <field name="name" class="oe_inline"/> | ||
| </h1> | ||
| </div> | ||
| <group> | ||
| <group> | ||
| <field name="postcode"/> | ||
| <field name="date_availability"/> | ||
| </group> | ||
| <group> | ||
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
|
|
||
| </group> | ||
| </group> | ||
| <group> | ||
| <notebook> | ||
| <page string="Description"> | ||
| <group> | ||
| <field name="description" string="Description"/> | ||
| <field name="bedrooms" string="Bedrooms"/> | ||
| <field name="living_area" string="Living Area"/> | ||
| <field name="facades" string="Facades"/> | ||
| <field name="garage" string="Garage"/> | ||
| <field name="garden" string="Garden"/> | ||
| <field name="garden_area" string="Garden Area"/> | ||
| <field name="garden_orientation" string="Garden Orientation"/> | ||
| </group> | ||
| </page> | ||
| </notebook> | ||
|
|
||
| </group> | ||
| </sheet> | ||
| </form> | ||
| </field> | ||
| </record> | ||
| </odoo> |
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,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo> | ||
| <record id="estate_list_view" model="ir.ui.view"> | ||
| <field name="name">estate.list.view</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Estate Properties"> | ||
| <field name="name"/> | ||
| <field name="postcode"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area"/> | ||
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
| <field name="date_availability"/> | ||
| </list> | ||
| </field> | ||
| </record> | ||
| </odoo> |
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" encoding="utf-8"?> | ||
| <odoo> | ||
| <menuitem id="estate_property_menu_root" name="Menu Root"> | ||
| <menuitem id="estate_property_first_level_menu" name="First Level"> | ||
| <menuitem id="estate_property_menu_action" action="estate_property_action"/> | ||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> |
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" encoding="utf-8"?> | ||
| <odoo> | ||
| <record id="estate_property_action" model="ir.actions.act_window"> | ||
| <field name="name">Properties</field> | ||
| <field name="res_model">estate.property</field> | ||
| <field name="view_mode">list,form</field> | ||
| </record> | ||
| </odoo> |
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,23 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo> | ||
| <record id="estate_search_view" model="ir.ui.view"> | ||
| <field name="name">estate.search.view</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <search string="Properties Search"> | ||
| <field name="name"/> | ||
| <field name="postcode"/> | ||
| <field name="expected_price"/> | ||
| <field name="bedrooms"/> | ||
| <field name="living_area"/> | ||
| <field name="facades"/> | ||
| <separator/> | ||
|
|
||
| <filter string="Available" name="state" domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/> | ||
| <group> | ||
| <filter string="Postcode" name="group_by_postcode" context="{'group_by': 'postcode'}"/> | ||
| </group> | ||
| </search> | ||
| </field> | ||
| </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.
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.