Useless duplicates origin when merging purchase orders

Bug #1091268 reported by Yann Papouin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 2
OpenERP Community Backports (Addons)
Status tracked in 7.0
6.1
Fix Released
Low
Yann Papouin
7.0
Fix Released
Low
Yann Papouin

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

Related branches

Revision history for this message
Yann Papouin (yann-papouin) wrote :
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Anand (anand-m-patel)
Changed in openobject-addons:
status: Confirmed → In Progress
Anand (anand-m-patel)
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Yann Papouin (yann-papouin) wrote :

Personally I will keep my patch, as the split function will duplicates origins when there is spaces inside initial sentence:

eg:
 - originA = "Prod: 12345"
 - originB = "Prod: 12345"

will create :
 - origin = "Prod: 12345 Prod: 12345"

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.