İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3844 Görünümler

In Odoo 12, is it possible for say Sales Order/Quotation number SO021 to continue through to Invoice number SO021 or even INV021 so that they are in sync?

Avatar
Vazgeç
En İyi Yanıt

Yes possible, Check out the cases

Case 1: Pre-Set Invoice Number

you can pass Order Reference to MoveName field present in Invoice Obj, which will ensure you get the same number as Invoice Number when you validate. However this method is best suited for 1 Invoice per Sale Order scenarios only. I.e w.r.t Partial Invoicing, chances are high, single SaleOrder can be split & multiple Invoices would be generated, thus during such scenarios, this might possibly fail. Hence in order to have foolproof logic, better to go with Custom Invoice-numbering (case 2)

Case 2: Custom Invoice Number (Highly Recommended)

Upon Validate, Invoice number gets generated & allocated. All you need is, override that method, such that it refers to your Custom-Number.

Tips:

1. As per your requirement, define a Number which is combination of IrSequence & SourceDoc for CustomerInvoice. 

2. Ensure SourceDoc is not edited by any User. Or to be on safer side, you can additionally pass SaleOrder Reference into Invoice, via a separate custom field, use the same to server the purpose.

3. Ensure Custom-Number added in Customer Invoice, doesn't affect other records, such as Customer CreditNote, VendorBills etc.


Hope you got idea.

Avatar
Vazgeç
Üretici

Thanks Deep. As I am a new user to Odoo (a week old in fact!) and first time poster to this forum, thank you for such a speedy response :)

Yes I think I understand your Case2 logic however implementation sounds tricky unless I have coding knowledge. Do you think I can implement via Studio via copy and pasting some simple code somewhere or is it more than that? Are you able to point me to any tutorials for Odoo Studio coding?

It is more than tricky, because there are so many possible different cases from a business workflow perspective. IMHO it is not worth the effort.

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ara 23
15459
0
Eki 23
33
3
Eki 23
790
1
Eki 23
569
1
Ağu 23
2859