def create(self, cr, uid, vals, context=None):
if vals.get('name','/')=='/':
vals['name'] = self.pool.get('ir.sequence').get(cr, uid, 'purchase.order') or '/'
+ if not context:
+ context = {}
context.update({ 'mail_create_nolog' : True })
order = super(purchase_order, self).create(cr, uid, vals, context=context)
self.message_post(cr, uid, [order], body=_("RFQ <b>Created</b>"), context=context)
value.update(dict(key))
order_data['order_line'] = [(0, 0, value) for value in order_data['order_line'].itervalues()]
- # create the new order
+ # create the new order
+ if not context:
+ context = {}
context.update({ 'mail_create_nolog' : True })
neworder_id = self.create(cr, uid, order_data)
self.message_post(cr, uid, [neworder_id], body=_("RFQ <b>Created</b>"), context=context)
if supplier.id in filter(lambda x: x, [rfq.state <> 'cancel' and rfq.partner_id.id or None for rfq in requisition.purchase_ids]):
raise osv.except_osv(_('Warning!'), _('You have already one %s purchase order for this partner, you must cancel this purchase order to create a new quotation.') % rfq.state)
location_id = requisition.warehouse_id.lot_input_id.id
+ if not context:
+ context = {}
context.update({ 'mail_create_nolog' : True })
purchase_id = purchase_order.create(cr, uid, {
'origin': requisition.name,