Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1839 Lượt xem

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



Ảnh đại diện
Huỷ bỏ

Hello Laurent,

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

Thanks

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 24
41
1
thg 2 24
2487
3
thg 12 23
1872
1
thg 5 23
4327
1
thg 1 23
2166