Skip to content
Snippets Groups Projects
Commit 924ca780 authored by Chirag Dodiya's avatar Chirag Dodiya Committed by Martin Trigaux
Browse files

[IMP] account: add origin as invisible field

Add the source of the invoice on the invoice lines.
It's an hidden field as it's already present on the invoice but this is a
frequent customization request, adding it as invisible to help them.

Closes #9416, task 21073
parent f65a7ba6
Branches
Tags
No related merge requests found
......@@ -394,6 +394,7 @@
<tree string="Invoice Lines" editable="bottom">
<field name="sequence" widget="handle"/>
<field name="product_id"/>
<field name="origin" invisible="1"/>
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
......@@ -446,7 +447,7 @@
</group>
<field name="comment" placeholder="Terms and conditions..."/>
</page>
<page string="Other Info">
<page string="Other Info" name="other_info">
<group>
<group>
<field name="journal_id" groups="account.group_account_user"
......
......@@ -58,6 +58,7 @@
<thead>
<tr>
<th>Description</th>
<th class="hidden">Source Document</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">Disc.(%)</th>
......@@ -68,6 +69,7 @@
<tbody class="invoice_tbody">
<tr t-foreach="o.invoice_line_ids" t-as="l">
<td><span t-field="l.name"/></td>
<td class="hidden"><span t-field="l.origin"/></td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.uom_id" groups="product.group_uom"/>
......
......@@ -11,6 +11,7 @@
<t t-foreach="p['lines']" t-as="l">
<tr>
<td><span t-field="l.name"/></td>
<td class="hidden"><span t-field="l.origin"/></td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.uom_id" groups="product.group_uom"/>
......
......@@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='origin']" position="after">
<xpath expr="//page[@name='other_info']//field[@name='origin']" position="after">
<field name="incoterms_id" widget="selection" groups="sale.group_display_incoterm"/>
</xpath>
</data>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment