2
0

[FIX][account_asset_management] Avoid to select closed or cancelled analytic account

This commit is contained in:
Adrien Peiffer (ACSONE) 2015-08-19 13:48:28 +02:00 committed by Rodrigo
parent 56f432386c
commit 2bce9d2b24
47 changed files with 57269 additions and 27568 deletions

View File

@ -69,7 +69,8 @@ class account_asset_category(orm.Model):
'note': fields.text('Note'), 'note': fields.text('Note'),
'account_analytic_id': fields.many2one( 'account_analytic_id': fields.many2one(
'account.analytic.account', 'Analytic account', 'account.analytic.account', 'Analytic account',
domain=[('type', '!=', 'view')]), domain=[('type', '!=', 'view'),
('state', 'not in', ('close', 'cancelled'))]),
'account_asset_id': fields.many2one( 'account_asset_id': fields.many2one(
'account.account', 'Asset Account', required=True, 'account.account', 'Asset Account', required=True,
domain=[('type', '=', 'other')]), domain=[('type', '=', 'other')]),
@ -1103,7 +1104,8 @@ class account_asset_asset(orm.Model):
store=True, readonly=True,), store=True, readonly=True,),
'account_analytic_id': fields.many2one( 'account_analytic_id': fields.many2one(
'account.analytic.account', 'Analytic account', 'account.analytic.account', 'Analytic account',
domain=[('type', '!=', 'view')]), domain=[('type', '!=', 'view'),
('state', 'not in', ('close', 'cancelled'))]),
} }
_defaults = { _defaults = {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff