[FIX] openerp: fix traceback when no field in constrains
[FIX] openerp: fix traceback when no field in constrains

In case you don't have 'field', the first 'if' will raise a warning.
In this case the second 'if' will crash with:
    "'NoneType' object has no attribute 'store'"

This commit closes #16146
Courtesy of @kmetaxas

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