跳至内容
菜单
此问题已终结
2 回复
6760 查看

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?

形象
丢弃
最佳答案

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

形象
丢弃
编写者

sorry, don't work...

相关帖文 回复 查看 活动
19
9月 20
69579
7
8月 24
26654
2
6月 16
18078
0
2月 25
1249
0
1月 25
1086