Skip to Content
Menu
This question has been flagged
1 Odpoveď
4819 Zobrazenia

I am used to inheriting views and adding columns or fields to them, but I can't do it in this view: I simply added a boolean field and inehrited the form view in stock.picking to add it, but I am always getting an error, can I get some help? This is the inheritting code:


ir.ui.view" id="update_qty_manual2_inherit">
stock.picking.inherit
stock.picking







Avatar
Zrušiť
Best Answer

Hi,

Here as you need to add a new field to detailed operation tab, you have to inherit this tree view: stock.view_stock_move_line_detailed_operation_tree.

Inherit the above tree view and add your fields to this tree. Adding field to one2many is bit different compared to normal fields.

Sample Code is added in comment section:

Thanks

Avatar
Zrušiť

<record id="view_stock_move_line_detailed_operation_tree_mrp" model="ir.ui.view">
<field name="name">stock.move.line.operations.tree.mrp</field>
<field name="model">stock.move.line</field>
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after">
<field name="description_bom_line" optional="show" attrs="{'column_invisible': [('parent.has_kits', '=', False)]}"/>
</xpath>
</field>
</record>

Autor

Thank you! It worked

Related Posts Replies Zobrazenia Aktivita
2
mar 15
9645
3
mar 15
13488
2
aug 25
2560
1
júl 25
969
1
aug 25
1151