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

Hi all,

I am trying to find solution to add unique identifier for each contact that exists and that will be added in the future (db is v14). I had no luck so far, I see that here is some kind of solution but it's not explained https://www.odoo.com/forum/help-1/how-to-add-a-customer-id-64724

Can anyone please help. Thank you.

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

You can create sequence. 

Then you can assign this sequence using automated action  on create or edit or on change of specific field. 

Ảnh đại diện
Huỷ bỏ
Tác giả

Yes, I did it using sequence - here is post I found that really helped me https://www.odoo.com/forum/help-1/odoo-13-doesn-t-generate-a-sequence-number-167850

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

Hi,

See an sample use case with sequence and automated section generating unique barcode for products, similarly you can do for contacts in existing fields like or in new field.

Sequential value using automated action: https://www.youtube.com/watch?v=OCLGODE6lU0


Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả

Video is not available but I was able to do it using sequence

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

Each contact already has an internal odoo id, so you could just create a new view on the contact showing that field.

Ảnh đại diện
Huỷ bỏ
Tác giả

I'm curious, how to get that field, what is its name?

I was thinking of 'id' when inside model 'res.user', but maybe there are other ids.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 21
7279
3
thg 9 25
2714
0
thg 8 25
316
1
thg 8 25
2332
2
thg 7 25
8138