Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to merge the delivery order?

on 3/22/13, 3:18 PM 3,704 views

The question is in the topic, so How can I merge the delivery orders? It's a useful if I want to create one delivery slip but the products come from different sale orders. (the partner is same)

Thanks in advance. In 6.1 all of the apps. isn't function... in 7.0 I didn't find the solution.


Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 12/26/13, 5:59 AM

Hello Mr Klacus,

There is one module in community for this functionality to merge pickings.

Here you can download that module.

but it is in 6.0 you need to migrate it in 7.0.

Mayur Maheshwari
On 6/24/14, 11:20 AM


Hope follwing link will helps you . have a look.


Nice video THX!

on 6/30/14, 11:08 PM
Viktor léhner
On 6/24/14, 10:01 AM

Kedves klacus, amennyiben jártas vagy az OPENERP rendszerben kérlek vedd fel velem a kapcsolatot: lehnerviktor@gmail.com

This is an English forum, please answer in English.

Els Van Vossel (evv)
on 6/24/14, 10:12 AM

Dear Els. This just a contacting info's no more..LOL

on 6/30/14, 10:46 PM
On 3/23/13, 12:00 PM

I try to install merge.picking modul. It cannot be use, because drop some exception when check the field.

I hack some parts from the code, and it's will be run, avoiding the problems when the code try to understand what is the diff. between the models. this is merge_picking.py

    def is_compatible_many2one(self, cr, uid, target, merge, context=None):
    fields_pool = self.pool.get("ir.model.fields")
    fields_search = fields_pool.search(cr, uid, [('ttype','=','many2one'),('model','=','stock.picking'),('relation','<>',self._name)])
    failedfields = []
    for field in fields_pool.browse(cr, uid, fields_search, context):

        # don't handle specialhandlers fields as incompatible            
        if field.name in self.get_specialhandlers().keys():

        # compare fields
        related_target_id = getattr(target, field.name)
        related_merge_id = getattr(merge, field.name)
        if (related_target_id.id != related_merge_id.id):
    failedfields = [] # modify here always be empty  
    return {'result': (len(failedfields)==0), 'fields': failedfields}

I hack the failed fields and it will be ok. But this code drop the other place also the error, and I cut off also.

    def do_target(self, cr, uid, ids, context=None):
    # look if we got compatible views
    picking_pool = self.pool.get('stock.picking')

    found = False
    found_incompatible = False
    incompatible_notes = _('Near misses:')

    for session in self.browse(cr, uid, ids):
        # search if there are any compatible merges at all
        similiar_ids = picking_pool.search(cr, uid, [('id','<>',session.target_picking_id.id),

        # ensure that many2one relations are compatible 
        for merge in picking_pool.browse(cr, uid, similiar_ids):
            is_compatible = self.is_compatible_many2one(cr, uid, session.target_picking_id, merge, context)
            found = True
            if (is_compatible['result']):
                found = True
                found_incompatible = True
                for f in is_compatible['fields']:
                    desc = self.get_fieldname_translation(cr, uid, f, context)
                    incompatible_notes += "\n" + _('%s: %s (%s) differs.') % (str(merge.name), desc, f.name) 
    found = True # modify here always be true
    found_incompatible = False # modify here always be true
    if not found: 
        if (found_incompatible):
            raise osv.except_osv(_('Note'),_('There are no compatible pickings to be merged.') + "\n" + incompatible_notes)
            raise osv.except_osv(_('Note'),_('There are no compatible pickings to be merged.'))

        return self.return_view(cr, uid, 'merge_picking_form_init', ids[0])
    # else:
    return self.return_view(cr, uid, 'merge_picking_form_target', ids[0])

Now it can be use under 6,1. I tested it, the code run it without problems. I think this is safe because some other item can be guarantee what you can merge. Example wizzard domain filtering in merge_picking_view.xml

Now i need to make some modification in sales modul, because when I merge the delivery orders and invoice it, the sales order view progressbar cannot find the items. (never be go on 100%)

I really do not understand, why the openerp cannot do it in base mode? This is a really life.

on 3/23/13, 12:01 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 3/22/13, 3:18 PM
Seen: 3704 times
Last updated: 3/16/15, 8:10 AM