← Back to team overview

openerp-india team mailing list archive

[Bug 1027755] Re: [6.0]Can`t delete the Requests for Quotation

 

Hello Joshua,

This issue is already fixed on 6.0 branch with rev no 5244 and rev id
xal@xxxxxxxxxxx-20120601111935-1bc0cy9l85umj5og

Would you please check http://bazaar.launchpad.net/~openerp/openobject-
addons/6.0/revision/5219.1.1

So would you please update your code and then try again.

Thanks for reporting!

** Summary changed:

- Can`t delete the Requests for Quotation
+ [6.0]Can`t delete the Requests for Quotation

** Changed in: openobject-addons
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1027755

Title:
  [6.0]Can`t delete the Requests for Quotation

Status in OpenERP Addons (modules):
  Fix Released

Bug description:
  OpenERP V6.0 
  It`s error When delete the Requests for Quotation 

  "A document was modified since you last viewed it (Purchase
  Order:xxx)"

  I think we need to delete  the context['__last_update']

      def unlink(self, cr, uid, ids, context=None):
          purchase_orders = self.read(cr, uid, ids, ['state'], context=context)
          unlink_ids = []
          for s in purchase_orders:
              if s['state'] in ['draft','cancel']:
                  unlink_ids.append(s['id'])
              else:
                  raise osv.except_osv(_('Invalid action !'), _('Cannot delete Purchase Order(s) which are in %s State!')  % _(dict(purchase_order.STATE_SELECTION).get(s['state'])))

          # TODO: temporary fix in 5.0, to remove in 5.2 when subflows support
          # automatically sending subflow.delete upon deletion
          wf_service = netsvc.LocalService("workflow")
          for id in unlink_ids:
              wf_service.trg_validate(uid, 'purchase.order', id, 'purchase_cancel', cr)
          del context['__last_update']
          return super(purchase_order, self).unlink(cr, uid, unlink_ids, context=context)

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1027755/+subscriptions


References