summaryrefslogtreecommitdiff
path: root/dynamic_accounts_report/report/partner_ledger.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
commit1ca3b3df3421961caec3b747a364071c80f5c7da (patch)
tree6778a1f0f3f9b4c6e26d6d87ccde16e24da6c9d6 /dynamic_accounts_report/report/partner_ledger.xml
parentb57188be371d36d96caac4b8d65a40745c0e972c (diff)
initial commit
Diffstat (limited to 'dynamic_accounts_report/report/partner_ledger.xml')
-rw-r--r--dynamic_accounts_report/report/partner_ledger.xml155
1 files changed, 155 insertions, 0 deletions
diff --git a/dynamic_accounts_report/report/partner_ledger.xml b/dynamic_accounts_report/report/partner_ledger.xml
new file mode 100644
index 0000000..fff1ba5
--- /dev/null
+++ b/dynamic_accounts_report/report/partner_ledger.xml
@@ -0,0 +1,155 @@
+<odoo>
+
+ <template id="dynamic_accounts_report.partner_ledger">
+ <t t-call="web.html_container">
+ <t t-set="data_report_margin_top" t-value="12"/>
+ <t t-set="data_report_header_spacing" t-value="9"/>
+ <t t-set="data_report_dpi" t-value="110"/>
+ <t t-call="web.internal_layout">
+ <div class="page">
+ <div class="oe_structure"/>
+ <h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Partner Ledger
+ </h3>
+
+ <span t-if="Filters.get('date_from')">
+ <strong> From:</strong>
+ <t t-esc="Filters['date_from']"/>
+ </span>
+
+ <span t-if="Filters.get('date_to')">
+ <strong>To:</strong>
+ <t t-esc="Filters['date_to']"/>
+ </span>
+
+
+ <div>
+ <div style="text-align:centre;left:50%;" class="row">
+
+ <div class="col-2" style="">
+ <strong>Journals:</strong>
+ <t t-foreach="Filters['journals']" t-as="ps">
+ <li>
+ <t t-esc="ps"/>
+ </li>
+ </t>
+ </div>
+ <div class="col-2">
+ <strong>Accounts:</strong>
+ <t t-foreach="Filters['accounts']" t-as="ps">
+ <li>
+ <t t-esc="ps"/>
+ </li>
+ </t>
+ </div>
+ <div class="col-2">
+ <strong>Partners:</strong>
+ <t t-foreach="Filters['partners']" t-as="ps">
+ <li>
+ <t t-esc="ps"/>
+ </li>
+ </t>
+ </div>
+ <div class="col-2">
+ <strong>Partner Tags:</strong>
+ <t t-foreach="Filters['partner_tags']" t-as="ps">
+ <li>
+ <t t-esc="ps"/>
+ </li>
+ </t>
+ </div>
+ <div class="col-2">
+ <strong>Account Type:</strong>
+ <t t-foreach="Filters['account_type']" t-as="ps">
+ <li>
+ <t t-esc="ps"/>
+ </li>
+ </t>
+ </div>
+ <div class="col-2">
+ <strong>Target move:</strong>
+ <li>
+ <t t-esc="Filters['target_move']"/>
+ </li>
+ </div>
+
+ </div>
+ <div style="text-align:centre;left:50%;" class="row">
+
+ </div>
+
+
+ <br></br>
+ <table class="table table-sm table-reports" style="padding:5px;">
+ <thead>
+ <tr class="text-center">
+ <th style="text-align:left;">Date</th>
+ <th style="text-align:left;">Journal</th>
+ <th style="text-align:left;">Account</th>
+ <th style="text-align:left;">Move</th>
+ <th style="text-align:left;">Entry Label</th>
+ <th style="text-align:right;">Debit</th>
+ <th style="text-align:right;">Credit</th>
+ <th style="text-align:right;">Balance</th>
+ </tr>
+ </thead>
+ <tbody>
+ <t t-foreach="account_data" t-as="account">
+ <tr style="font-weight: bold;">
+ <td colspan="5">
+ <span style="color: white;" t-esc="'..'"/>
+<!-- <span t-esc="account['code']"/>-->
+ <span t-esc="account['name']"/>
+ </td>
+ <td class="text-right">
+ <span t-esc="account['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <td class="text-right">
+ <span t-esc="account['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <td class="text-right">
+ <span t-esc="account['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <td groups="base.group_multi_currency"/>
+ </tr>
+ <tr t-foreach="account['move_lines']" t-as="line">
+ <td><span t-esc="line['ldate']"/></td>
+ <td><span t-esc="line['lcode']"/></td>
+ <td><span t-esc="line['account_name']"/></td>
+<!-- <td><span t-if="line['lref']" t-esc="line['lref']"/></td>-->
+ <td><span t-esc="line['move_name']"/></td>
+ <td><span t-esc="line['lname']"/></td>
+ <td class="text-right">
+ <span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <td class="text-right">
+ <span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <td class="text-right">
+ <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/>
+ </td>
+ <t t-if="line['amount_currency']">
+ <td class="text-right" groups="base.group_multi_currency">
+ <span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
+ <span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/>
+ </td>
+ </t>
+ </tr>
+ </t>
+ </tbody>
+ </table>
+ </div>
+ <br></br>
+ </div>
+ </t>
+ </t>
+ </template>
+
+ <record id="action_print_partner_ledger" model="ir.actions.report">
+ <field name="name">Partner ledger</field>
+ <field name="model">account.partner.ledger</field>
+ <field name="report_type">qweb-pdf</field>
+ <field name="report_name">dynamic_accounts_report.partner_ledger</field>
+ <field name="report_file">dynamic_accounts_report.partner_ledger</field>
+ </record>
+
+</odoo> \ No newline at end of file