Fine-tuning of commit: b3a3ad80 ac1e187e The environment should be updated before the call to _updateAttachments, as it depends on the env active_id. opw 1888651 closes odoo/odoo#27277