Hello,
I am struggling to add some dynamic fields to an invoice. The use case here is to add the SIREN of the customer on the invoice automatically on the invoice when it is added in the contact section. Can you help here ? Thank you
Hello,
I am struggling to add some dynamic fields to an invoice. The use case here is to add the SIREN of the customer on the invoice automatically on the invoice when it is added in the contact section. Can you help here ? Thank you
Hi,Try this code:
class AccountInvoice(models.Model):
_inherit = 'account.move'
partner_siren = fields.Char(related='partner_id.siren', string='Customer SIREN', store=True)
Then Update
the invoice view to display the new field. Remember to adapt the code
and XML examples according to your specific needs and the Odoo version
you are using.
Hope it helps
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.