diff --git a/fusion_clock/models/res_company.py b/fusion_clock/models/res_company.py index 7672f667..0780fe43 100644 --- a/fusion_clock/models/res_company.py +++ b/fusion_clock/models/res_company.py @@ -11,6 +11,7 @@ class ResCompany(models.Model): x_fclk_nfc_kiosk_location_id = fields.Many2one( 'fusion.clock.location', string='NFC Kiosk Location', + domain="[('company_id', '=', id)]", help="Designates which fusion.clock.location is bound to the NFC kiosk " "for this company. Required when NFC kiosk is enabled.", ) diff --git a/fusion_clock/tests/test_nfc_models.py b/fusion_clock/tests/test_nfc_models.py index c9338434..4b3d1f79 100644 --- a/fusion_clock/tests/test_nfc_models.py +++ b/fusion_clock/tests/test_nfc_models.py @@ -88,7 +88,7 @@ class TestNfcAttendanceFields(TransactionCase): class TestNfcKioskCompanyField(TransactionCase): def test_company_has_nfc_kiosk_location(self): - company = self.env.company + company = self.env['res.company'].create({'name': 'NFC Test Co Plant'}) location = self.env['fusion.clock.location'].create({ 'name': 'Plant 1', 'latitude': 43.65,