diff options
| author | Simon Lejeune <sle@openerp.com> | 2014-04-14 16:44:27 +0200 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2014-04-14 16:44:27 +0200 |
| commit | 28fa8ebb8cb267ca3a30afba81aafb1eb9399894 (patch) | |
| tree | 77f0828a095ca725202c9b4a84645a859240bb1b | |
| parent | 11a0b506d0379378bc551e4b62dd0e6d6b8b674d (diff) | |
[IMP] point of sale: added a session summary report
bzr revid: sle@openerp.com-20140414144427-ry3yxybx385a4pop
| -rw-r--r-- | addons/point_of_sale/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/point_of_sale/point_of_sale_report.xml | 9 | ||||
| -rw-r--r-- | addons/point_of_sale/views/report_sessionsummary.xml | 120 |
3 files changed, 130 insertions, 0 deletions
diff --git a/addons/point_of_sale/__openerp__.py b/addons/point_of_sale/__openerp__.py index 9f3a023f062..ad82c7e05a6 100644 --- a/addons/point_of_sale/__openerp__.py +++ b/addons/point_of_sale/__openerp__.py @@ -77,6 +77,7 @@ Main Features 'views/report_saleslines.xml', 'views/report_detailsofsales.xml', 'views/report_payment.xml', + 'views/report_sessionsummary.xml', ], 'demo': [ 'point_of_sale_demo.xml', diff --git a/addons/point_of_sale/point_of_sale_report.xml b/addons/point_of_sale/point_of_sale_report.xml index a4c1f4648a3..6ae4dbe9c30 100644 --- a/addons/point_of_sale/point_of_sale_report.xml +++ b/addons/point_of_sale/point_of_sale_report.xml @@ -58,5 +58,14 @@ name="point_of_sale.report_payment" file="point_of_sale.report_payment" /> + + <report + id="action_report_pos_session_summary" + string="Session Summary" + model="pos.session" + report_type="qweb-pdf" + name="point_of_sale.report_sessionsummary" + file="point_of_sale.report_sessionsummary" + /> </data> </openerp> diff --git a/addons/point_of_sale/views/report_sessionsummary.xml b/addons/point_of_sale/views/report_sessionsummary.xml new file mode 100644 index 00000000000..705b8bc93d0 --- /dev/null +++ b/addons/point_of_sale/views/report_sessionsummary.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> +<data> +<template id="report_sessionsummary"> + <t t-call="report.html_container"> + <t t-foreach="docs" t-as="o"> + <t t-call="report.internal_layout"> + <div class="page"> + <h2>Session Summary: <span t-field="o.name"/></h2> + + <div class="row mt32 mb32"> + <div class="col-xs-3"> + <strong>Responsible</strong>:<br/> + <span t-field="o.user_id"/> + </div> + <div class="col-xs-3"> + <strong>Point of Sale</strong>:<br/> + <span t-field="o.config_id"/> + </div> + <div class="col-xs-3"> + <strong>Opening Date</strong>:<br/> + <span t-field="o.start_at"/> + </div> + <div class="col-xs-3"> + <strong>Closing Date</strong>:<br/> + <span t-field="o.stop_at"/> + </div> + </div> + + <table class="table table-condensed"> + <thead> + <tr> + <th> + <strong>Reference</strong> + </th> + <th> + <strong>Journal</strong> + </th> + <th class="text-right"> + <strong>Starting Balance</strong> + </th> + <th class="text-right"> + <strong>Total Transactions</strong> + </th> + <th class="text-right"> + <strong>Ending Balance</strong> + </th> + <th class="text-right"> + <strong>Difference</strong> + </th> + <th class="text-right" groups="base.group_multi_currency"> + <strong>Currency</strong> + </th> + <th class="text-right"> + <strong>Status</strong> + </th> + </tr> + </thead> + <tbody> + <t t-foreach="o.statement_ids" t-as="statement"> + <tr> + <td><span t-field="statement.name"/></td> + <td><span t-field="statement.journal_id"/></td> + <td class="text-right"> + <span t-field="statement.balance_start" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + <td class="text-right"> + <span t-field="statement.total_entry_encoding" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + <td class="text-right"> + <span t-field="statement.balance_end_real" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + <td class="text-right"> + <span t-field="statement.difference" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + <td class="text-right" groups="base.group_multi_currency"> + <span t-field="statement.currency" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + <td class="text-right"><span t-field="statement.state"/></td> + </tr> + <t t-foreach="statement.line_ids" t-as="line"> + <tr t-if="line_first"> + <th></th> + <th></th> + <th></th> + <th groups="base.group_multi_currency"></th> + <th>Description</th> + <th>Partner</th> + <th>Type</th> + <th class="text-right">Amount</th> + </tr> + <tr> + <td></td> + <td></td> + <td></td> + <td groups="base.group_multi_currency"></td> + <td><span t-field="line.name"/></td> + <td><span t-field="line.partner_id"/></td> + <td><span t-field="line.type"/></td> + <td class="text-right"> + <span t-field="line.amount" + t-field-options='{"widget": "monetary", "display_currency": "statement.currency"}'/> + </td> + </tr> + </t> + </t> + </tbody> + </table> + </div> + </t> + </t> + </t> +</template> +</data> +</openerp> |
