we are using a rental module in odoo 11. While creating a sales order we have tenure information on the order/quotation and pro-forma. But when moving to the account.invoice I can not display the information and I can not reference it in the QWeb from the account.invoice.document as there seems to be no connection between invoices and sales orders.
the code I'm trying to copy from report_saleorder_document
<!-- Lines associated -->
<t t-foreach="layout_category['lines']" t-as="l">
<tr>
<td><span t-field="l.name"/>
<t t-if="l.rental_tenure != 0.0">
<span t-field="l.rental_tenure"/>
<span t-field="l.rental_uom_id"/>
<span> for </span>
<span t-field="l.price_unit" t-options="{'widget': 'monetary', 'display_currency': doc.pricelist_id.currency_id}"/>
<span><strong> for rental</strong></span>
</t>.......
in account.invoice_document i want to add the fields above with rental_tenure etc. under the following code as well:
<tr t-foreach="o.invoice_line_ids" t-as="l">
<td><span t-field="l.name"/></td>```
Any advice on how to achieve this just in Qwebs?
versarthur
On the
Invoice Reportcall thefunctionwhich will link toSale Order.XML:
PY:
On the Report, you can take any of the
filedsfrom'Sale.Order'. Example:<span t-esc="sale_order.partner_id.name"/>