Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3853 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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.

Post correlati Risposte Visualizzazioni Attività
2
dic 23
15469
0
ott 23
33
3
ott 23
790
1
ott 23
569
1
ago 23
2868