[Add]: Add a default value for warehouse_id ,
[IMP]: Set the right warehouse and copmany and set the note field in purchase order bzr revid: sbh@tinyerp.com-20100825102752-zj90oeonuaxxuzni
This commit is contained in:
parent
d0c50f5c57
commit
2db0400339
|
@ -32,6 +32,7 @@
|
|||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : ["wizard/purchase_requisition_partner_view.xml",
|
||||
"purchase_requisition_data.xml",
|
||||
"purchase_requisition_view.xml",
|
||||
"purchase_requisition_report.xml",
|
||||
"security/ir.model.access.csv","purchase_requisition_sequence.xml"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<function
|
||||
eval="('default',False,'warehouse_id', [('purchase.requisition', False)], ref('stock.warehouse0'), True, False, False, False, True)"
|
||||
id="purchase_default_set"
|
||||
model="ir.values"
|
||||
name="set"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -92,7 +92,7 @@ class purchase_requisition_partner(osv.osv_memory):
|
|||
pricelist_id = partner.property_product_pricelist_purchase and partner.property_product_pricelist_purchase.id or False
|
||||
price = pricelist_obj.price_get(cr, uid, [pricelist_id], line.product_id.id, line.product_qty, False, {'uom': uom_id})[pricelist_id]
|
||||
product = prod_obj.browse(cr, uid, line.product_id.id, context=context)
|
||||
|
||||
location_id = self.pool.get('stock.warehouse').read(cr, uid, [tender.warehouse_id.id], ['lot_input_id'])[0]['lot_input_id'][0]
|
||||
|
||||
purchase_order_line= {
|
||||
'name': product.partner_ref,
|
||||
|
@ -118,6 +118,10 @@ class purchase_requisition_partner(osv.osv_memory):
|
|||
'company_id': tender.company_id.id,
|
||||
'fiscal_position': partner.property_account_position and partner.property_account_position.id or False,
|
||||
'requisition_id':tender.id,
|
||||
'notes':tender.description,
|
||||
'warehouse_id':tender.warehouse_id.id and tender.warehouse_id.id ,
|
||||
'location_id':location_id,
|
||||
'company_id':tender.company_id.id,
|
||||
})
|
||||
order_ids=[]
|
||||
for order_line in list_line:
|
||||
|
|
Loading…
Reference in New Issue