Not possible to add an already existing account

bzr revid: nicolas.vanhoren@openerp.com-20121008124429-j65gc8s6jb4a8u8f
This commit is contained in:
niv-openerp
2012-10-08 14:44:29 +02:00
parent ea356b175b
commit 46b112f129
@@ -188,7 +188,12 @@ openerp.hr_timesheet_sheet = function(instance) {
attrs: {
name: "account",
type: "many2one",
domain: [['type','in',['normal', 'contract']], ['state', '<>', 'close'], ['use_timesheets','=',1]],
domain: [
['type','in',['normal', 'contract']],
['state', '<>', 'close'],
['use_timesheets','=',1],
['id', 'not in', _.pluck(self.accounts, "account")],
],
modifiers: '{"required": true}',
},
});