콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5191 화면

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

관련 게시물 답글 화면 활동
2
3월 15
9846
3
3월 15
13716
2
8월 25
2988
1
7월 25
1220
1
8월 25
1152