-
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.
[ADD] estate: created reports and added sample data for testing new f…
…eatures (estate): add property offers report and sample data for testing - Created a new report for estate property offers (PDF format) - Added sample data for testing new estate property features - Fixed XML issues related to ir.actions.report and external ID conflicts
- Loading branch information
aneg-odoo
committed
Sep 27, 2024
1 parent
ea4b032
commit fa30f74
Showing
21 changed files
with
197 additions
and
66 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,2 +1,3 @@ | ||
from . import models | ||
from . import demo | ||
from . import data |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ id,name | |
id4,Residential | ||
id1,Commercial | ||
id2,Industrial | ||
id3,Land | ||
id3,Land |
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
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
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
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,26 @@ | ||
<odoo> | ||
<data> | ||
<record id="report_estate_property_offers" model="ir.actions.report"> | ||
<field name="name">Property Offers</field> | ||
<field name="model">estate.property</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.report_property_offers</field> | ||
<field name="report_file">estate.report_property_offers</field> | ||
<field name="print_report_name">'Estate Property - %s' % (object.name or | ||
'Attendee').replace('/','')</field> | ||
<field name="binding_model_id" ref="model_estate_property" /> | ||
<field name="binding_type">report</field> | ||
</record> | ||
<record id="report_user_properties" model="ir.actions.report"> | ||
<field name="name">User Properties</field> | ||
<field name="model">res.users</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.report_user_properties3</field> | ||
<field name="report_file">estate.report_user_properties3</field> | ||
<field name="print_report_name">'Estate Users - %s' % (object.name or | ||
'Attendee').replace('/','')</field> | ||
<field name="binding_model_id" ref="base.model_res_users" /> | ||
<field name="binding_type">report</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<template id="report_property_offers"> | ||
<t t-foreach="docs" t-as="property"> | ||
<t t-call="web.html_container"> | ||
<t t-call="web.external_layout"> | ||
<div class="page"> | ||
<h1> | ||
<strong>Salesman: </strong> | ||
<span t-field="property.sale_id" /> | ||
</h1> | ||
<h2> | ||
<span t-field="property.name" /> | ||
</h2> | ||
<div> | ||
<strong>Expected Price: </strong> | ||
<span t-field="property.expected_price" /> | ||
</div> | ||
<div> | ||
<strong>Status: </strong> | ||
<span t-field="property.status" /> | ||
</div> | ||
<t t-if="property.offer_id"> | ||
<t t-call="estate.report_property_offers_table" /> | ||
</t> | ||
<t t-else=""> | ||
<p>No offers have been made yet !</p> | ||
</t> | ||
</div> | ||
</t> | ||
</t> | ||
</t> | ||
</template> | ||
<template id="report_user_properties3"> | ||
<t t-foreach="docs" t-as="userproperty"> | ||
<t t-call="web.html_container"> | ||
<t t-call="web.external_layout"> | ||
<div class="page"> | ||
<t t-foreach="userproperty.property_ids" t-as="property"> | ||
<h1> | ||
<strong>Salesman: </strong> | ||
<span t-field="property.sale_id" /> | ||
</h1> | ||
<h2> | ||
<span t-field="property.name" /> | ||
</h2> | ||
<div> | ||
<strong>Expected Price: </strong> | ||
<span t-field="property.expected_price" /> | ||
</div> | ||
<div> | ||
<strong>Status: </strong> | ||
<span t-field="property.status" /> | ||
</div> | ||
<t t-if="property.offer_id"> | ||
<t t-call="estate.report_property_offers_table" /> | ||
</t> | ||
<t t-else=""> | ||
<p>No offers have been made yet !</p> | ||
</t> | ||
</t> | ||
</div> | ||
</t> | ||
</t> | ||
</t> | ||
</template> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<odoo> | ||
<template id="report_property_offers_table"> | ||
<t> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Price</th> | ||
<th>Partner</th> | ||
<th>Validitty(days)</th> | ||
<th>Deadline</th> | ||
<th>State</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<t t-set="offers" t-value="property.mapped('offer_id')" /> | ||
<tr t-foreach="offers" t-as="offer"> | ||
<td> | ||
<span t-field="offer.price" /> | ||
</td> | ||
<td> | ||
<span t-field="offer.partner_id" /> | ||
</td> | ||
<td> | ||
<span t-field="offer.validity" /> | ||
</td> | ||
<td> | ||
<span t-field="offer.date_deadline" /> | ||
</td> | ||
<td> | ||
<span t-field="offer.status" /> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</t> | ||
</template> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
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 | ||
estate.access_estate_property_type,access_estate_property_type,estate.model_estate_property_type,base.group_user,1,1,1,1 | ||
estate.access_estate_property_tag,access_estate_property_tag,estate.model_estate_property_tag,base.group_user,1,1,1,1 | ||
estate.access_estate_property_offer,access_estate_property_offer,estate.model_estate_property_offer,base.group_user,1,1,1,1 | ||
estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,0,0,0 | ||
estate.access_estate_property_type,access_estate_property_type,estate.model_estate_property_type,base.group_user,1,0,0,0 | ||
estate.access_estate_property_tag,access_estate_property_tag,estate.model_estate_property_tag,base.group_user,1,0,0,0 | ||
estate.access_estate_property_offer,access_estate_property_offer,estate.model_estate_property_offer,base.group_user,1,0,0,0 | ||
estate.access_estate_property_manager,access_estate_property_manager,estate.model_estate_property,estate_group_manager,1,1,1,1 | ||
estate.access_estate_property_type_manager,access_estate_property_type_manager,estate.model_estate_property_type,estate_group_manager,1,1,1,1 | ||
estate.access_estate_property_tag_manager,access_estate_property_tag_manager,estate.model_estate_property_tag,estate_group_manager,1,1,1,1 | ||
estate.access_estate_property_offer_manager,access_estate_property_offer_manager,estate.model_estate_property_offer,estate_group_manager,1,1,1,1 | ||
estate.access_estate_property_agent,access_estate_property_agent,estate.model_estate_property,estate_group_user,1,1,1,0 | ||
estate.access_estate_property_type_agent,access_estate_property_type_agent,estate.model_estate_property_type,estate_group_user,1,0,0,0 | ||
estate.access_estate_property_tag_agent,access_estate_property_tag_agent,estate.model_estate_property_tag,estate_group_user,1,0,0,0 | ||
|
||
|
||
|
||
|
||
|
||
|
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,15 @@ | ||
<odoo> | ||
<record id="estate_group_user" model="res.groups"> | ||
<field name="name">Agent</field> | ||
<field name="category_id" ref="base.module_category_real_estate_brokerage" /> | ||
<field name="comment">The agents can manage the properties under their care, or properties | ||
which are not specifically under the care of any agent.</field> | ||
</record> | ||
<record id="estate_group_manager" model="res.groups"> | ||
<field name="name">Manager</field> | ||
<field name="category_id" ref="base.module_category_real_estate_brokerage" /> | ||
<field name="implied_ids" eval="[(4, ref('estate_group_user'))]" /> | ||
<field name="comment">The managers can configure the system (manage available types and | ||
tags) as well as oversee every property in the pipeline..</field> | ||
</record> | ||
</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
Oops, something went wrong.