In Odoo 15, is it possible to post a message to the product page of the product listed in product_id for an MO, from an an automated action with model of mrp.production?
I tried:
record.product_id.message_post(body=message, message_type='comment', subtype_xmlid='mail.mt_comment')
This posted a message in the chatter of the product but only if you click through from the MO (which shows the abbreviated version of the product page). It does not post a message on the actual product page.
Thanks, -=Will
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Hi Will:
product_id references the product.product (product variant) model. Your code will post the message to the product variant. If you want to post the message to the product template, you will need to modify the code to the following:
record.product_id.product_tmpl_id.message_post(body=message, message_type='comment', subtype_xmlid='mail.mt_comment')
Just keep in mind that if you edit the product.template you are editing the real product, and not only the one related to your MO. If this is fine, Pareshs way is right.
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
ก.ย. 24
|
1393 | ||
|
0
พ.ค. 24
|
26 | ||
|
1
เม.ย. 24
|
4809 | ||
|
0
มี.ค. 24
|
1698 | ||
|
0
มี.ค. 24
|
1721 |