Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
5425 Ansichten

The default Invoice name that is printing on the PDF is of the format:

INV/2020/1208 for example. I'm trying to get rid of the 2020, I'm looking to just achieve INV/1208 as the heading. 


The code for this section in the Odoo account.report_invoice_document is as follows:

<h2>

                        <span t-if="o.type == 'out_invoice' and o.state == 'posted'">Invoice</span>

                        <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>

                        <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>

                        <span t-if="o.type == 'out_refund'">Credit Note</span>

                        <span t-if="o.type == 'in_refund'">Vendor Credit Note</span>

                        <span t-if="o.type == 'in_invoice'">Vendor Bill</span>

                        <span t-if="o.name != '/'" t-field="o.name"/>

</h2>


What is the best and efficient solution to achieve this?

Thank you for your time.

Avatar
Verwerfen
Beste Antwort

Hi U.K.:

The Invoice number/name format is controlled by the Sequences setting. You can change the format by doing the following:

Go to Settings > General Settings, scroll all the way down and click on Activate the developer mode 

Go to Settings > Technical > Sequences & Identifiers > Sequences and search for INV Sequence 

Edit the sequence for your company and make the following changes:

  1. Change the value in the Prefix field to INV/  by removing %(range_year)s/ . This will remove the 2020/ part of the Invoice number.

  2. Uncheck the Use subsequences per date_range checkbox so that the system generates continuous numbers across years (since year is no longer a part of the Invoice number). If you skip this step, you will end up with duplicate Invoice numbers every year.

Here's a sample screenshot of the Sequences form before making the changes


Here's a sample screenshot after making the changes


Avatar
Verwerfen

I try it and still dont work on V14 / V15

Beste Antwort

For that you can use this field "Save as Attachment Prefix" from Report menu.

See here: 

Put Prefix value as : 'Quotation_Order - '+time.strftime('%Y-%m-%d')

After setting this you will find your changes here:


Hope this will help you...


Regards

MUHAMMAD IMRAN
Technical and Functional Consultant  (ODOO)


Softtar Technologies Pvt. Ltd. Contact : Pakistan (+92)-3037701373
 
Address:
  
Allhafeez Shopping Mall
Lahore
Pakistan  (Branch Office)
http://sofftar.com
Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Nov. 20
5367
6
Juli 22
40069
0
Juni 20
2590
1
Mai 20
9588
3
Jan. 20
8073