Hello everyone, can you help me how to fix this problem! I inherited a class "stock.move" and add additional fields on it. On the view of "stock.picking" / Internal moves i modified it's original view by showing what i added on "stock.move". However, everytime i upgrade my project, the terminal says:
except_orm: ('View error', u"Can't find field 'qty_on_hand' in the following view parts composing the view of object model 'stock.picking':\n
* mp.nine.stock.picking.form.inherited\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model").
Here is my inherited class:
class stock_move():
_inherit = "stock.move"
_columns = {
'qty_available' : fields.float('Qty on hand'),
'max_qty' : fields.float('Max Qty'),
'ordered_qty' : fields.float('Ordered Qty'),
'balance_qty' : fields.float('Balance Qty'),
}
stock_move()
and my inherited view for "stock.picking" goes like this:
<record id="mp_nine_view_stock_picking_form_inherited" model="ir.ui.view">
<field name="name">mp.nine.stock.picking.form.inherited</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field eval="1" name="priority" />
<field name="arch" type="xml">
<xpath expr="//page[@string='Products']" position="replace">
<page string="Productsssssssssssss">
<field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'>
<tree string="Products" editable="bottom">
<field name="product_id"/>
<field name="date_expected"/>
<field name="max_qty"/>
<field name="ordered_qty"/>
<field name="balance_qty"/>
<field name="qty_available"/>
</tree>
</field>
<field name="note" placeholder="Add an internal note..." class="oe_inline"/>
</page>
</xpath>
</field>
</record>
Why does it can't find my added fields? Any help, please!