https://douno.net/2018/06/07/odoo-attributeerror-nonetype-object-has-no-attribute-id/
Odoo - AttributeError: 'NoneType' object has no attribute 'id'