Skip to content
Snippets Groups Projects
Commit 31173407 authored by Marco Folco's avatar Marco Folco
Browse files

[MOD] pre invoice report

Removed header and footer (left the page number only)
Created new paperformat with less margins on top and bottom for pre invoice report
Added create date to tree view of medical invoice
parent 0c4590e6
No related branches found
No related tags found
1 merge request!55[MOD] pre invoice report
......@@ -25,6 +25,7 @@
"license": "AGPL-3",
"description": """Medical Invoicing""",
"depends": [
"base",
"health_insurance",
"medical_benefit",
"medical_staff",
......@@ -50,6 +51,7 @@
"report/invoice_insurance_report_template.xml",
"report/invoice_insurance_report_view.xml",
"security/ir.model.access.csv",
"data/report_paperformat_data.xml",
],
"installable": True,
"application": True,
......
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<record id="paperformat_euro_no_margins" model="report.paperformat">
<field name="name">A4 Reduced Margins</field>
<field name="default" eval="False"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">10</field>
<field name="margin_bottom">10</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
<field name="report_ids" eval="[(6, 0, [ref('medical_invoicing.report_pre_invoice')])]"/>
</record>
</data>
</odoo>
File added
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * medical_invoicing
# * medical_invoicing
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-06-17 14:20+0000\n"
"PO-Revision-Date: 2021-06-17 14:20+0000\n"
"POT-Creation-Date: 2021-07-12 18:58+0000\n"
"PO-Revision-Date: 2021-07-12 15:59-0300\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es_AR\n"
"X-Generator: Poedit 2.0.6\n"
#. module: medical_invoicing
#: model_terms:ir.ui.view,arch_db:medical_invoicing.report_invoice_insurance_template
......@@ -22,11 +24,18 @@ msgstr "&amp;nbsp;<span>en</span>"
#. module: medical_invoicing
#: model_terms:ir.ui.view,arch_db:medical_invoicing.report_invoice_insurance_template
msgid "<span groups=\"account.group_show_line_subtotals_tax_excluded\">Amount</span>\n"
msgid ""
"<span groups=\"account.group_show_line_subtotals_tax_excluded\">Amount</span>\n"
" <span groups=\"account.group_show_line_subtotals_tax_included\">Total Price</span>"
msgstr "<span groups=\"account.group_show_line_subtotals_tax_excluded\">Importe</span>\n"
msgstr ""
"<span groups=\"account.group_show_line_subtotals_tax_excluded\">Importe</span>\n"
" <span groups=\"account.group_show_line_subtotals_tax_included\">Precio Total</span>"
#. module: medical_invoicing
#: model_terms:ir.ui.view,arch_db:medical_invoicing.report_pre_invoice_template
msgid "<span>Page </span><span class=\"page\"/> of <span class=\"topage\"/>"
msgstr "<span>Página </span><span class=\"page\"/> de <span class=\"topage\"/>"
#. module: medical_invoicing
#: model_terms:ir.ui.view,arch_db:medical_invoicing.report_invoice_insurance_template
msgid "<span>Professional</span>"
......@@ -693,4 +702,3 @@ msgstr ""
#, python-format
msgid "to"
msgstr "hasta"
......@@ -15,7 +15,8 @@ class ReportPreInvoice(models.AbstractModel):
res_partner rp ON ail.professional_id = rp.id JOIN
medical_benefit mb ON ail.benefit_id = mb.id
WHERE ail.invoice_id = %s
GROUP BY rp.id,rp.display_name""", [invoice_id]
GROUP BY rp.id,rp.display_name
ORDER BY rp.display_name DESC""", [invoice_id]
)
records = []
for l in self._cr.fetchall():
......
......@@ -2,10 +2,10 @@
<odoo>
<template id="report_pre_invoice_template">
<t t-call="web.html_container">
<t t-call="web.external_layout" t-lang="user.lang">
<t t-call="web.basic_layout" t-lang="user.lang">
<div class="page">
<div style="text-align:left;color:black!important;"><strong><h1>Pre Invoice report</h1></strong></div><br/>
<table class="table table-stripped">
<table class="table table-sm o_main_table" style="table-layout:fixed;">
<tr>
<td>Professional</td>
<td>Amount of benefits</td>
......@@ -13,12 +13,17 @@
</tr>
<t t-foreach="records" t-as="record">
<tr>
<td><span t-esc="record['professional']"/></td>
<td><span t-esc="record['benefit_count']"/></td>
<td><span t-esc="record['professional']"/></td>
<td><span t-esc="record['price_total']"/></td>
</tr>
</t>
</table>
<div class="footer">
<div class="text-center">
<center><span>Page </span><span class="page"/> of <span class="topage"/></center>
</div>
</div>
</div>
</t>
</t>
......
......@@ -7,6 +7,7 @@
<field name="model">medical.invoice</field>
<field name="arch" type="xml">
<tree>
<field name="create_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="closing_day"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment