[RFC]pms: simplified invoice by journal type and out_invoice move type

This commit is contained in:
Darío Lodeiros
2022-03-19 09:04:20 +01:00
parent 72c76930d8
commit b34c7c410e
6 changed files with 105 additions and 23 deletions

31
pms/report/invoice.xml Normal file
View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//div[@class='page']//h2" position="replace">
<h2>
<span
t-if="o.move_type == 'out_invoice' and o.is_simplified_invoice and o.state == 'posted'"
>Simplified Invoice</span>
<span
t-if="o.move_type == 'out_invoice' and o.is_simplified_invoice and o.state == 'draft'"
>Draft Simplified Invoice</span>
<span
t-if="o.move_type == 'out_invoice' and o.is_simplified_invoice and o.state == 'cancel'"
>Cancelled Simplified Invoice</span>
<span
t-if="o.move_type == 'out_invoice' and not o.is_simplified_invoice and o.state == 'posted'"
>Invoice</span>
<span
t-if="o.move_type == 'out_invoice' and not o.is_simplified_invoice and o.state == 'draft'"
>Draft Invoice</span>
<span
t-if="o.move_type == 'out_invoice' and not o.is_simplified_invoice and o.state == 'cancel'"
>Cancelled Invoice</span>
<span t-if="o.move_type == 'out_refund'">Credit Note</span>
<span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.move_type == 'in_invoice'">Vendor Bill</span>
<span t-if="o.name != '/'" t-field="o.name" />
</h2>
</xpath>
</template>
</odoo>