Skip to content

Commit 6bc067f

Browse files
committed
[18.0][TEST] pos_operating_unit: OU coverage assignment via write
1 parent 84038d6 commit 6bc067f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pos_operating_unit/tests/test_pos_operating_unit_basic.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ def test_fields_and_assign(self):
3434
}
3535
)
3636
self.assertIn(self.ou, cfg.operating_unit_ids)
37+
38+
def test_operating_unit_assignment_via_write(self):
39+
"""Ensure operating_unit_ids can be set via write and read back correctly."""
40+
cfg = self.env["pos.config"].create(
41+
{"name": "POS Write Test", "company_id": self.company.id}
42+
)
43+
self.assertFalse(cfg.operating_unit_ids)
44+
cfg.write({"operating_unit_ids": [Command.set([self.ou.id])]})
45+
self.assertIn(self.ou, cfg.operating_unit_ids)

0 commit comments

Comments
 (0)