Hi, I know we can create a log note when some fields are changed by using tracking=True / track_visibility='onchange', but I can't seem to find the way to create a log note when creating new records
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
In odoo, there is a default function named “message_ post” and this is used for message post on chatter.
In your case you can post the message to chatter on the create function. There are many arguments used along with this function such as attachment_ids,message_type,partner_ids,author_id,email_from,body etc.
For detailed explanation refer thisOdoo Message Post Function || Add Message To Chatter From Code in Odoo
Hope this will help you
Thank you
Hi,
you can post message to chatter with constrains, it will create log note when create a new record or onchange this field.
@api.constrains('field_name')
def chatt(self):
self.message_post(body=self.field_name,subject="anything")
Hope this will help you.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký