mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
Adding test
This commit is contained in:
committed by
Pedro M. Baeza
parent
266051882b
commit
57a282ee04
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user