forked from Yaltik/golem
[FIX]GOLEM Resource Pack : tests adaptations and fixes after refactoring
This commit is contained in:
parent
b855e1436e
commit
6ccf24e485
@ -69,6 +69,7 @@ class TestGolemResourcePack(TransactionCase):
|
||||
})
|
||||
self.pack_obj = self.env['golem.resource.pack']
|
||||
self.pack_data = {
|
||||
'name': 'Pack Test',
|
||||
'partner_id': self.partner.id
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ class GolemResourcePack(models.Model):
|
||||
if pack.state != 'validated':
|
||||
raise ValidationError(_('The current pack is not validated, please validate '
|
||||
'it before creating invoice'))
|
||||
elif not pack.is_products_set:
|
||||
elif not pack.are_products_set:
|
||||
raise ValidationError(_('You can not create an invoice for a pack without '
|
||||
'linked product on every resource reserved.'))
|
||||
elif pack.invoice_id.id:
|
||||
|
@ -80,6 +80,7 @@ class TestGolemResourcePack(TransactionCase):
|
||||
#set pack env
|
||||
self.pack_obj = self.env['golem.resource.pack']
|
||||
self.pack_data = {
|
||||
'name': 'Pack test',
|
||||
'partner_id': self.partner_1.id,
|
||||
'reservation_ids': [(4, self.reservation_1.id, 0),
|
||||
(4, self.reservation_2.id, 0)]}
|
||||
|
Loading…
Reference in New Issue
Block a user