製造モジュールの「ツリービュー」を編集しようとしていました。詳細を簡単に表示するために、このビューに「product_uom_qty」を追加しようとしています。私はxmlを編集しようとしましたが、モデルの一部ではないので、単に列を追加するだけです。しかし、それらはお互いに関連しています。ここでOdooのXML <model> .pyファイルで何をしても何も起こりません
は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>
私はモデルの列が含まれていますが、残念ながら何も起こらなかったmrp.pyあるのPythonベースのファイルを編集してみました。ファイル内のすべてのコードを削除しようとしましたが、Manufacturingモジュールのページを更新しても何も変更されませんでした。
上記のコードの基本モデルは、 "stock.move"に関連する "mrp.production"です< - product_uom_qtyを含みます。