Skip to content

Commit

Permalink
Merge 48f7394 into 6b9d113
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenMiranda authored Mar 21, 2019
2 parents 6b9d113 + 48f7394 commit fff6a1e
Show file tree
Hide file tree
Showing 10 changed files with 363 additions and 0 deletions.
5 changes: 5 additions & 0 deletions account_move_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Journal Entries report
======================

This module adds a report in journal entries. You can print one o several
journal entries in PDF file.
5 changes: 5 additions & 0 deletions account_move_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# coding: utf-8
# Copyright 2016 Vauxoo (https://www.vauxoo.com) <info@vauxoo.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import report
25 changes: 25 additions & 0 deletions account_move_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# coding: utf-8
# Copyright 2016 Vauxoo (https://www.vauxoo.com) <info@vauxoo.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Journal Entries Report",
"version": "12.0.1.0.0",
"author": "Vauxoo",
"category": "Accouting",
"website": "http://www.vauxoo.com/",
"license": "LGPL-3",
"depends": [
"account",
],
"demo": [],
"data": [
"views/account_reports.xml",
"views/account_move_report.xml"
],
"test": [],
"js": [],
"css": [],
"qweb": [],
"installable": True,
"auto_install": False,
}
133 changes: 133 additions & 0 deletions account_move_report/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-20 21:15+0000\n"
"PO-Revision-Date: 2019-03-20 15:40-0600\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es\n"
"X-Generator: Poedit 2.2.1\n"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Account"
msgstr "Cuenta"

#. module: account_move_report
#: model:ir.actions.report,name:account_move_report.template_account_move_report
msgid "Account Move Report"
msgstr "Informe de movimiento de cuenta"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Amount Currency"
msgstr "Importe divisa"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Analytic account"
msgstr "Cuenta Analítica"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Credit"
msgstr "Haber"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Currency"
msgstr "Moneda"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Date:"
msgstr "Fecha:"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Debit"
msgstr "Debe"

#. module: account_move_report
#: model:ir.model.fields,field_description:account_move_report.field_report_account_move_report_account_entries_report__display_name
msgid "Display Name"
msgstr "Nombre para mostrar"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Due date"
msgstr "Fecha de vencimiento"

#. module: account_move_report
#: model:ir.model.fields,field_description:account_move_report.field_report_account_move_report_account_entries_report__id
msgid "ID"
msgstr ""

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Invoice"
msgstr "Factura"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Journal Entries:"
msgstr "Póliza:"

#. module: account_move_report
#: model:ir.model.fields,field_description:account_move_report.field_report_account_move_report_account_entries_report____last_update
msgid "Last Modified on"
msgstr "Modficado el"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Name"
msgstr "Nombre"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Partner"
msgstr "Socio"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Printing Date:"
msgstr "Fecha de impresión:"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Reconcile"
msgstr "Conciliación"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Reference:"
msgstr "Referencia:"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Tax Account"
msgstr "Cuenta impuesto"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "Tax Amount"
msgstr "Importe impuestos/base"

#. module: account_move_report
#: model_terms:ir.ui.view,arch_db:account_move_report.account_entries_report
msgid "To Review:"
msgstr "A revisar:"

#. module: account_move_report
#: model:ir.model,name:account_move_report.model_report_account_move_report_account_entries_report
msgid "report.account_move_report.account_entries_report"
msgstr ""
5 changes: 5 additions & 0 deletions account_move_report/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# coding: utf-8
# Copyright 2016 Vauxoo (https://www.vauxoo.com) <info@vauxoo.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import account_move_report
28 changes: 28 additions & 0 deletions account_move_report/report/account_move_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from odoo import api, models


class ParticularReport(models.AbstractModel):
_name = 'report.account_move_report.account_entries_report'
_description = 'Assistant to generate policy reports'

@api.multi
def get_report_values(self, docids, data=None):
docs = self.env['account.move'].browse(docids)
total_debit_credit = self.get_total_debit_credit(docs)
return {
'doc_ids': docs.ids,
'doc_model': 'account.move',
'data': data,
'docs': docs,
'total_debit_credit': total_debit_credit,
}

def get_total_debit_credit(self, docs):
res = {}
for doc in docs:
sum_tot_debit = sum(doc.line_ids.mapped('debit'))
sum_tot_credit = sum(doc.line_ids.mapped('credit'))
res.update({doc.id:
{'sum_tot_debit': sum_tot_debit,
'sum_tot_credit': sum_tot_credit}})
return res
Binary file added account_move_report/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions account_move_report/static/description/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<head>
<style>
.backgrounds{background-color:#fff;color:#a41d35}
</style>
</head>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">
Journal Entries report
</h2>
<p class="oe_mt32">
Report for Journal Entries
</p>
<p>
This module adds a report in journal entries. You can print one o several
journal entries in PDF file.
</p>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span6">
<h2 class="oe_slogan">Do you need help?</h2>
<h3 class="oe_slogan">
Let's offer you the best services!
</h3>
<p class="oe_mt32 text-center">
Contact us by our official channels.
</p>
<div class="oe_spaced">
<ul class="text-center list-inline">
<li>
<a href="https://facebook.com/vauxoo" Target="_blank"><i class="fa fa-facebook-square fa-xs backgrounds"></i></a>
</li>
<li>
<a href="https://twitter.com/vauxoo" Target="_blank" ><i class="fa fa-twitter-square fa-xs backgrounds"></i></a>
</li>
<li>
<a href="https://www.linkedin.com/company/vauxoo" Target="_blank"><i class="fa fa-linkedin-square fa-xs backgrounds"></i></a>
</li>
<li>
<a title="Contact us" data-toggle="tooltip" data-placement="left" Target="_blank" href="https://www.vauxoo.com/page/website.contactus"><i class="fa fa-envelope-square fa-xs backgrounds"></i></a>
</li>
</ul>
</div>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<a href="https://www.vauxoo.com" target="_blank"r>
<img src="https://s3.amazonaws.com/s3.vauxoo.com/description_logo.png" width="200" height="auto">
</a>
<div class="oe_demo_footer oe_centeralign">Meet Us</div>
</div>
</div>
</div>
</section>
95 changes: 95 additions & 0 deletions account_move_report/views/account_move_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="account_entries_report" name="Entries Report">
<t t-call="web.external_layout">
<t t-set="count" t-value="0"/>
<t t-set="count_total" t-value="len(docs)"/>
<t t-foreach="docs" t-as="o">
<t t-set="count" t-value="count+1"/>
<div class="page">
<div class="oe_structure"/>
<br/>
<div class="row">
<div class="col-xs-6">
<div>
<td>Journal Entries:</td>
<span t-field="o.name"/>
</div>
<div>
<td>Reference:</td>
<span t-field="o.ref"/>
</div>
<div>
<td>Date:</td>
<span t-field="o.date"/>
</div>
<div>
<h4>To Review:</h4>
</div>
</div>
<div class="text-right">
<p>Printing Date: <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></p>
</div>
</div>
<t t-if="o.line_ids">
<table class="table table-condensed">
<thead>
<tr style="font-size:8pt; background-color:#620400; color:#FFFFFF;">
<th>Invoice</th>
<th>Name</th>
<th>Partner</th>
<th>Account</th>
<th>Due date</th>
<th class="text-right">Debit</th>
<th class="text-right">Credit</th>
<th>Analytic account</th>
<th class="text-right">Amount Currency</th>
<th>Currency</th>
<th>Tax Account</th>
<th class="text-right">Tax Amount</th>
<th>Reconcile</th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.line_ids" t-as="l" style="font-size:6pt;">
<td><span t-field="l.invoice_id"/></td>
<td><span t-field="l.name"/></td>
<td><span t-field="l.partner_id"/></td>
<td><span t-field="l.account_id"/></td>
<td><span t-field="l.date_maturity"/></td>
<td class="text-right">
<span t-field="l.debit"/>
</td>
<td class="text-right">
<span t-field="l.credit"/>
</td>
<td><span t-field="l.analytic_account_id"/></td>
<td class="text-right">
<span t-field="l.amount_currency"/>
</td>
<td><span t-field="l.currency_id.name"/></td>
<td><span t-field="l.tax_line_id.account_id.name"/></td>
<td class="text-right">
<span t-field="l.tax_line_id.amount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/></td>
<td><span t-field="l.full_reconcile_id.name"/></td>
</tr>
<tr style="font-size:8pt; background-color:#dcdcdc">
<td colspan="5"></td>
<td class="text-right"><strong><span t-esc="total_debit_credit[o.id]['sum_tot_debit']" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/></strong></td>
<td class="text-right"><strong><span t-esc="total_debit_credit[o.id]['sum_tot_credit']" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/></strong></td>
<td colspan="7"></td>
</tr>
</tbody>
</table>
</t>
<div t-if="count &lt; count_total">
<p style="page-break-before:always;"> </p>
</div>
<div class="oe_structure"/>
</div>
</t>
</t>
</template>

</odoo>
11 changes: 11 additions & 0 deletions account_move_report/views/account_reports.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<report
id="template_account_move_report"
string="Account Move Report"
model="account.move"
report_type="qweb-pdf"
name="account_move_report.account_entries_report"
file="account_move_report.account_entries_report"
/>
</odoo>

0 comments on commit fff6a1e

Please sign in to comment.