Odoo 8 : Personalized error message after trying to modify a read-only object
I assume the Save button invokes the model's write method. In that case, you can override this method to raise custom error message when the corresponding conditions are met. You have the uid of the user that called the write method, so it must be enough to achieve the desired effect.
In Odoo 8, I added an ir.rule to a model that restricts write access for certain users. I would like to personalize the error message restricted user get after clicking 'Save'. I can't just modify the translation with _() because the new message must be specific to that model.
Is there a way to do this easily in Odoo 8 without having to modify the source code of Odoo itself ?