See https://github.com/odoo/odoo/issues/3644 Also, it helps to have the value set/read in context close to each other.
This project aim to deal with modules related to manage document printing and sending in a generic way. You'll find modules that: