Automatically Adding Salesperson's Name as Signature on Invoices
I am working with Odoo Cloud and using Odoo Studio to add an automatic signature feature to invoices. I want the Salesperson’s name (from the user_id field) to automatically appear in the Authorized Signature field as a cursive text (default font) when printing invoices. The goal is for the salesperson’s name to be displayed like a signature.
Here’s what I’ve done so far:
- Created two fields:
- Salesperson (user_id - Many2one to res.users)
- Authorized Signature (x_studio_authorized_signature - Text field, read-only)
- Created an Automation Rule using the model sale.order and a server action that populates x_studio_authorized_signature with the salesperson’s name (user_id.name).
- Modified the Invoice report template to display the x_studio_authorized_signature field in a cursive font.
However, the signature is not appearing as expected in the printed invoices, and I encountered issues with automating the population of the signature field.
Error/Issue:
- The server action is giving a validation error when attempting to automatically update the signature field. The error is related to forbidden operations in Python (STORE_ATTR).
- The signature field doesn't appear in the printed report as intended, and the automation rule does not trigger successfully.
I’m looking for guidance on:
- How to correctly automate the process of assigning the salesperson’s name as a signature on invoices.
- Ensuring the signature is displayed in a cursive style on the printed invoice.
Any help or insight would be appreciated! Thank you.