[FIX] base_partner_merge: deduplicate contacts in multi company
[FIX] base_partner_merge: deduplicate contacts in multi company

When deduplicating contacts, the function _process_query doesn't use
the orm to fetch the partners to merge according to the criteria.
So there were some access error in multi company when trying to merge
contacts from a not allowed company.

Now a check is made with the orm before merging the contacts.

opw:708457

leorochael/odoo,leorochael/odoo,Nowheresly/odoo,funkring/fdoo,datenbetrieb/odoo,spadae22/odoo,synconics/odoo,hip-odoo/odoo,tvibliani/odoo,diagramsoftware/odoo,hip-odoo/odoo,synconics/odoo,synconics/odoo,ygol/odoo,datenbetrieb/odoo,Daniel-CA/odoo,Elico-Corp/odoo_OCB,Adel-Magebinary/odoo,synconics/odoo,makinacorpus/odoo,ygol/odoo,Elico-Corp/odoo_OCB,CatsAndDogsbvba/odoo,funkring/fdoo,ygol/odoo,diagramsoftware/odoo,NeovaHealth/odoo,odootr/odoo,Adel-Magebinary/odoo,OpenUpgrade/OpenUpgrade,alexcuellar/odoo,tvibliani/odoo,CatsAndDogsbvba/odoo,Elico-Corp/odoo_OCB,odootr/odoo,OpenUpgrade/OpenUpgrade,alexcuellar/odoo,ygol/odoo,OpenUpgrade/OpenUpgrade,Nowheresly/odoo,synconics/odoo,funkring/fdoo,makinacorpus/odoo,bplancher/odoo,funkring/fdoo,spadae22/odoo,vnsofthe/odoo,bplancher/odoo,bplancher/odoo,odootr/odoo,Nowheresly/odoo,odootr/odoo,tvibliani/odoo,leorochael/odoo,Adel-Magebinary/odoo,CatsAndDogsbvba/odoo,funkring/fdoo,makinacorpus/odoo,Nowheresly/odoo,vnsofthe/odoo,Daniel-CA/odoo,CatsAndDogsbvba/odoo,makinacorpus/odoo,CatsAndDogsbvba/odoo,makinacorpus/odoo,NeovaHealth/odoo,vnsofthe/odoo,diagramsoftware/odoo,ygol/odoo,Nowheresly/odoo,Elico-Corp/odoo_OCB,OpenUpgrade/OpenUpgrade,funkring/fdoo,bplancher/odoo,odootr/odoo,vnsofthe/odoo,CatsAndDogsbvba/odoo,vnsofthe/odoo,diagramsoftware/odoo,alexcuellar/odoo,Elico-Corp/odoo_OCB,OpenUpgrade/OpenUpgrade,datenbetrieb/odoo,bplancher/odoo,spadae22/odoo,Adel-Magebinary/odoo,Daniel-CA/odoo,glovebx/odoo,synconics/odoo,Daniel-CA/odoo,vnsofthe/odoo,CatsAndDogsbvba/odoo,OpenUpgrade/OpenUpgrade,spadae22/odoo,leorochael/odoo,glovebx/odoo,OpenUpgrade/OpenUpgrade,bplancher/odoo,Adel-Magebinary/odoo,makinacorpus/odoo,Elico-Corp/odoo_OCB,datenbetrieb/odoo,vnsofthe/odoo,glovebx/odoo,tvibliani/odoo,alexcuellar/odoo,makinacorpus/odoo,Nowheresly/odoo,hip-odoo/odoo,leorochael/odoo,NeovaHealth/odoo,hip-odoo/odoo,tvibliani/odoo,spadae22/odoo,diagramsoftware/odoo,Daniel-CA/odoo,odootr/odoo,hip-odoo/odoo,NeovaHealth/odoo,diagramsoftware/odoo,tvibliani/odoo,tvibliani/odoo,glovebx/odoo,alexcuellar/odoo,leorochael/odoo,synconics/odoo,funkring/fdoo,datenbetrieb/odoo,Adel-Magebinary/odoo,glovebx/odoo,spadae22/odoo,datenbetrieb/odoo,NeovaHealth/odoo,Daniel-CA/odoo,Daniel-CA/odoo,alexcuellar/odoo,Nowheresly/odoo,ygol/odoo,leorochael/odoo,odootr/odoo,NeovaHealth/odoo,glovebx/odoo,Adel-Magebinary/odoo,hip-odoo/odoo,alexcuellar/odoo,datenbetrieb/odoo,diagramsoftware/odoo,glovebx/odoo,NeovaHealth/odoo,ygol/odoo,spadae22/odoo