콘텐츠로 건너뛰기
메뉴
신고된 질문입니다
1840 화면

Hello,

In a BOM components tree view sometimes product are archived and Odoo do not provide a way to display them easily.

I see that we can add "decoration-danger" to tree attribute to set some lines in red.

I've tried this method to highlight the archived product in BOM components tree view but I can't manage to find the good syntax.

I tried to edit mrp.bom.form:

<notebook>
    <page string="Components">
        <field name="bom_line_ids" widget="one2many" context="{'default_parent_product_tmpl_id': product_tmpl_id, 'default_product_id': False, 'default_company_id': company_id, 'default_routing_id': routing_id}">
            <tree string="Components" editable="bottom">
                <field name="company_id" invisible="1"/>
                <field name="routing_id" invisible="1"/>
                <field name="sequence" widget="handle"/>
                <field name="product_id" context="{'default_type': 'product'}"/>
                <field name="product_tmpl_id" invisible="1"/>
                ...
            </tree>
        </field>
    </page>

with

<tree string="Components" editable="bottom" decoration-danger="active==True">
or
<tree string="Components" editable="bottom" decoration-danger="product_tmpl_id.active==True">

Without success :/

Any idea welcome!

Laurent



아바타
취소

Hello Laurent,

Can you provide a screenshot? I am not clear on which view are you referring to.

Thanks

관련 게시물 답글 화면 활동
2
7월 24
41
1
2월 24
2487
3
12월 23
1872
1
5월 23
4327
1
1월 23
2166