Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4788 Widoki

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







Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

<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

Powiązane posty Odpowiedzi Widoki Czynność
2
mar 15
9597
3
mar 15
13441
2
sie 25
2436
1
lip 25
921
1
sie 25
1151