Skip to Content
Menu
This question has been flagged
1868 Views

Hi! I'm creating a report en odoo with Qviews and I have problems with call fields from other models. For example , I want to access the field "origin " of the table stock_move since the sale.order model.


Please need help with this. Thanks!!


<?xml version="1.0"?>

<t t-name="sale.another_report">

<t t-foreach="docs" t-as="o">

<div class="page">

<div class="header">

<div class="row">

<div class="col-xs-4 col-xs-offset-6">

<img src="#"/>

</div>

</div>

</div>

<div class="body">

<div class="col-xs-12">

<p>Order Number: <span t-field="o.name"/></p>

</div>

<div class="col-xs-12">

<p>Origin: <span t-field="NEED ACCESS SINCE SALE MODEL TO STOCK MODEL FOR THE "Origin" FIELD (stock_move table)"/></p>

</div>

<div class="col-xs-12">

<p>Customer: <span t-field="o.partner_id"/> </p>

</div>

<div class="col-xs-12">

<p>Product Name: <span t-field="o.product_id.name_template"/> </p>

</div>

</div>

</div>

</t>

</t>


Avatar
Discard