-
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: Add report for the property, salesman, invoice
- Implemented a property offers PDF report using QWeb templates. - Created estate_property_templates.xml to define the report template for - displaying property offers. - Added estate_property_reports.xml for the ir.actions.report to include the report in the module's business logic. - Enhanced the report by adding logic to conditionally handle cases with no offers using t-if and t-else. - Introduced a sub-template to separate the table portion of the offers, promoting code reuse. - Created a new report for res.users to list all the Real Estate Properties for a salesperson, including property offers. - Extended the property report in the estate_account module to include invoice information for sold properties using QWeb inheritance.
- Loading branch information
Showing
6 changed files
with
141 additions
and
35 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
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 |
---|---|---|
@@ -1,2 +1,24 @@ | ||
<odoo> | ||
<record id="report_estate_property" model="ir.actions.report"> | ||
<field name="name">Real Estate Property</field> | ||
<field name="model">estate.property</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.report_property_template</field> | ||
<field name="report_file">estate.report_property_template</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_salesmen_estate_property" model="ir.actions.report"> | ||
<field name="name">Salesman Property</field> | ||
<field name="model">res.users</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="report_name">estate.report_salesmen_property_template</field> | ||
<field name="report_file">estate.report_salesmen_property_template</field> | ||
<field name="print_report_name">'Properties - %s' % (object.name or 'Attendee').replace('/','')</field> | ||
<field name="binding_model_id" ref="base.model_res_users"/> | ||
<field name="binding_type">report</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
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
11 changes: 11 additions & 0 deletions
11
estate_account/report/estate_account_invoice_templates.xml
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 @@ | ||
<odoo> | ||
<template id="estate_property_invoice_template_x" inherit_id="estate.report_property_template"> | ||
<xpath expr="//div[@class='x']" position="after"> | ||
<t t-if="property.state == 'sold'"> | ||
<div class="page"> | ||
<span>!!!Invoice has been already created!!!</span> | ||
</div> | ||
</t> | ||
</xpath> | ||
</template> | ||
</odoo> |