Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2722 มุมมอง

How can generate automatically barcode for any new product on odoo online 18 ?

อวตาร
ละทิ้ง

The Automated Actions in Odoo 18 is changed significantly and doesn't match the YouTube video. If someone can post a new video will help

ผู้เขียน

Thank you all

คำตอบที่ดีที่สุด

Hi there,

I used the same video but made a slight change. I managed to get this working by changing the trigger to "On save". You might be wondering why "On save"? It's because a product can be saved multiple times. Don't worry, we've got that covered with an if condition.

Here's the Code Used: for record in records: if not record['barcode']: record['barcode'] = env['ir.sequence'].next_by_code('product.barcode')

please don't forget to vote - it really helps to select the best questions and answers!

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
By a sequence and using automated action, you can achieve it:  Generate Barcode For Products Using Automated Action In Odoo

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Hicham Ghilani,

Here’s a link with more information on automatically generating product barcodes in Odoo Online v16: Automatically Generate Product Barcode Numbers in Odoo.

Let me know if it helps! 😊

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
พ.ย. 24
6874
2
ก.ย. 25
281
2
ก.ย. 25
486
0
ก.พ. 25
1619
0
ม.ค. 25
46