我一直想做的是编辑制造模块的“树视图”。我想把“产品数量”添加到这个视图中,以便更容易地看到细节。我试图编辑xml,但我不能简单地添加列,因为它不是模型的一部分,但它们彼此相关。你知道吗
以下是xml文件:
<?xml version="1.0"?>
<tree decoration-bf="message_needaction==True" decoration-info="state in ('draft','confirmed')" decoration-danger="date_planned<current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
<field name="message_needaction" invisible="1"/>
<field name="name"/>
<field name="date_planned"/>
<field name="product_id"/>
<field name="product_qty" sum="Total Qty"/>
<field name="product_uom" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="hour_total" sum="Total Hours"/>
<field name="cycle_total" sum="Total Cycles"/>
<field name="origin"/>
<field name="state"/>
</tree>
我试着编辑基于Python的文件物料需求计划其中包含模型的列,但不幸的是什么都没有发生。我甚至尝试删除文件中的所有代码,但在刷新制造模块的页面后,没有任何更改。你知道吗
上述代码的基本模型是“mrp生产“这与”库存.移动“<;—包含产品的计量单位数量。你知道吗
对于odoo,这不是一个有效的xml,其中是标记
<openerp> <data>
,树应该在<record>
标记中,如果您将此文件放入模型中,并且没有得到任何错误,那么您没有将其添加到数据中的__openerp__.py
:‘your\xml’_文件.xml'你应该把这个文件添加到
__openepr__.py
相关问题 更多 >
编程相关推荐