How to create log note on creating new record for odoo
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
1350
Vistas
Hi Adrian
You can call the default function message post function in the create function of your model, If you need it in already existing models you can inherit the model and add the message post functionality, also you can use tracking=True for fields that track the changes for the fields in chatter
Check this code for reference
class ModelName(models.Model):
_name='custom.model'
@api.model_create_multi
def create(self, vals_list):
res = super(ModelName, self).create(vals_list)
res.message_post(body=_("record created"))
return res
For more references of message post
Regards
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse
Hi,
Check the related forum https://www.odoo.com/forum/help-1/creating-a-log-note-of-fields-when-creating-a-new-record-211418