Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4807 Представления

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







Аватар
Отменить
Лучший ответ

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

Аватар
Отменить

<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>

Автор

Thank you! It worked

Related Posts Ответы Просмотры Активность
2
мар. 15
9619
3
мар. 15
13471
2
авг. 25
2543
1
июл. 25
960
1
авг. 25
1151