[IMP]purchase_requisition: Remove the requisition_id from purchase order list,purchase order form set Purchase Requisition field after the Received checkbox, confirm a purchase requisition without purchase_order

bzr revid: sbh@tinyerp.com-20100825060118-wyk1xyijlq2vfnsh
This commit is contained in:
sbh (Open ERP)
2010-08-25 11:31:18 +05:30
parent 477bfdbe81
commit ba320d4c2e
2 changed files with 4 additions and 15 deletions
@@ -64,9 +64,6 @@ class purchase_requisition(osv.osv):
return True
def tender_in_progress(self, cr, uid, ids, context=None):
for quotations in self.browse(cr, uid, ids):
if not quotations.purchase_ids:
raise osv.except_osv(_('Purchase order required'),('You should have atleast one purchase order line defined for this tender'))
self.write(cr, uid, ids, {'state':'in_progress'} ,context=context)
for (id,name) in self.name_get(cr, uid, ids):
message = _('Tender') + " '" + name + "' "+ _(" is In Progress")
@@ -2,17 +2,6 @@
<openerp>
<data>
<record model="ir.ui.view" id="purchase_order_tree_inherit">
<field name="name">purchase.order.tree.inherit</field>
<field name="type">tree</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_tree"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="requisition_id" groups="base.group_extended"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="purchase_order_form_inherit">
<field name="name">purchase.order.form.inherit</field>
@@ -20,7 +9,7 @@
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<field name="partner_ref" position="after">
<field name="shipped" position="after">
<field name="requisition_id" groups="base.group_extended"/>
</field>
</field>
@@ -77,6 +66,9 @@
<field name="minimum_planned_date"/>
<field name="origin"/>
<field name="state"/>
<button name="purchase_confirm" states="draft" string="Confirm Purchase Order" icon="gtk-apply"/>
<button name="purchase_approve" states="confirmed" string="Approved by Supplier" icon="gtk-ok"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel Purchase Order" icon="gtk-cancel"/>
</tree>
</field>
<separator colspan="4" string=""/>