Adding test

This commit is contained in:
Antonio Espinosa
2016-03-04 16:33:41 +01:00
committed by Pedro M. Baeza
parent 266051882b
commit 57a282ee04
3 changed files with 49 additions and 1 deletions

View File

@@ -13,7 +13,10 @@ def post_init_hook(cr, registry):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
m_contract = env['account.analytic.account']
contracts = m_contract.search([('type', '=', 'contract')])
contracts = m_contract.search([
('type', '=', 'contract'),
('payment_mode_id', '=', False),
])
if contracts:
_logger.info('Setting payment mode: %d contracts' %
len(contracts))