Community mailing list archives
Re: Sales Journal Sequenceby
Hi, Thanks Quentin and Atchuthan for your reponse,
Here, attached the custom module that I wrote, I restarted my openerp server, and updated module's list, but the module doesn't appear, so as to install it, I think I should try somtheing else in depends parameter, in the _openerp_.py file.
Thanks in advance for your help.
2014-09-12 14:54 GMT+01:00 Houssine BAKKALI <firstname.lastname@example.org>:
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
Ingénieur SI technico-fonctionnel
TEL : 06-27333078