[FIX] account: Fix invoice report template

- Description is no longer needed since it provides the same info as the header.
- The ref field will be used to set a custom description on any invoice (not just vendor bills).
- Don't display the name on the report if the move hasn't been posted.

closes odoo/odoo#37683

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
Laurent Smet
2019-10-01 11:15:52 +00:00
parent 18854caedd
commit 8f6e383397
2 changed files with 2 additions and 7 deletions
+1 -2
View File
@@ -612,8 +612,7 @@
options='{"always_reload": True, "no_quick_create": True}'
attrs="{'invisible': [('type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/>
<field name="ref"
attrs="{'invisible': [('type', '=', 'out_invoice')]}"/>
<field name="ref"/>
<field name="invoice_vendor_bill_id"
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('type', '!=', 'in_invoice')]}"
domain="[('company_id', '=', company_id), ('partner_id','child_of', [partner_id]), ('type','=','in_invoice')]"
+1 -5
View File
@@ -18,14 +18,10 @@
<span t-if="o.type == 'out_refund'">Credit Note</span>
<span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.type == 'in_invoice'">Vendor Bill</span>
<span t-field="o.name"/>
<span t-if="o.name != '/'" t-field="o.name"/>
</h2>
<div id="informations" class="row mt32 mb32">
<div class="col-auto mw-100 mb-2" t-if="o.name" name="description">
<strong>Description:</strong>
<p class="m-0" t-field="o.name"/>
</div>
<div class="col-auto mw-100 mb-2" t-if="o.invoice_date" name="invoice_date">
<strong>Invoice Date:</strong>
<p class="m-0" t-field="o.invoice_date"/>