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

I would like to automatically generate the customer reference when I save a new customer in my database. I have lots of customers and it would help when interacting with them. How can I do that?

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

The "customer reference" field is mostly used to store historical references from previous software.

If you need a similar mechanism in Odoo to improve the customer relationship, I would use the "id" field (of "res.partner" object). It increments automatically as you create new contacts (1 -> ...). You can add it to the email using placeholders, you can display it in the printed documents, you can type it in the URL to directly open the related contact form when interacting with them, or even use it in quick searches of search views.

You can find an example of this in the Helpdesk app. Ticket ref is the record ID.

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

install

https://github.com/OCA/partner-contact/tree/14.0/partner_ref_unique

in company set partner_ref_unique = all


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 24
2081
0
thg 8 24
196
1
thg 11 23
3363
1
thg 4 24
2944
0
thg 5 20
3037