← Back to team overview

openerp-india team mailing list archive

[Bug 1091268] [NEW] Useless duplicates origin when merging purchase orders

 

Public bug reported:

When merging multiple purchase orders from wizard, origin field is concatenated even if the origin is the same:
eg: :MO/00005 :MO/00005 :MO/00005 :MO/00005 :MO/00003 :MO/00003 :MO/00003

It should be avoided, at least because the origin field is limited to 64
chars. I'm attaching a patch to fix this

if porder.origin and not porder.origin in order_infos['origin'] : # Do not add duplicates origin, totally useless
   order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin

** Affects: openobject-addons
     Importance: Undecided
         Status: New

** Patch added: "check substring before concatenation"
   https://bugs.launchpad.net/bugs/1091268/+attachment/3462142/+files/diff.txt

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

Title:
  Useless duplicates origin when merging purchase orders

Status in OpenERP Addons (modules):
  New

Bug description:
  When merging multiple purchase orders from wizard, origin field is concatenated even if the origin is the same:
  eg: :MO/00005 :MO/00005 :MO/00005 :MO/00005 :MO/00003 :MO/00003 :MO/00003

  It should be avoided, at least because the origin field is limited to
  64 chars. I'm attaching a patch to fix this

  if porder.origin and not porder.origin in order_infos['origin'] : # Do not add duplicates origin, totally useless
     order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin

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


Follow ups

References