Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Sep 15, 2023
1 parent 1cd606f commit 82176d7
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,16 @@ def test_commission_domain(self):
self.assertEqual(so.order_line.agent_ids.amount, 0)
self.assertEqual(invoice.line_ids.agent_ids.amount, 0)

# check constraint: group_ids must be set
with self.assertRaises(odoo.exceptions.ValidationError):
self.env["commission.item.agent"].create(
{
"group_ids": False,
"agent_id": 1,
"partner_id": 1,
}
)

def _create_sale_order(self, product, partner):
return self.sale_order_model.create(
{
Expand Down

0 comments on commit 82176d7

Please sign in to comment.