-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] sale_commission_product_criteria: print comm value on report
- Loading branch information
Showing
4 changed files
with
50 additions
and
7 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
33 changes: 33 additions & 0 deletions
33
sale_commission_product_criteria/reports/report_settlement_template.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,33 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<template id="report_settlement" inherit_id="sale_commission.report_settlement"> | ||
<xpath expr="//table/thead/tr/th[last()]" position="before"> | ||
<t | ||
t-set="show_value_column" | ||
t-value="any(l.agent_line.applied_commission_item_id for l in o.line_ids)" | ||
/> | ||
<t t-if="show_value_column"> | ||
<th>Value</th> | ||
</t> | ||
</xpath> | ||
<xpath expr="//table/tbody/tr/td[last()]" position="before"> | ||
<t t-if="show_value_column"> | ||
<td> | ||
<t | ||
t-set="comm_item" | ||
t-value="l.agent_line.applied_commission_item_id" | ||
/> | ||
<t t-if="comm_item.commission_type == 'fixed'"> | ||
<span | ||
t-field="comm_item.fixed_amount" | ||
t-options="{'widget': 'monetary', 'display_currency': o.currency_id}" | ||
/> | ||
</t> | ||
<t t-elif="comm_item.commission_type == 'percentage'"> | ||
<span t-field="comm_item.percent_amount" />% | ||
</t> | ||
</td> | ||
</t> | ||
</xpath> | ||
</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