Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
2528 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

Thank you all

Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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! 😊

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 11 24
6470
2
thg 9 25
294
0
thg 2 25
1482
0
thg 12 24
46
0
thg 12 24
1298