Skip to content

Commit

Permalink
[IMP] account_partner_required: make test use [ids] for write
Browse files Browse the repository at this point in the history
Some other modules such as account_constraints require it.
  • Loading branch information
sbidoul committed Oct 29, 2014
1 parent c6690da commit f93c14a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,21 @@ def test_always_remove_partner(self):
self._set_partner_policy('always')
line_id = self._create_move(with_partner=True)
with self.assertRaises(orm.except_orm):
self.move_line_obj.write(self.cr, self.uid, line_id,
self.move_line_obj.write(self.cr, self.uid, [line_id],
{'partner_id': False})

def test_change_account(self):
self._set_partner_policy('always', aref='account.a_pay')
line_id = self._create_move(with_partner=False)
# change account to a_pay with policy always but missing partner
with self.assertRaises(orm.except_orm):
self.move_line_obj.write(self.cr, self.uid, line_id,
self.move_line_obj.write(self.cr, self.uid, [line_id],
{'account_id': self.ref('account.a_pay')})
# change account to a_pay with policy always with partner -> ok
self.move_line_obj.write(
self.cr,
self.uid,
line_id,
[line_id],
{
'account_id': self.ref('account.a_pay'),
'partner_id': self.ref('base.res_partner_1')
Expand Down

0 comments on commit f93c14a

Please sign in to comment.