def METHOD_NAME(self):
    partner_company1 = self.env["res.partner"].create(
        {
            "name": "TestDup",
            "siren": "444444442",
            "company_id": self.company1_id,
        }
    )
    partner_company2 = self.env["res.partner"].create(
        {
            "name": "TestDup",
            "siren": "444444442",
            "nic": "00016",
            "company_id": self.company2_id,
        }
    )
    self.assertFalse(partner_company1.same_siren_partner_id)
    self.assertFalse(partner_company2.same_siren_partner_id)
    partner_company2.write({"company_id": False})
    self.assertEqual(partner_company2.same_siren_partner_id, partner_company1)