openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #01667
Re: lp:~akretion-team/account-financial-tools/70-always-check-date into lp:account-financial-tools
Review: Needs Information
In __openerp__.py: s/additionnal/additional/
I'm uncomfortable with:
def __init__(self, pool, cr):
'''Activate 'Check Date in Period' on all existing journals'''
init_res = super(account_journal, self).__init__(pool, cr)
cr.execute("UPDATE account_journal SET allow_date=True")
return init_res
It updates all the account_journal with allow_date=True, only when a registry is initialized. It seems weird to me that the update is done on the __init__ of the model. IMO, it doesn't guarantee that an account journal have this field to True. If a new journal is created, it could be False until a new registry is built.
Couldn't it be safer, and more readable, to update the field in the create() and write() methods?
--
https://code.launchpad.net/~akretion-team/account-financial-tools/70-always-check-date/+merge/196398
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:account-financial-tools.
References