← Back to team overview

openerp-india team mailing list archive

[Bug 930127] Re: [6.1] [delivery] delivery.carrier.write() fails to handle ids=int case

 

** Branch linked: lp:openobject-addons

-- 
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/930127

Title:
  [6.1] [delivery] delivery.carrier.write() fails to handle ids=int case

Status in OpenERP Addons (modules):
  In Progress

Bug description:
  Hello,

  In the module delivery, the method create_grid_lines breaks if there
  is a write request with only one id.

  I propose the following patch to solve the problem.

  === modified file 'delivery/delivery.py'                                                 
  --- delivery/delivery.py        2012-01-31 13:36:57 +0000                                
  +++ delivery/delivery.py	2012-02-10 12:22:58 +0000
  @@ -98,6 +98,8 @@
           return False
   
       def create_grid_lines(self, cr, uid, ids, vals, context=None):
  +        if isinstance(ids, int):
  +            ids = [ids]
           if context == None:
               context = {}
           grid_line_pool = self.pool.get('delivery.grid.line')

  Best regards,

  Benoît

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


References