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

Why context is not passed to real_stock field?

By
Stefan Reisich
on 4/2/13, 7:23 AM 1,591 views

Hello,

I have the following code:

<record id="nfx_view_normal_procurement_locations_form" model="ir.ui.view">
    <field name="name">nfx_product.normal.procurement.locations.inherit</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
    <field name="arch" type="xml">

        <group name="lot" position="before" version="7.0">
            <group string="Locations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
                <field name="test" nolabel="1" context="{'product_id': 49}">
                    <tree string="Stock Location" context="{'product_id': 49}">
                        <!--<field name="id" invisible="1"/>-->
                        <field name="complete_name"/>
                        <!--<field name="stock_real"/>-->
                        <field name="stock_real" context="{'product_id': 49}"/>
                        <field name="stock_virtual" context="{'product_id': 49}" invisible="'product_id' not in context"/>
                    </tree>
                </field>
            </group>
        </group>

    </field>
</record>

Why the product_id 49 is not passed to the stock_real field context?

Is it possible that context is not passed to function fields?

0

Stefan Reisich

--Stefan Reisich--
831
| 7 7 8
Pfungstadt, Germany
--Stefan Reisich--
Stefan Reisich
On 4/5/13, 11:42 AM
0
DNTQ
On 4/2/13, 7:39 AM

Pls. add properties options='{"always_reload": True}' <field name="stock_real" context="{'product_id': 49}" options="{"always_reload": True}"/>

sorry, don't work...

Stefan Reisich
on 4/2/13, 7:51 AM

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: 4/2/13, 7:23 AM
Seen: 1591 times
Last updated: 3/16/15, 8:10 AM