Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Aug 7, 2023
1 parent 54c62fe commit abaa619
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,17 @@ def test_commission_domain(self):
demo_cig_spain = self.env.ref(
"sale_commission_product_criteria_domain.demo_cig_spain"
)
demo_cig_italy = self.env.ref(
"sale_commission_product_criteria_domain.demo_cig_italy"
)
# group must have commission of CI
demo_crr_item_1.group_id.commission_ids = False
demo_crr_item_1.write({"sequence": 2})
self.assertTrue(demo_crr_item_1.group_id.commission_ids)

# count related agents
demo_cig_spain._compute_agents_count()
self.assertEqual(demo_cig_spain.agents_count, 2)
demo_cig_italy._compute_agents_count()
self.assertEqual(demo_cig_italy.agents_count, 1)

# if commission is not type of restricted then CI must have no group
demo_crr_item_1.commission_id = self.env.ref(
Expand Down

0 comments on commit abaa619

Please sign in to comment.