Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
4227 Представления

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.

Аватар
Отменить
Лучший ответ

You can create sequence. 

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

Аватар
Отменить
Автор

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

Лучший ответ

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

Аватар
Отменить
Автор

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

Лучший ответ

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

Аватар
Отменить
Автор

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.

Related Posts Ответы Просмотры Активность
1
февр. 21
7235
0
авг. 25
175
1
авг. 25
2130
1
июл. 25
2618
2
июл. 25
8035