Community mailing list archives
Re: Sales Journal Sequenceby
Hi Guys,I'm maybe wrong but this basic question shouldn't be asked on odoo forum ?
2014-09-12 14:34 GMT+02:00 Quentin THEURET <email@example.com>:
On 11/09/14 10:56, Yassine Teimi wrote: > Hello Everybody, > > I want to give my invoices a number like : *(actual month -1)/invoice > Serial number*, for example, this is month 9, I want that the system > gives my invoices a number like *08/39000,* I can now only give my > invoices a number like : *09/39000* > > I tried in the prefix to do : %((month)s-1) but the minus 1 does'nt work. Hello, To do this, you have to override the method '_interpolation_dict()' of the 'ir.sequence' object to take account of a new key for current_month -1. It is this method that change the %(month)s into the number of current month. The %(month)s-1 doesn't work because _interpolation_dict return a dictionary with strings as values. Regards, -- Quentin THEURET TeMPO Consulting 20, Avenue de la paix 67000 Strasbourg France http://www.tempo-consulting.fr Tel : +33 3 88 56 82 18 Fax : +33 9 70 63 35 46