-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After this commit: -added properties tab on home page -added property description display cards
- Loading branch information
Showing
9 changed files
with
113 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from . import models | ||
from . import wizard | ||
from . import report | ||
from . import controller |
This file contains 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
This file contains 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 property |
This file contains 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 @@ | ||
from odoo.http import route, Controller, request | ||
|
||
|
||
class PropertyController(Controller): | ||
|
||
@route('/properties', auth='public', website='True') | ||
def handlePropertyPortal(self): | ||
values = { | ||
"properties": request.env['estate.property'].search([]) | ||
} | ||
return request.render('estate.portal_estate_property_list', values) | ||
|
||
@route("/property/<model('estate.property'):prop>", auth='public', website='True') | ||
def handlePropertyDetailPortal(self, prop): | ||
values = { | ||
"property": prop | ||
} | ||
return request.render('estate.portal_estate_property_detail', values) |
This file contains 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,11 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<record id="menu_properties" model="website.menu"> | ||
<field name="name">Properties</field> | ||
<field name="url">/properties</field> | ||
<field name="parent_id" ref="website.main_menu"/> | ||
<field name="sequence" type="int">100</field> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,74 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<template id="portal_estate_property_list" name="All Available Property"> | ||
<t t-call="website.layout"> | ||
<div id="wrap"> | ||
<h1>Properties</h1> | ||
<div class="container"> | ||
<div class="row"> | ||
<t t-foreach="properties" t-as="property"> | ||
<div class="col-md-4 mb-4"> | ||
<div class="card h-100"> | ||
<img src="/estate/static/Description/icon.png" class="card-img-top img-thumbnail" loading="lazy" /> | ||
<div class="card-body"> | ||
<h5 class="card-title"> | ||
<t t-esc="property.name"/> | ||
</h5> | ||
<a t-att-href="'/property/%s' % property.id" class="btn btn-primary">View Property</a> | ||
</div> | ||
<div class="card-footer"> | ||
<small class="text-muted">Price: <t t-esc="property.expected_price"/> | ||
</small> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</template> | ||
|
||
<template id="portal_estate_property_detail" name="Property Detail"> | ||
<t t-call="website.layout"> | ||
<div class="container mt-5"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<h1 class="text-center"> | ||
<t t-esc="property.name"/> | ||
</h1> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<img src="/estate/static/Description/icon.png" class="img-fluid"/> | ||
</div> | ||
<div class="col-md-6"> | ||
<p> | ||
<strong>Price:</strong> | ||
<t t-esc="property.expected_price"/> | ||
</p> | ||
<p> | ||
<strong>Bedrooms:</strong> | ||
<t t-esc="property.bedrooms"/> | ||
</p> | ||
<p> | ||
<strong>Living Area:</strong> | ||
<t t-esc="property.living_area"/> sqm | ||
</p> | ||
<t t-if="property.garden"> | ||
<p> | ||
<strong>Garden Area:</strong> | ||
<t t-esc="property.garden_area"/> sqm | ||
</p> | ||
<p> | ||
<strong>Garden Orientation:</strong> | ||
<t t-esc="property.garden_orientation"/> | ||
</p> | ||
</t> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</template> | ||
</odoo> |