-
Notifications
You must be signed in to change notification settings - Fork 2.6k
FRBIN Onboarding #992
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
frbin-odoo
wants to merge
23
commits into
odoo:19.0
Choose a base branch
from
odoo-dev:19.0-onboarding-frbin
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
FRBIN Onboarding #992
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
948a0a3
[ADD] estate: create module
frbin-odoo 100a04e
[IMP] estate: model base
frbin-odoo 2e5e338
[IMP] estate: Chapter 4
frbin-odoo 4de5a95
[IMP] estate: Chapter 5
frbin-odoo ffe3d56
[FIX] estate: remove unused imports
frbin-odoo 1c45ce8
[IMP] estate: Chapter 6 views
frbin-odoo 7f7a9ab
[FIX] estate: fix xml validation error
frbin-odoo d92562a
[IMP] estate: Chapter 6 relational models
frbin-odoo 89ae215
[IMP] estate: Add notes.
Mathilde411 e7eadbb
[IMP] estate: Chapter 8 computed fields, refactoring
frbin-odoo 9d35336
[FIX] estate: fix formatting
frbin-odoo 0c8fd0c
[FIX] estate: fix names
frbin-odoo abf4667
[IMP] estate: Chapter 9
frbin-odoo a290df1
[IMP] estate: Chapter 10 Constraints
frbin-odoo 91b0e80
[IMP] estate: Chapter 11
frbin-odoo e321e97
[FIX] estate: reorder manifest
frbin-odoo 9c5e421
[FIX] estate: comment invisible field
frbin-odoo c03051f
[IMP] estate: Chapter 12
frbin-odoo 1033795
[FIX] estate: formatting
frbin-odoo 6a39e63
[FIX] estate: out of bounds check
frbin-odoo 8375c82
[IMP] estate: Chapter 13
frbin-odoo 96b1f52
[FIX] estate: PR feedback
frbin-odoo 28661ae
[FIX] estate: formatting
frbin-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,18 @@ | ||
{ | ||
'name': "Estate", | ||
'version': '1.0', | ||
'depends': ['base'], | ||
'author': "frbin", | ||
'category': 'Tutorials', | ||
'description': "Soon to be the best module ever", | ||
'application': True, | ||
'license': 'LGPL-3', | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/estate_property_type_views.xml', | ||
'views/estate_property_tag_views.xml', | ||
'views/estate_property_offer_views.xml', | ||
'views/estate_property_views.xml', | ||
'views/estate_menu_views.xml', | ||
], | ||
} |
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,4 @@ | ||
from . import estate_property | ||
from . import estate_property_tag | ||
from . import estate_property_offer | ||
from . import estate_property_type |
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,44 @@ | ||
from datetime import date | ||
|
||
from dateutil.relativedelta import relativedelta | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class EstateProperty(models.Model): | ||
_name = 'estate.property' | ||
_description = 'Real Estate Property' | ||
|
||
name = fields.Char('Property Name', required=True) | ||
description = fields.Text() | ||
type_id = fields.Many2one('estate.property.type', 'Property Type') | ||
notes = fields.Html() | ||
active = fields.Boolean(default=True) | ||
|
||
tag_ids = fields.Many2many("estate.property.tag", string="Tags") | ||
offer_ids = fields.One2many('estate.property.offer', 'property_id', string="Offers") | ||
buyer_id = fields.Many2one("res.partner", string="Buyer") | ||
salesperson_id = fields.Many2one("res.users", string="Salesman", default=lambda self: self.env.user) | ||
date_available = fields.Datetime( | ||
"Available From", | ||
copy=False, | ||
default=date.today() + relativedelta(months=3), | ||
) | ||
postcode = fields.Char() | ||
expected_price = fields.Float() | ||
selling_price = fields.Float(readonly=True, copy=False) | ||
bedrooms = fields.Integer(default=2) | ||
living_area = fields.Integer("Living Area (sqm)") | ||
facades = fields.Integer() | ||
garage = fields.Boolean() | ||
garden = fields.Boolean() | ||
garden_area = fields.Integer() | ||
garden_orientation = fields.Selection( | ||
selection=[('north', 'North'), ('east', 'East'), ('south', 'South'), ('west', 'West')], | ||
) | ||
state = fields.Selection( | ||
selection=[('new', 'New'), ('offer_received', 'Offer Received'), ('offer_accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')], | ||
required=True, | ||
default='new', | ||
copy=False | ||
) |
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,15 @@ | ||
from odoo import models, fields | ||
|
||
|
||
class EstatePropertyOffer(models.Model): | ||
_name = 'estate.property.offer' | ||
_description = 'Property Offer' | ||
|
||
price = fields.Float(required=True) | ||
status = fields.Selection( | ||
selection=[('accepted', 'Accepted'), ('refused', 'Refused'), ('pending', 'Pending')], | ||
default='pending', | ||
) | ||
|
||
partner_id = fields.Many2one('res.partner', string="Partner") | ||
property_id = fields.Many2one('estate.property', string="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,8 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class EstatePropertyTag(models.Model): | ||
_name = "estate.property.tag" | ||
_description = "Property Tag" | ||
|
||
name = fields.Char(required=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,8 @@ | ||
from odoo import models, fields | ||
|
||
|
||
class EstatePropertyType(models.Model): | ||
_name = 'estate.property.type' | ||
_description = 'Property Type' | ||
|
||
name = fields.Char(required=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,5 @@ | ||
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 | ||
access_estate_property_type,estate.property.type,model_estate_property_type,base.group_user,1,1,1,1 | ||
access_estate_property_tag,estate.property.tag,model_estate_property_tag,base.group_user,1,1,1,1 | ||
access_estate_property_offer,estate.property.offer,model_estate_property_offer,base.group_user,1,1,1,1 | ||
frbin-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,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<menuitem | ||
id="estate_menu_root" | ||
name="Estate"> | ||
</menuitem> | ||
<!-- Properties menu --> | ||
<menuitem | ||
id="estate_first_level_menu" | ||
name="Properties" | ||
parent="estate_menu_root"/> | ||
frbin-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
<menuitem | ||
id="estate_property_menu_action" | ||
action="estate_property_action" | ||
parent="estate_first_level_menu"/> | ||
|
||
<!-- Settings menu --> | ||
<menuitem | ||
id="estate_settings_menu" | ||
name="Settings" | ||
parent="estate_menu_root"/> | ||
|
||
<menuitem | ||
id="estate_property_type_menu_action" | ||
action="estate_property_type_action" | ||
parent="estate_settings_menu"/> | ||
<menuitem | ||
id="estate_property_tag_menu_action" | ||
action="estate_property_tag_action" | ||
parent="estate_settings_menu"/> | ||
|
||
</odoo> | ||
frbin-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,36 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_property_offer_list" model="ir.ui.view"> | ||
<field name="name">estate.property.offer.list</field> | ||
<field name="model">estate.property.offer</field> | ||
<field name="arch" type="xml"> | ||
<list string="Offers"> | ||
<field name="price"/> | ||
<field name="status"/> | ||
<field name="partner_id"/> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_offer_form" model="ir.ui.view"> | ||
<field name="name">estate.property.offer.form</field> | ||
<field name="model">estate.property.offer</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<group> | ||
<field name="price"/> | ||
<field name="status"/> | ||
<field name="partner_id"/> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_offer_action" model="ir.actions.act_window"> | ||
<field name="name">Offers</field> | ||
<field name="res_model">estate.property.offer</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> | ||
frbin-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> | ||
<record id="estate_property_tag_action" model="ir.actions.act_window"> | ||
<field name="name">Property Tags</field> | ||
<field name="res_model">estate.property.tag</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> | ||
frbin-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> | ||
<record id="estate_property_type_action" model="ir.actions.act_window"> | ||
<field name="name">Property Types</field> | ||
<field name="res_model">estate.property.type</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> | ||
frbin-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,96 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<record id="estate_property_list" model="ir.ui.view"> | ||
<field name="name">estate.property.list</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<list string="Estates" edit="false"> | ||
frbin-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<field name="name"/> | ||
<field name="postcode"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="expected_price"/> | ||
<field name="selling_price"/> | ||
<field name="date_available"/> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_form" model="ir.ui.view"> | ||
<field name="name">estate.property.form</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<div class="oe_title"> | ||
<h1 class="mb32"> | ||
<field name="name" class="mb16" placeholder="Name..." required="True"/> | ||
frbin-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
</h1> | ||
</div> | ||
<group> | ||
<group> | ||
<field name="postcode" string="Postcode"/> | ||
<field name="date_available"/> | ||
<field name="state"/> | ||
<field name="tag_ids" widget="many2many_tags"/> | ||
</group> | ||
<group> | ||
<field name="type_id"/> | ||
<field name="expected_price"/> | ||
<field name="selling_price"/> | ||
</group> | ||
</group> | ||
<notebook> | ||
<page string="Description"> | ||
<group> | ||
<field name="description"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="facades"/> | ||
<field name="garage"/> | ||
<field name="garden"/> | ||
<field name="garden_area"/> | ||
<field name="garden_orientation"/> | ||
</group> | ||
</page> | ||
<page string="Offers"> | ||
<field name="offer_ids"/> | ||
</page> | ||
<page string="Other info"> | ||
<group> | ||
<field name="salesperson_id"/> | ||
frbin-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<field name="buyer_id"/> | ||
</group> | ||
</page> | ||
<page name="notes" string="Notes"> | ||
<field name="notes"/> | ||
</page> | ||
</notebook> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="estate_property_search" model="ir.ui.view"> | ||
<field name="name">estate.property.search</field> | ||
<field name="model">estate.property</field> | ||
<field name="arch" type="xml"> | ||
<search string="Test"> | ||
<field name="name"/> | ||
<field name="postcode"/> | ||
<field name="expected_price"/> | ||
<field name="bedrooms"/> | ||
<field name="living_area"/> | ||
<field name="facades"/> | ||
<filter string="Available 2" name="state" domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/> | ||
frbin-odoo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<filter string="Postcode" name="postcode_group_by" context="{'group_by': 'postcode'}"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<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> | ||
|
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.