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

I want to change the sequential field in the below image with a new field that I've created. Any idea on changing this one? Please advise.

For example: 

      the Header name of the example image below is 11000018 i want this header to be same as the above sequential name LocSO037. How will i going to do that if they use different class? any suggestions please

 

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

You have to go to Settings -> Technical -> Sequences &Identifiers -> Sequences and find Purchase Order record - you can change there to whatever you need it to be. 

For existing records, you would have to do that via database, ie. for this record it would be like 'UPDATE purchase_order SET name='xxx' where name='PO00002';

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

is there any way to do it in codes? do you have any idea? thanks in advance..

You have to modify function create in purchase_order model - it has name creation in it - check out lines 313-319 in this file - https://github.com/odoo/odoo/blob/master/addons/purchase/purchase.py