[IMP]:purchase:Incoming Shipment: add a field warehouse below the company (the field warehouse is filled with the one in rlated PO)

bzr revid: apa@tinyerp.com-20120629103000-kr5ugo7ej2wx75su
This commit is contained in:
Amit Patel (OpenERP) 2012-06-29 16:00:00 +05:30
parent 80bd0cd3ee
commit 1ca5472d75
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,7 @@ class stock_picking(osv.osv):
_columns = {
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
ondelete='set null', select=True),
}
_defaults = {
'purchase_id': False,
@ -134,5 +135,6 @@ class stock_picking_in(osv.osv):
_columns = {
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
ondelete='set null', select=True),
'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Warehouse'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -51,9 +51,12 @@
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/group/group/field[@name='date']" position="before">
<xpath expr="//field[@name='date']" position="before">
<field name="purchase_id"/>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
<field name="warehouse_id"/>
</xpath>
</field>
</record>