← Back to team overview

openerp-community-reviewer team mailing list archive

Re: lp:~akretion-team/account-financial-tools/70-currency-rate-date-check into lp:account-financial-tools

 

Review: Needs Fixing code review, no test

According community guides, please correct these issues:

- PEP8 compliant code.
- In __init__.py, use the form "from . import xxx".
- Use orm instead of osv (for osv.Model or orm_exception).
- Rename translation template to .pot to be used automatically by Launchpad.
- Use normalized form of initialising context at the begining of the method "context = context or {}" and you'll save any check on context itself.
- Remove commented prints to cleanup code.
- For greater than an amount, you can use _sql_constraints instead of _constraints and you'll save a method and improve performance:

    _sql_constraints = [
        ('currency_rate_max_delta_limit', 'CHECK (currency_rate_max_delta >= 0)', 'The value must be positive or 0'),",
    ]

Regards.
-- 
https://code.launchpad.net/~akretion-team/account-financial-tools/70-currency-rate-date-check/+merge/187009
Your team OpenERP Community Reviewer is subscribed to branch lp:account-financial-tools.


References