Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to access stoke model from sale.order

By
James Ford
on 2/10/16, 3:21 PM 320 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>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/10/16, 3:21 PM
Seen: 320 times
Last updated: 2/10/16, 5:07 PM