Community mailing list archives

community@mail.odoo.com

Re: Sales Journal Sequence

by
Yassine TEIMI
- 09/16/2014 10:41:53
Hi,

I've already done this, I restarted the openerp server, because changes are made on python file, I updated modules list also, but I get always the same screen I sent to you. I think that we should try something else than base, on depends.

Thank you very much.

2014-09-16 13:58 GMT+01:00 Atchuthan T U <atchuthantu@gmail.com>:
Hi Yassine,

Try using "Update Modules List" in the Settings menu.  If any changes are made in the __openerp__.py, we have the use "Update Modules List" to update the list info.

On Tue, Sep 16, 2014 at 4:02 PM, Yassine Teimi <yteimi01@gmail.com> wrote:
Hi Thanks a lot, 

But I wrote base on depends, and when I cheked the module, I found in the dependancy section base.ir_sequence. I also cheked your attachement it's the same code installed.

 Here is the screen I've got after installing the module.

Images intégrées 2

Thanks again

2014-09-16 11:13 GMT+01:00 Atchuthan T U <atchuthantu@gmail.com>:
Hi Yassine,

      In depends, we should only add the module name.  So, set 'depends': ['base'].
If the custom module is not shown in the Installed modules window, click on "UPDATE MODULES LIST" menu and install the module at Installed Modules.

Also,
base.ir_sequence is not a module.  It is a package available in BASE module, so we have to add "base" in depends

Note: Please check my attachment that i have added in the previous e-mail.

On Mon, Sep 15, 2014 at 1:53 PM, Yassine Teimi <yteimi01@gmail.com> wrote:
Hi Atchuthan, 

Thank you for your reply, I fixed the file name error, I tried to install it, it tells me that I'm trying to install a module, wich depends on base.ir_sequence, 
and this module doesn't exist on my system.

The base Module is obviously installed, but I noticed in the dependance module status "base.ir_sequence" : Unkown.

Could you please figure this out.

Regards.

2014-09-15 7:15 GMT+01:00 Atchuthan T U <atchuthantu@gmail.com>:
Hi Yassine,

There was one more mistake in your coding.  The file names created were _init_.py and _openerp_.py, but it should be __init__.py and __openerp__.py.
It has double under score in front and back of both init and openerp

On Mon, Sep 15, 2014 at 11:31 AM, Atchuthan T U <atchuthantu@gmail.com> wrote:
Hi Yassine,

      In depends, we should only add the module name.  So, set 'depends': ['base'].
If the custom module is not shown in the Installed modules window, click on "UPDATE MODULES LIST" menu and install the module at Installed Modules.


On Sun, Sep 14, 2014 at 10:15 PM, Yassine Teimi <yteimi01@gmail.com> wrote:

Here is the custom module's files, 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.

_init_.py
import ir_sequence



_openerp_.py
{
    'name': 'sequence_month_before',
    'category': '',
    'author': 'TEIMI Yassine',
    'version': '1.0',
    'website' : '',
'depends': ['ir_sequence'],
    'description': """ Ce module crée une séquence permettant de numéroter avec le mois précédent """,
'active': False,
'data': [
     ],
'installable': True,
    'auto_install' : False,
}


from openerp.osv import orm
from datetime import datetime
from dateutil.relativedelta import *

class ir_sequence(orm.Model):
    _inherit = 'ir.sequence'
    
    def _interpolation_dict(self):
        res = super(ir_sequence, self)._interpolation_dict()
        res['month1before']=datetime.strftime(datetime.today() - relativedelta(months=1), '%m')
        return res
ir_sequence()





2014-09-14 17:17 GMT+01:00 <postmaster@eldi.be>:
You're mail will be quarantined and examined before delivery.

_______________________________________________




--


Yassine TEIMI

Ingénieur SI technico-fonctionnel

TEL : 06-27333078

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--


Yassine TEIMI

Ingénieur SI technico-fonctionnel

TEL : 06-27333078

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--


Yassine TEIMI

Ingénieur SI technico-fonctionnel

TEL : 06-27333078

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--


Yassine TEIMI

Ingénieur SI technico-fonctionnel

TEL : 06-27333078