[IMP] make changes into purchase as per requirement
bzr revid: rma@tinyerp.com-20121106112844-wt4xnn3o90w08pxk
This commit is contained in:
parent
aabb0f38fa
commit
d421c189fa
|
@ -220,7 +220,7 @@ class purchase_order(osv.osv):
|
|||
_defaults = {
|
||||
'date_order': fields.date.context_today,
|
||||
'state': 'draft',
|
||||
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'purchase.order'),
|
||||
'name': lambda obj, cr, uid, context: '/',
|
||||
'shipped': 0,
|
||||
'invoice_method': 'order',
|
||||
'invoiced': 0,
|
||||
|
@ -237,6 +237,9 @@ class purchase_order(osv.osv):
|
|||
_order = "name desc"
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
if ('name' not in vals) or (vals.get('name')=='/'):
|
||||
seq_obj_name = self._name
|
||||
vals['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
|
||||
order = super(purchase_order, self).create(cr, uid, vals, context=context)
|
||||
if order:
|
||||
self.create_send_note(cr, uid, [order], context=context)
|
||||
|
|
|
@ -263,7 +263,7 @@
|
|||
</group>
|
||||
<div class="oe_clear"/>
|
||||
<label for="notes"/>
|
||||
<field name="notes" class="oe_inline"/>
|
||||
<field name="notes"/>
|
||||
</page>
|
||||
<page string="Incoming Shipments & Invoices">
|
||||
<group>
|
||||
|
|
Loading…
Reference in New Issue