Hi am a new bee to OpenERP , i would like to do few additions to my current Delivery Order & Incoming Shipment modules , but am confused (stock.move, stock.picking,stock.picking.in,stock.picking.out etc...etc...) with the structure of the view and the way it is inherited in several other modules.
How to add new fields in to 'Additional Info' page of Incoming Shipment and Delivery Order modules?
How to enable 'product description column in both Incoming Shipment & Delivery Order modules?
I had an attempt to do this by creating a separate module that depends on module 'stock' but no changes happens to my view . Can anyone please point out the issue in my .xml ,.py etc... files , any help is appreciated .
Here is my source for reference :
stock.py
from openerp.osv import fields, osv
class stock_picking(osv.osv):
_inherit = "stock.picking"
_columns = {
'po_number': fields.char('Customer PO#', size=25),
'po_date': fields.date('Customer PO Date')
}
stock_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_picking_form2">
<field name="name">stock.picking.form2</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//group/field[@name='move_type']" position='before'>
<field name="po_number"/>
<field name="po_date"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_move_picking_tree2">
<field name="name">stock.picking.tree2</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_move_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_line']/tree/field[@name='product_id']" position="after">
<field name="name"/>
</xpath>
</field>
</record>
</data>
</openerp>