look i have access.csv and groups.xml in my odoo17 enterprise project and i need record rules with localization scopes, i will provide my access.csv and group.xml and in addition i will provide an incomplete and containing some logical issues record rules and you need to make it right and complete: id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_card_user,access.card.user,model_card,base.group_user,1,1,1,1
access_announcement_user,access.announcement.user,model_announcement,base.group_user,1,1,1,1
access_gift_user,access.gift.user,model_gift,base.group_user,1,1,1,1
access_notification_user,access.notification.user,model_notification,base.group_user,1,1,1,1
access_option_user,access.option.user,model_option,base.group_user,1,1,1,1
access_questionnaire_user,access.questionnaire.user,model_questionnaire,base.group_user,1,1,1,1
access_user_question_option_user,access.user.question.option.user,model_user_question_option,base.group_user,1,1,1,1
access_res_users_user,access.res.users.user,base.model_res_users,base.group_user,1,1,1,1
access_question_user,access.question.user,model_question,base.group_user,1,1,1,1
access_user_question_user,access.user.question.user,mahallam.model_user_question,base.group_user,1,1,1,1
access_user_questionnaire_user,access.user.questionnaire.user,mahallam.model_user_questionnaire,base.group_user,1,1,1,1
access_mahallam_application_user,access.mahallam.application.user,mahallam.model_mahallam_application,base.group_user,1,1,1,1
access_paylov_transaction_history_user,access.paylov.transaction.history.user,model_paylov_transaction_history,base.group_user,1,1,1,1
access_model_history_manager_user,access.model.history.manager.user,model_model_history,base.group_system,1,1,1,1
access_mobile_translation_user,access.mobile.translation.user,mahallam.model_mobile_translation,base.group_user,1,1,1,1
access_mahallam_application_media_user,access.mahallam.application.media.user,mahallam.model_mahallam_application_media,base.group_user,1,1,1,1
access_mahallam_application_category_user,access.mahallam.application.category.user,mahallam.model_mahallam_application_category,base.group_user,1,1,1,1
access_user_device_user,access.user.device.user,mahallam.model_user_device,base.group_user,1,1,1,1

access_mahallam_contact_info_user,access.contact.info.user,model_contact_info,base.group_user,1,0,0,0
access_mahallam_contact_info_admin,access.contact.info.admin,model_contact_info,base.group_system,1,1,1,1
access_mahallam_faq_user,access.faq.user,model_faq,base.group_user,1,0,0,0
access_mahallam_faq_admin,access.faq.admin,model_faq,base.group_system,1,1,1,1
access_mobile_onboarding_user,access.mobile.onboarding.user,mahallam.model_mobile_onboarding,base.group_user,1,0,0,0
access_mobile_onboarding_admin,access.mobile.onboarding.admin,mahallam.model_mobile_onboarding,base.group_system,1,1,1,1
access_mobile_onboarding_image_user,access.mobile.onboarding.image.user,mahallam.model_mobile_onboarding_image,base.group_user,1,0,0,0
access_mobile_onboarding_image_admin,access.mobile.onboarding.image.admin,mahallam.model_mobile_onboarding_image,base.group_system,1,1,1,1
access_profile_notifications_user,access.profile.notifications.user,model_profile_notifications,base.group_user,1,1,1,1
access_profile_notifications_admin,access.profile.notifications.admin,model_profile_notifications,base.group_system,1,1,1,1
access_application_state_user,access.application.state.user,model_mahallam_application_state,base.group_user,1,1,1,1
access_application_media_user,access.application.media.user,model_mahallam_application_media,base.group_user,1,1,1,1
access_application_category_user,access.application.category.user,model_mahallam_application_category,base.group_user,1,1,1,1
access_application_subcategory_user,access.application.subcategory.user,model_mahallam_application_subcategory,base.group_user,1,1,1,1

access_card_super_admin,access.card.super_admin,model_card,mahallam.group_super_admin,1,1,1,1
access_announcement_super_admin,access.announcement.super_admin,model_announcement,mahallam.group_super_admin,1,1,1,1
access_gift_super_admin,access.gift.super_admin,model_gift,mahallam.group_super_admin,1,1,1,1
access_notification_super_admin,access.notification.super_admin,model_notification,mahallam.group_super_admin,1,1,1,1
access_option_super_admin,access.option.super_admin,model_option,mahallam.group_super_admin,1,1,1,1
access_questionnaire_super_admin,access.questionnaire.super_admin,model_questionnaire,mahallam.group_super_admin,1,1,1,1
access_user_question_option_super_admin,access.user.question.option.super_admin,model_user_question_option,mahallam.group_super_admin,1,1,1,1
access_res_users_super_admin,access.res.users.super_admin,base.model_res_users,mahallam.group_super_admin,1,1,1,1
access_question_super_admin,access.question.super_admin,model_question,mahallam.group_super_admin,1,1,1,1
access_user_question_super_admin,access.user.question.super_admin,mahallam.model_user_question,mahallam.group_super_admin,1,1,1,1
access_user_questionnaire_super_admin,access.user.questionnaire.super_admin,mahallam.model_user_questionnaire,mahallam.group_super_admin,1,1,1,1
access_mahallam_application_super_admin,access.mahallam.application.super_admin,mahallam.model_mahallam_application,mahallam.group_super_admin,1,1,1,1
access_paylov_transaction_history_super_admin,access.paylov.transaction.history.super_admin,model_paylov_transaction_history,mahallam.group_super_admin,1,1,1,1
access_model_history_manager_super_admin,access.model.history.manager.super_admin,model_model_history,mahallam.group_super_admin,1,1,1,1
access_mobile_translation_super_admin,access.mobile.translation.super_admin,mahallam.model_mobile_translation,mahallam.group_super_admin,1,1,1,1
access_mahallam_application_media_super_admin,access.mahallam.application.media.super_admin,mahallam.model_mahallam_application_media,mahallam.group_super_admin,1,1,1,1
access_mahallam_application_category_super_admin,access.mahallam.application.category.super_admin,mahallam.model_mahallam_application_category,mahallam.group_super_admin,1,1,1,1
access_user_device_super_admin,access.user.device.super_admin,mahallam.model_user_device,mahallam.group_super_admin,1,1,1,1

access_card_moderator,access.card.moderator,model_card,mahallam.group_moderator,1,1,1,1
access_announcement_moderator,access.announcement.moderator,model_announcement,mahallam.group_moderator,1,1,1,1
access_gift_moderator,access.gift.moderator,model_gift,mahallam.group_moderator,1,1,1,1
access_notification_moderator,access.notification.moderator,model_notification,mahallam.group_moderator,1,1,1,1
access_option_moderator,access.option.moderator,model_option,mahallam.group_moderator,1,1,1,1
access_questionnaire_moderator,access.questionnaire.moderator,model_questionnaire,mahallam.group_moderator,1,1,1,1
access_user_question_option_moderator,access.user.question.option.moderator,model_user_question_option,mahallam.group_moderator,1,1,1,1
access_res_users_moderator,access.res.users.moderator,base.model_res_users,mahallam.group_moderator,1,1,1,1
access_question_moderator,access.question.moderator,model_question,mahallam.group_moderator,1,1,1,1
access_user_question_moderator,access.user.question.moderator,mahallam.model_user_question,mahallam.group_moderator,1,1,1,1
access_user_questionnaire_moderator,access.user.questionnaire.moderator,mahallam.model_user_questionnaire,mahallam.group_moderator,1,1,1,1
access_mahallam_application_moderator,access.mahallam.application.moderator,mahallam.model_mahallam_application,mahallam.group_moderator,1,1,1,1
access_paylov_transaction_history_moderator,access.paylov.transaction.history.moderator,model_paylov_transaction_history,mahallam.group_moderator,1,1,1,1
access_model_history_manager_moderator,access.model.history.manager.moderator,model_model_history,mahallam.group_moderator,1,1,1,1
access_mobile_translation_moderator,access.mobile.translation.moderator,mahallam.model_mobile_translation,mahallam.group_moderator,1,1,1,1
access_mahallam_application_media_moderator,access.mahallam.application.media.moderator,mahallam.model_mahallam_application_media,mahallam.group_moderator,1,1,1,1
access_mahallam_application_category_moderator,access.mahallam.application.category.moderator,mahallam.model_mahallam_application_category,mahallam.group_moderator,1,1,1,1
access_user_device_moderator,access.user.device.moderator,mahallam.model_user_device,mahallam.group_moderator,1,1,1,1

access_card_reader,access.card.reader,model_card,mahallam.group_reader,1,0,0,0
access_announcement_reader,access.announcement.reader,model_announcement,mahallam.group_reader,1,0,0,0
access_gift_reader,access.gift.reader,model_gift,mahallam.group_reader,1,0,0,0
access_notification_reader,access.notification.reader,model_notification,mahallam.group_reader,1,0,0,0
access_option_reader,access.option.reader,model_option,mahallam.group_reader,1,0,0,0
access_questionnaire_reader,access.questionnaire.reader,model_questionnaire,mahallam.group_reader,1,0,0,0
access_user_question_option_reader,access.user.question.option.reader,model_user_question_option,mahallam.group_reader,1,0,0,0
access_res_users_reader,access.res.users.reader,base.model_res_users,mahallam.group_reader,1,0,0,0
access_question_reader,access.question.reader,model_question,mahallam.group_reader,1,0,0,0
access_user_question_reader,access.user.question.reader,mahallam.model_user_question,mahallam.group_reader,1,0,0,0
access_user_questionnaire_reader,access.user.questionnaire.reader,mahallam.model_user_questionnaire,mahallam.group_reader,1,0,0,0
access_mahallam_application_reader,access.mahallam.application.reader,mahallam.model_mahallam_application,mahallam.group_reader,1,0,0,0
access_paylov_transaction_history_reader,access.paylov.transaction.history.reader,model_paylov_transaction_history,mahallam.group_reader,1,0,0,0
access_model_history_manager_reader,access.model.history.manager.reader,model_model_history,mahallam.group_reader,1,0,0,0
access_mobile_translation_reader,access.mobile.translation.reader,mahallam.model_mobile_translation,mahallam.group_reader,1,0,0,0
access_mahallam_application_media_reader,access.mahallam.application.media.reader,mahallam.model_mahallam_application_media,mahallam.group_reader,1,0,0,0
access_mahallam_application_category_reader,access.mahallam.application.category.reader,mahallam.model_mahallam_application_category,mahallam.group_reader,1,0,0,0
access_user_device_reader,access.user.device.reader,mahallam.model_user_device,mahallam.group_reader,1,0,0,0

access_card_republic_moderator,access.card.republic_moderator,model_card,mahallam.group_republic_moderator,1,1,1,1
access_announcement_republic_moderator,access.announcement.republic_moderator,model_announcement,mahallam.group_republic_moderator,1,1,1,1
access_gift_republic_moderator,access.gift.republic_moderator,model_gift,mahallam.group_republic_moderator,1,1,1,1
access_notification_republic_moderator,access.notification.republic_moderator,model_notification,mahallam.group_republic_moderator,1,1,1,1
access_option_republic_moderator,access.option.republic_moderator,model_option,mahallam.group_republic_moderator,1,1,1,1
access_questionnaire_republic_moderator,access.questionnaire.republic_moderator,model_questionnaire,mahallam.group_republic_moderator,1,1,1,1
access_user_question_option_republic_moderator,access.user.question.option.republic_moderator,model_user_question_option,mahallam.group_republic_moderator,1,1,1,1
access_res_users_republic_moderator,access.res.users.republic_moderator,base.model_res_users,mahallam.group_republic_moderator,1,1,1,1
access_question_republic_moderator,access.question.republic_moderator,model_question,mahallam.group_republic_moderator,1,1,1,1
access_user_question_republic_moderator,access.user.question.republic_moderator,mahallam.model_user_question,mahallam.group_republic_moderator,1,1,1,1
access_user_questionnaire_republic_moderator,access.user.questionnaire.republic_moderator,mahallam.model_user_questionnaire,mahallam.group_republic_moderator,1,1,1,1
access_mahallam_application_republic_moderator,access.mahallam.application.republic_moderator,mahallam.model_mahallam_application,mahallam.group_republic_moderator,1,1,1,1
access_paylov_transaction_history_republic_moderator,access.paylov.transaction.history.republic_moderator,model_paylov_transaction_history,mahallam.group_republic_moderator,1,1,1,1
access_model_history_manager_republic_moderator,access.model.history.manager.republic_moderator,model_model_history,mahallam.group_republic_moderator,1,1,1,1
access_mobile_translation_republic_moderator,access.mobile.translation.republic_moderator,mahallam.model_mobile_translation,mahallam.group_republic_moderator,1,1,1,1
access_mahallam_application_media_republic_moderator,access.mahallam.application.media.republic_moderator,mahallam.model_mahallam_application_media,mahallam.group_republic_moderator,1,1,1,1
access_mahallam_application_category_republic_moderator,access.mahallam.application.category.republic_moderator,mahallam.model_mahallam_application_category,mahallam.group_republic_moderator,1,1,1,1
access_user_device_republic_moderator,access.user.device.republic_moderator,mahallam.model_user_device,mahallam.group_republic_moderator,1,1,1,1
access_mahallam_contact_info_republic_moderator,access.contact.info.republic_moderator,model_contact_info,mahallam.group_republic_moderator,1,1,1,1
access_mahallam_faq_republic_moderator,access.faq.republic_moderator,model_faq,mahallam.group_republic_moderator,1,1,1,1
access_mobile_onboarding_republic_moderator,access.mobile.onboarding.republic_moderator,mahallam.model_mobile_onboarding,mahallam.group_republic_moderator,1,1,1,1
access_mobile_onboarding_image_republic_moderator,access.mobile.onboarding.image.republic_moderator,mahallam.model_mobile_onboarding_image,mahallam.group_republic_moderator,1,1,1,1
access_profile_notifications_republic_moderator,access.profile.notifications.republic_moderator,model_profile_notifications,mahallam.group_republic_moderator,1,1,1,1
access_application_state_republic_moderator,access.application.state.republic_moderator,model_mahallam_application_state,mahallam.group_republic_moderator,1,1,1,1
access_application_media_republic_moderator,access.application.media.republic_moderator,model_mahallam_application_media,mahallam.group_republic_moderator,1,1,1,1
access_application_category_republic_moderator,access.application.category.republic_moderator,model_mahallam_application_category,mahallam.group_republic_moderator,1,1,1,1
access_application_subcategory_republic_moderator,access.application.subcategory.republic_moderator,model_mahallam_application_subcategory,mahallam.group_republic_moderator,1,1,1,1

access_card_region_moderator,access.card.region_moderator,model_card,mahallam.group_region_moderator,1,1,1,1
access_announcement_region_moderator,access.announcement.region_moderator,model_announcement,mahallam.group_region_moderator,1,1,1,1
access_gift_region_moderator,access.gift.region_moderator,model_gift,mahallam.group_region_moderator,1,1,1,1
access_notification_region_moderator,access.notification.region_moderator,model_notification,mahallam.group_region_moderator,1,1,1,1
access_option_region_moderator,access.option.region_moderator,model_option,mahallam.group_region_moderator,1,1,1,1
access_questionnaire_region_moderator,access.questionnaire.region_moderator,model_questionnaire,mahallam.group_region_moderator,1,1,1,1
access_user_question_option_region_moderator,access.user.question.option.region_moderator,model_user_question_option,mahallam.group_region_moderator,1,1,1,1
access_res_users_region_moderator,access.res.users.region_moderator,base.model_res_users,mahallam.group_region_moderator,1,1,1,1
access_question_region_moderator,access.question.region_moderator,model_question,mahallam.group_region_moderator,1,1,1,1
access_user_question_region_moderator,access.user.question.region_moderator,mahallam.model_user_question,mahallam.group_region_moderator,1,1,1,1
access_user_questionnaire_region_moderator,access.user.questionnaire.region_moderator,mahallam.model_user_questionnaire,mahallam.group_region_moderator,1,1,1,1
access_mahallam_application_region_moderator,access.mahallam.application.region_moderator,mahallam.model_mahallam_application,mahallam.group_region_moderator,1,1,1,1
access_paylov_transaction_history_region_moderator,access.paylov.transaction.history.region_moderator,model_paylov_transaction_history,mahallam.group_region_moderator,1,1,1,1
access_model_history_manager_region_moderator,access.model.history.manager.region_moderator,model_model_history,mahallam.group_region_moderator,1,1,1,1
access_mobile_translation_region_moderator,access.mobile.translation.region_moderator,mahallam.model_mobile_translation,mahallam.group_region_moderator,1,1,1,1
access_mahallam_application_media_region_moderator,access.mahallam.application.media.region_moderator,mahallam.model_mahallam_application_media,mahallam.group_region_moderator,1,1,1,1
access_mahallam_application_category_region_moderator,access.mahallam.application.category.region_moderator,mahallam.model_mahallam_application_category,mahallam.group_region_moderator,1,1,1,1
access_user_device_region_moderator,access.user.device.region_moderator,mahallam.model_user_device,mahallam.group_region_moderator,1,1,1,1
access_mahallam_contact_info_region_moderator,access.contact.info.region_moderator,model_contact_info,mahallam.group_region_moderator,1,1,1,1
access_mahallam_faq_region_moderator,access.faq.region_moderator,model_faq,mahallam.group_region_moderator,1,1,1,1
access_mobile_onboarding_region_moderator,access.mobile.onboarding.region_moderator,mahallam.model_mobile_onboarding,mahallam.group_region_moderator,1,1,1,1
access_mobile_onboarding_image_region_moderator,access.mobile.onboarding.image.region_moderator,mahallam.model_mobile_onboarding_image,mahallam.group_region_moderator,1,1,1,1
access_profile_notifications_region_moderator,access.profile.notifications.region_moderator,model_profile_notifications,mahallam.group_region_moderator,1,1,1,1
access_application_state_region_moderator,access.application.state.region_moderator,model_mahallam_application_state,mahallam.group_region_moderator,1,1,1,1
access_application_media_region_moderator,access.application.media.region_moderator,model_mahallam_application_media,mahallam.group_region_moderator,1,1,1,1
access_application_category_region_moderator,access.application.category.region_moderator,model_mahallam_application_category,mahallam.group_region_moderator,1,1,1,1
access_application_subcategory_region_moderator,access.application.subcategory.region_moderator,model_mahallam_application_subcategory,mahallam.group_region_moderator,1,1,1,1

access_card_district_moderator,access.card.district_moderator,model_card,mahallam.group_district_moderator,1,1,1,1
access_announcement_district_moderator,access.announcement.district_moderator,model_announcement,mahallam.group_district_moderator,1,1,1,1
access_gift_district_moderator,access.gift.district_moderator,model_gift,mahallam.group_district_moderator,1,1,1,1
access_notification_district_moderator,access.notification.district_moderator,model_notification,mahallam.group_district_moderator,1,1,1,1
access_option_district_moderator,access.option.district_moderator,model_option,mahallam.group_district_moderator,1,1,1,1
access_questionnaire_district_moderator,access.questionnaire.district_moderator,model_questionnaire,mahallam.group_district_moderator,1,1,1,1
access_user_question_option_district_moderator,access.user.question.option.district_moderator,model_user_question_option,mahallam.group_district_moderator,1,1,1,1
access_res_users_district_moderator,access.res.users.district_moderator,base.model_res_users,mahallam.group_district_moderator,1,1,1,1
access_question_district_moderator,access.question.district_moderator,model_question,mahallam.group_district_moderator,1,1,1,1
access_user_question_district_moderator,access.user.question.district_moderator,mahallam.model_user_question,mahallam.group_district_moderator,1,1,1,1
access_user_questionnaire_district_moderator,access.user.questionnaire.district_moderator,mahallam.model_user_questionnaire,mahallam.group_district_moderator,1,1,1,1
access_mahallam_application_district_moderator,access.mahallam.application.district_moderator,mahallam.model_mahallam_application,mahallam.group_district_moderator,1,1,1,1
access_paylov_transaction_history_district_moderator,access.paylov.transaction.history.district_moderator,model_paylov_transaction_history,mahallam.group_district_moderator,1,1,1,1
access_model_history_manager_district_moderator,access.model.history.manager.district_moderator,model_model_history,mahallam.group_district_moderator,1,1,1,1
access_mobile_translation_district_moderator,access.mobile.translation.district_moderator,mahallam.model_mobile_translation,mahallam.group_district_moderator,1,1,1,1
access_mahallam_application_media_district_moderator,access.mahallam.application.media.district_moderator,mahallam.model_mahallam_application_media,mahallam.group_district_moderator,1,1,1,1
access_mahallam_application_category_district_moderator,access.mahallam.application.category.district_moderator,mahallam.model_mahallam_application_category,mahallam.group_district_moderator,1,1,1,1
access_user_device_district_moderator,access.user.device.district_moderator,mahallam.model_user_device,mahallam.group_district_moderator,1,1,1,1
access_mahallam_contact_info_district_moderator,access.contact.info.district_moderator,model_contact_info,mahallam.group_district_moderator,1,1,1,1
access_mahallam_faq_district_moderator,access.faq.district_moderator,model_faq,mahallam.group_district_moderator,1,1,1,1
access_mobile_onboarding_district_moderator,access.mobile.onboarding.district_moderator,mahallam.model_mobile_onboarding,mahallam.group_district_moderator,1,1,1,1
access_mobile_onboarding_image_district_moderator,access.mobile.onboarding.image.district_moderator,mahallam.model_mobile_onboarding_image,mahallam.group_district_moderator,1,1,1,1
access_profile_notifications_district_moderator,access.profile.notifications.district_moderator,model_profile_notifications,mahallam.group_district_moderator,1,1,1,1
access_application_state_district_moderator,access.application.state.district_moderator,model_mahallam_application_state,mahallam.group_district_moderator,1,1,1,1
access_application_media_district_moderator,access.application.media.district_moderator,model_mahallam_application_media,mahallam.group_district_moderator,1,1,1,1
access_application_category_district_moderator,access.application.category.district_moderator,model_mahallam_application_category,mahallam.group_district_moderator,1,1,1,1
access_application_subcategory_district_moderator,access.application.subcategory.district_moderator,model_mahallam_application_subcategory,mahallam.group_district_moderator,1,1,1,1

access_card_mahalla_moderator,access.card.mahalla_moderator,model_card,mahallam.group_mahalla_moderator,1,1,1,1
access_announcement_mahalla_moderator,access.announcement.mahalla_moderator,model_announcement,mahallam.group_mahalla_moderator,1,1,1,1
access_gift_mahalla_moderator,access.gift.mahalla_moderator,model_gift,mahallam.group_mahalla_moderator,1,1,1,1
access_notification_mahalla_moderator,access.notification.mahalla_moderator,model_notification,mahallam.group_mahalla_moderator,1,1,1,1
access_option_mahalla_moderator,access.option.mahalla_moderator,model_option,mahallam.group_mahalla_moderator,1,1,1,1
access_questionnaire_mahalla_moderator,access.questionnaire.mahalla_moderator,model_questionnaire,mahallam.group_mahalla_moderator,1,1,1,1
access_user_question_option_mahalla_moderator,access.user.question.option.mahalla_moderator,model_user_question_option,mahallam.group_mahalla_moderator,1,1,1,1
access_res_users_mahalla_moderator,access.res.users.mahalla_moderator,base.model_res_users,mahallam.group_mahalla_moderator,1,1,1,1
access_question_mahalla_moderator,access.question.mahalla_moderator,model_question,mahallam.group_mahalla_moderator,1,1,1,1
access_user_question_mahalla_moderator,access.user.question.mahalla_moderator,mahallam.model_user_question,mahallam.group_mahalla_moderator,1,1,1,1
access_user_questionnaire_mahalla_moderator,access.user.questionnaire.mahalla_moderator,mahallam.model_user_questionnaire,mahallam.group_mahalla_moderator,1,1,1,1
access_mahallam_application_mahalla_moderator,access.mahallam.application.mahalla_moderator,mahallam.model_mahallam_application,mahallam.group_mahalla_moderator,1,1,1,1
access_paylov_transaction_history_mahalla_moderator,access.paylov.transaction.history.mahalla_moderator,model_paylov_transaction_history,mahallam.group_mahalla_moderator,1,1,1,1
access_model_history_manager_mahalla_moderator,access.model.history.manager.mahalla_moderator,model_model_history,mahallam.group_mahalla_moderator,1,1,1,1
access_mobile_translation_mahalla_moderator,access.mobile.translation.mahalla_moderator,mahallam.model_mobile_translation,mahallam.group_mahalla_moderator,1,1,1,1
access_mahallam_application_media_mahalla_moderator,access.mahallam.application.media.mahalla_moderator,mahallam.model_mahallam_application_media,mahallam.group_mahalla_moderator,1,1,1,1
access_mahallam_application_category_mahalla_moderator,access.mahallam.application.category.mahalla_moderator,mahallam.model_mahallam_application_category,mahallam.group_mahalla_moderator,1,1,1,1
access_user_device_mahalla_moderator,access.user.device.mahalla_moderator,mahallam.model_user_device,mahallam.group_mahalla_moderator,1,1,1,1
access_mahallam_contact_info_mahalla_moderator,access.contact.info.mahalla_moderator,model_contact_info,mahallam.group_mahalla_moderator,1,1,1,1
access_mahallam_faq_mahalla_moderator,access.faq.mahalla_moderator,model_faq,mahallam.group_mahalla_moderator,1,1,1,1
access_mobile_onboarding_mahalla_moderator,access.mobile.onboarding.mahalla_moderator,mahallam.model_mobile_onboarding,mahallam.group_mahalla_moderator,1,1,1,1
access_mobile_onboarding_image_mahalla_moderator,access.mobile.onboarding.image.mahalla_moderator,mahallam.model_mobile_onboarding_image,mahallam.group_mahalla_moderator,1,1,1,1
access_profile_notifications_mahalla_moderator,access.profile.notifications.mahalla_moderator,model_profile_notifications,mahallam.group_mahalla_moderator,1,1,1,1
access_application_state_mahalla_moderator,access.application.state.mahalla_moderator,model_mahallam_application_state,mahallam.group_mahalla_moderator,1,1,1,1
access_application_media_mahalla_moderator,access.application.media.mahalla_moderator,model_mahallam_application_media,mahallam.group_mahalla_moderator,1,1,1,1
access_application_category_mahalla_moderator,access.application.category.mahalla_moderator,model_mahallam_application_category,mahallam.group_mahalla_moderator,1,1,1,1
access_application_subcategory_mahalla_moderator,access.application.subcategory.mahalla_moderator,model_mahallam_application_subcategory,mahallam.group_mahalla_moderator,1,1,1,1

access_card_republic_reader,access.card.republic_reader,model_card,mahallam.group_republic_reader,1,0,0,0
access_announcement_republic_reader,access.announcement.republic_reader,model_announcement,mahallam.group_republic_reader,1,0,0,0
access_gift_republic_reader,access.gift.republic_reader,model_gift,mahallam.group_republic_reader,1,0,0,0
access_notification_republic_reader,access.notification.republic_reader,model_notification,mahallam.group_republic_reader,1,0,0,0
access_option_republic_reader,access.option.republic_reader,model_option,mahallam.group_republic_reader,1,0,0,0
access_questionnaire_republic_reader,access.questionnaire.republic_reader,model_questionnaire,mahallam.group_republic_reader,1,0,0,0
access_user_question_option_republic_reader,access.user.question.option.republic_reader,model_user_question_option,mahallam.group_republic_reader,1,0,0,0
access_res_users_republic_reader,access.res.users.republic_reader,base.model_res_users,mahallam.group_republic_reader,1,0,0,0
access_question_republic_reader,access.question.republic_reader,model_question,mahallam.group_republic_reader,1,0,0,0
access_user_question_republic_reader,access.user.question.republic_reader,mahallam.model_user_question,mahallam.group_republic_reader,1,0,0,0
access_user_questionnaire_republic_reader,access.user.questionnaire.republic_reader,mahallam.model_user_questionnaire,mahallam.group_republic_reader,1,0,0,0
access_mahallam_application_republic_reader,access.mahallam.application.republic_reader,mahallam.model_mahallam_application,mahallam.group_republic_reader,1,0,0,0
access_paylov_transaction_history_republic_reader,access.paylov.transaction.history.republic_reader,model_paylov_transaction_history,mahallam.group_republic_reader,1,0,0,0
access_model_history_manager_republic_reader,access.model.history.manager.republic_reader,model_model_history,mahallam.group_republic_reader,1,0,0,0
access_mobile_translation_republic_reader,access.mobile.translation.republic_reader,mahallam.model_mobile_translation,mahallam.group_republic_reader,1,0,0,0
access_mahallam_application_media_republic_reader,access.mahallam.application.media.republic_reader,mahallam.model_mahallam_application_media,mahallam.group_republic_reader,1,0,0,0
access_mahallam_application_category_republic_reader,access.mahallam.application.category.republic_reader,mahallam.model_mahallam_application_category,mahallam.group_republic_reader,1,0,0,0
access_user_device_republic_reader,access.user.device.republic_reader,mahallam.model_user_device,mahallam.group_republic_reader,1,0,0,0
access_mahallam_contact_info_republic_reader,access.contact.info.republic_reader,model_contact_info,mahallam.group_republic_reader,1,0,0,0
access_mahallam_faq_republic_reader,access.faq.republic_reader,model_faq,mahallam.group_republic_reader,1,0,0,0
access_mobile_onboarding_republic_reader,access.mobile.onboarding.republic_reader,mahallam.model_mobile_onboarding,mahallam.group_republic_reader,1,0,0,0
access_mobile_onboarding_image_republic_reader,access.mobile.onboarding.image.republic_reader,mahallam.model_mobile_onboarding_image,mahallam.group_republic_reader,1,0,0,0
access_profile_notifications_republic_reader,access.profile.notifications.republic_reader,model_profile_notifications,mahallam.group_republic_reader,1,0,0,0
access_application_state_republic_reader,access.application.state.republic_reader,model_mahallam_application_state,mahallam.group_republic_reader,1,0,0,0
access_application_media_republic_reader,access.application.media.republic_reader,model_mahallam_application_media,mahallam.group_republic_reader,1,0,0,0
access_application_category_republic_reader,access.application.category.republic_reader,model_mahallam_application_category,mahallam.group_republic_reader,1,0,0,0
access_application_subcategory_republic_reader,access.application.subcategory.republic_reader,model_mahallam_application_subcategory,mahallam.group_republic_reader,1,0,0,0

access_card_region_reader,access.card.region_reader,model_card,mahallam.group_region_reader,1,0,0,0
access_announcement_region_reader,access.announcement.region_reader,model_announcement,mahallam.group_region_reader,1,0,0,0
access_gift_region_reader,access.gift.region_reader,model_gift,mahallam.group_region_reader,1,0,0,0
access_notification_region_reader,access.notification.region_reader,model_notification,mahallam.group_region_reader,1,0,0,0
access_option_region_reader,access.option.region_reader,model_option,mahallam.group_region_reader,1,0,0,0
access_questionnaire_region_reader,access.questionnaire.region_reader,model_questionnaire,mahallam.group_region_reader,1,0,0,0
access_user_question_option_region_reader,access.user.question.option.region_reader,model_user_question_option,mahallam.group_region_reader,1,0,0,0
access_res_users_region_reader,access.res.users.region_reader,base.model_res_users,mahallam.group_region_reader,1,0,0,0
access_question_region_reader,access.question.region_reader,model_question,mahallam.group_region_reader,1,0,0,0
access_user_question_region_reader,access.user.question.region_reader,mahallam.model_user_question,mahallam.group_region_reader,1,0,0,0
access_user_questionnaire_region_reader,access.user.questionnaire.region_reader,mahallam.model_user_questionnaire,mahallam.group_region_reader,1,0,0,0
access_mahallam_application_region_reader,access.mahallam.application.region_reader,mahallam.model_mahallam_application,mahallam.group_region_reader,1,0,0,0
access_paylov_transaction_history_region_reader,access.paylov.transaction.history.region_reader,model_paylov_transaction_history,mahallam.group_region_reader,1,0,0,0
access_model_history_manager_region_reader,access.model.history.manager.region_reader,model_model_history,mahallam.group_region_reader,1,0,0,0
access_mobile_translation_region_reader,access.mobile.translation.region_reader,mahallam.model_mobile_translation,mahallam.group_region_reader,1,0,0,0
access_mahallam_application_media_region_reader,access.mahallam.application.media.region_reader,mahallam.model_mahallam_application_media,mahallam.group_region_reader,1,0,0,0
access_mahallam_application_category_region_reader,access.mahallam.application.category.region_reader,mahallam.model_mahallam_application_category,mahallam.group_region_reader,1,0,0,0
access_user_device_region_reader,access.user.device.region_reader,mahallam.model_user_device,mahallam.group_region_reader,1,0,0,0
access_mahallam_contact_info_region_reader,access.contact.info.region_reader,model_contact_info,mahallam.group_region_reader,1,0,0,0
access_mahallam_faq_region_reader,access.faq.region_reader,model_faq,mahallam.group_region_reader,1,0,0,0
access_mobile_onboarding_region_reader,access.mobile.onboarding.region_reader,mahallam.model_mobile_onboarding,mahallam.group_region_reader,1,0,0,0
access_mobile_onboarding_image_region_reader,access.mobile.onboarding.image.region_reader,mahallam.model_mobile_onboarding_image,mahallam.group_region_reader,1,0,0,0
access_profile_notifications_region_reader,access.profile.notifications.region_reader,model_profile_notifications,mahallam.group_region_reader,1,0,0,0
access_application_state_region_reader,access.application.state.region_reader,model_mahallam_application_state,mahallam.group_region_reader,1,0,0,0
access_application_media_region_reader,access.application.media.region_reader,model_mahallam_application_media,mahallam.group_region_reader,1,0,0,0
access_application_category_region_reader,access.application.category.region_reader,model_mahallam_application_category,mahallam.group_region_reader,1,0,0,0
access_application_subcategory_region_reader,access.application.subcategory.region_reader,model_mahallam_application_subcategory,mahallam.group_region_reader,1,0,0,0

access_card_district_reader,access.card.district_reader,model_card,mahallam.group_district_reader,1,0,0,0
access_announcement_district_reader,access.announcement.district_reader,model_announcement,mahallam.group_district_reader,1,0,0,0
access_gift_district_reader,access.gift.district_reader,model_gift,mahallam.group_district_reader,1,0,0,0
access_notification_district_reader,access.notification.district_reader,model_notification,mahallam.group_district_reader,1,0,0,0
access_option_district_reader,access.option.district_reader,model_option,mahallam.group_district_reader,1,0,0,0
access_questionnaire_district_reader,access.questionnaire.district_reader,model_questionnaire,mahallam.group_district_reader,1,0,0,0
access_user_question_option_district_reader,access.user.question.option.district_reader,model_user_question_option,mahallam.group_district_reader,1,0,0,0
access_res_users_district_reader,access.res.users.district_reader,base.model_res_users,mahallam.group_district_reader,1,0,0,0
access_question_district_reader,access.question.district_reader,model_question,mahallam.group_district_reader,1,0,0,0
access_user_question_district_reader,access.user.question.district_reader,mahallam.model_user_question,mahallam.group_district_reader,1,0,0,0
access_user_questionnaire_district_reader,access.user.questionnaire.district_reader,mahallam.model_user_questionnaire,mahallam.group_district_reader,1,0,0,0
access_mahallam_application_district_reader,access.mahallam.application.district_reader,mahallam.model_mahallam_application,mahallam.group_district_reader,1,0,0,0
access_paylov_transaction_history_district_reader,access.paylov.transaction.history.district_reader,model_paylov_transaction_history,mahallam.group_district_reader,1,0,0,0
access_model_history_manager_district_reader,access.model.history.manager.district_reader,model_model_history,mahallam.group_district_reader,1,0,0,0
access_mobile_translation_district_reader,access.mobile.translation.district_reader,mahallam.model_mobile_translation,mahallam.group_district_reader,1,0,0,0
access_mahallam_application_media_district_reader,access.mahallam.application.media.district_reader,mahallam.model_mahallam_application_media,mahallam.group_district_reader,1,0,0,0
access_mahallam_application_category_district_reader,access.mahallam.application.category.district_reader,mahallam.model_mahallam_application_category,mahallam.group_district_reader,1,0,0,0
access_user_device_district_reader,access.user.device.district_reader,mahallam.model_user_device,mahallam.group_district_reader,1,0,0,0
access_mahallam_contact_info_district_reader,access.contact.info.district_reader,model_contact_info,mahallam.group_district_reader,1,0,0,0
access_mahallam_faq_district_reader,access.faq.district_reader,model_faq,mahallam.group_district_reader,1,0,0,0
access_mobile_onboarding_district_reader,access.mobile.onboarding.district_reader,mahallam.model_mobile_onboarding,mahallam.group_district_reader,1,0,0,0
access_mobile_onboarding_image_district_reader,access.mobile.onboarding.image.district_reader,mahallam.model_mobile_onboarding_image,mahallam.group_district_reader,1,0,0,0
access_profile_notifications_district_reader,access.profile.notifications.district_reader,model_profile_notifications,mahallam.group_district_reader,1,0,0,0
access_application_state_district_reader,access.application.state.district_reader,model_mahallam_application_state,mahallam.group_district_reader,1,0,0,0
access_application_media_district_reader,access.application.media.district_reader,model_mahallam_application_media,mahallam.group_district_reader,1,0,0,0
access_application_category_district_reader,access.application.category.district_reader,model_mahallam_application_category,mahallam.group_district_reader,1,0,0,0
access_application_subcategory_district_reader,access.application.subcategory.district_reader,model_mahallam_application_subcategory,mahallam.group_district_reader,1,0,0,0

access_card_mahalla_reader,access.card.mahalla_reader,model_card,mahallam.group_mahalla_reader,1,0,0,0
access_announcement_mahalla_reader,access.announcement.mahalla_reader,model_announcement,mahallam.group_mahalla_reader,1,0,0,0
access_gift_mahalla_reader,access.gift.mahalla_reader,model_gift,mahallam.group_mahalla_reader,1,0,0,0
access_notification_mahalla_reader,access.notification.mahalla_reader,model_notification,mahallam.group_mahalla_reader,1,0,0,0
access_option_mahalla_reader,access.option.mahalla_reader,model_option,mahallam.group_mahalla_reader,1,0,0,0
access_questionnaire_mahalla_reader,access.questionnaire.mahalla_reader,model_questionnaire,mahallam.group_mahalla_reader,1,0,0,0
access_user_question_option_mahalla_reader,access.user.question.option.mahalla_reader,model_user_question_option,mahallam.group_mahalla_reader,1,0,0,0
access_res_users_mahalla_reader,access.res.users.mahalla_reader,base.model_res_users,mahallam.group_mahalla_reader,1,0,0,0
access_question_mahalla_reader,access.question.mahalla_reader,model_question,mahallam.group_mahalla_reader,1,0,0,0
access_user_question_mahalla_reader,access.user.question.mahalla_reader,mahallam.model_user_question,mahallam.group_mahalla_reader,1,0,0,0
access_user_questionnaire_mahalla_reader,access.user.questionnaire.mahalla_reader,mahallam.model_user_questionnaire,mahallam.group_mahalla_reader,1,0,0,0
access_mahallam_application_mahalla_reader,access.mahallam.application.mahalla_reader,mahallam.model_mahallam_application,mahallam.group_mahalla_reader,1,0,0,0
access_paylov_transaction_history_mahalla_reader,access.paylov.transaction.history.mahalla_reader,model_paylov_transaction_history,mahallam.group_mahalla_reader,1,0,0,0
access_model_history_manager_mahalla_reader,access.model.history.manager.mahalla_reader,model_model_history,mahallam.group_mahalla_reader,1,0,0,0
access_mobile_translation_mahalla_reader,access.mobile.translation.mahalla_reader,mahallam.model_mobile_translation,mahallam.group_mahalla_reader,1,0,0,0
access_mahallam_application_media_mahalla_reader,access.mahallam.application.media.mahalla_reader,mahallam.model_mahallam_application_media,mahallam.group_mahalla_reader,1,0,0,0
access_mahallam_application_category_mahalla_reader,access.mahallam.application.category.mahalla_reader,mahallam.model_mahallam_application_category,mahallam.group_mahalla_reader,1,0,0,0
access_user_device_mahalla_reader,access.user.device.mahalla_reader,mahallam.model_user_device,mahallam.group_mahalla_reader,1,0,0,0
access_mahallam_contact_info_mahalla_reader,access.contact.info.mahalla_reader,model_contact_info,mahallam.group_mahalla_reader,1,0,0,0
access_mahallam_faq_mahalla_reader,access.faq.mahalla_reader,model_faq,mahallam.group_mahalla_reader,1,0,0,0
access_mobile_onboarding_mahalla_reader,access.mobile.onboarding.mahalla_reader,mahallam.model_mobile_onboarding,mahallam.group_mahalla_reader,1,0,0,0
access_mobile_onboarding_image_mahalla_reader,access.mobile.onboarding.image.mahalla_reader,mahallam.model_mobile_onboarding_image,mahallam.group_mahalla_reader,1,0,0,0
access_profile_notifications_mahalla_reader,access.profile.notifications.mahalla_reader,model_profile_notifications,mahallam.group_mahalla_reader,1,0,0,0
access_application_state_mahalla_reader,access.application.state.mahalla_reader,model_mahallam_application_state,mahallam.group_mahalla_reader,1,0,0,0
access_application_media_mahalla_reader,access.application.media.mahalla_reader,model_mahallam_application_media,mahallam.group_mahalla_reader,1,0,0,0
access_application_category_mahalla_reader,access.application.category.mahalla_reader,model_mahallam_application_category,mahallam.group_mahalla_reader,1,0,0,0
access_application_subcategory_mahalla_reader,access.application.subcategory.mahalla_reader,model_mahallam_application_subcategory,mahallam.group_mahalla_reader,1,0,0,0<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <!-- User Types -->
        <record id="group_super_admin" model="res.groups">
            <field name="name">Super Admin</field>
            <field name="implied_ids" eval="[(4, ref('base.group_system'))]"/>
        </record>

        <record id="group_moderator" model="res.groups">
            <field name="name">Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_republic_moderator')),
            ]"/>
        </record>

        <record id="group_reader" model="res.groups">
            <field name="implied_ids" eval="[
            (4, ref('group_republic_reader')),
            ]"/>
            <field name="name">Reader</field>
        </record>

        <!-- Role-based Groups -->
        <!-- Republic -->
        <record id="group_republic_moderator" model="res.groups">
            <field name="name">Republic Moderator</field>
            <field name="implied_ids" eval="[(4, ref('group_region_reader')), (4, ref('group_region_moderator'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_republic_reader" model="res.groups">
            <field name="name">Republic Reader</field>
            <field name="implied_ids" eval="[(4, ref('group_region_reader'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Region -->
        <record id="group_region_moderator" model="res.groups">
            <field name="name">Region Moderator</field>
            <field name="implied_ids" eval="[(4, ref('group_district_moderator'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_region_reader" model="res.groups">
            <field name="name">Region Reader</field>
            <field name="implied_ids" eval="[(4, ref('group_district_reader'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- District -->
        <record id="group_district_moderator" model="res.groups">
            <field name="name">District Moderator</field>
            <field name="implied_ids" eval="[(4, ref('group_mahalla_moderator'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_district_reader" model="res.groups">
            <field name="name">District Reader</field>
            <field name="implied_ids" eval="[(4, ref('group_mahalla_reader'))]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Mahalla -->
        <record id="group_mahalla_moderator" model="res.groups">
            <field name="name">Mahalla Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_mahalla_moderator')),
            (4, ref('group_application_mahalla_moderator')),
            (4, ref('group_questionnaire_mahalla_moderator')),
            (4, ref('group_user_questionnaire_mahalla_moderator')),
            (4, ref('group_res_users_mahalla_moderator')),
            (4, ref('group_res_partner_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_mahalla_reader" model="res.groups">
            <field name="name">Mahalla Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_mahalla_reader')), 
            (4, ref('group_application_mahalla_reader')),
            (4, ref('group_questionnaire_mahalla_reader')),
            (4, ref('group_user_questionnaire_mahalla_reader')),
            (4, ref('group_res_users_mahalla_reader')),
            (4, ref('group_res_partner_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Model-specific Groups -->
        <!-- Announcement Moderators -->
        <record id="group_announcement_republic_moderator" model="res.groups">
            <field name="name">Announcement Republic Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_region_moderator')), 
            (4, ref('group_announcement_district_moderator')), 
            (4, ref('group_announcement_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_region_moderator" model="res.groups">
            <field name="name">Announcement Region Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_district_moderator')), 
            (4, ref('group_announcement_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_district_moderator" model="res.groups">
            <field name="name">Announcement District Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_mahalla_moderator" model="res.groups">
            <field name="name">Announcement Mahalla Moderator</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Announcement Readers -->
        <record id="group_announcement_republic_reader" model="res.groups">
            <field name="name">Announcement Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_region_reader')), 
            (4, ref('group_announcement_district_reader')), 
            (4, ref('group_announcement_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_region_reader" model="res.groups">
            <field name="name">Announcement Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_district_reader')), 
            (4, ref('group_announcement_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_district_reader" model="res.groups">
            <field name="name">Announcement District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_announcement_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_announcement_mahalla_reader" model="res.groups">
            <field name="name">Announcement Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Application Moderators -->
        <record id="group_application_republic_moderator" model="res.groups">
            <field name="name">Application Republic Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_region_moderator')), 
            (4, ref('group_application_district_moderator')), 
            (4, ref('group_application_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_region_moderator" model="res.groups">
            <field name="name">Application Region Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_district_moderator')), 
            (4, ref('group_application_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_district_moderator" model="res.groups">
            <field name="name">Application District Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_mahalla_moderator" model="res.groups">
            <field name="name">Application Mahalla Moderator</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Application Readers -->
        <record id="group_application_republic_reader" model="res.groups">
            <field name="name">Application Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_region_reader')), 
            (4, ref('group_application_district_reader')), 
            (4, ref('group_application_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_region_reader" model="res.groups">
            <field name="name">Application Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_district_reader')), 
            (4, ref('group_application_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_district_reader" model="res.groups">
            <field name="name">Application District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_application_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_application_mahalla_reader" model="res.groups">
            <field name="name">Application Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Questionnaire Moderators -->
        <record id="group_questionnaire_republic_moderator" model="res.groups">
            <field name="name">Questionnaire Republic Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_region_moderator')), 
            (4, ref('group_questionnaire_district_moderator')), 
            (4, ref('group_questionnaire_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_region_moderator" model="res.groups">
            <field name="name">Questionnaire Region Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_district_moderator')), 
            (4, ref('group_questionnaire_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_district_moderator" model="res.groups">
            <field name="name">Questionnaire District Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_mahalla_moderator" model="res.groups">
            <field name="name">Questionnaire Mahalla Moderator</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Questionnaire Readers -->
        <record id="group_questionnaire_republic_reader" model="res.groups">
            <field name="name">Questionnaire Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_region_reader')), 
            (4, ref('group_questionnaire_district_reader')), 
            (4, ref('group_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_region_reader" model="res.groups">
            <field name="name">Questionnaire Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_district_reader')), 
            (4, ref('group_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_district_reader" model="res.groups">
            <field name="name">Questionnaire District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_questionnaire_mahalla_reader" model="res.groups">
            <field name="name">Questionnaire Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- User Questionnaire Readers -->
        <record id="group_user_questionnaire_republic_reader" model="res.groups">
            <field name="name">User Questionnaire Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_user_questionnaire_region_reader')), 
            (4, ref('group_user_questionnaire_district_reader')), 
            (4, ref('group_user_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_user_questionnaire_region_reader" model="res.groups">
            <field name="name">User Questionnaire Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_user_questionnaire_district_reader')), 
            (4, ref('group_user_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_user_questionnaire_district_reader" model="res.groups">
            <field name="name">User Questionnaire District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_user_questionnaire_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_user_questionnaire_mahalla_reader" model="res.groups">
            <field name="name">User Questionnaire Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Res Users Moderators -->
        <record id="group_res_users_republic_moderator" model="res.groups">
            <field name="name">Res Users Republic Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_region_moderator')), 
            (4, ref('group_res_users_district_moderator')), 
            (4, ref('group_res_users_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_region_moderator" model="res.groups">
            <field name="name">Res Users Region Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_district_moderator')), 
            (4, ref('group_res_users_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_district_moderator" model="res.groups">
            <field name="name">Res Users District Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_mahalla_moderator" model="res.groups">
            <field name="name">Res Users Mahalla Moderator</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Res Users Readers -->
        <record id="group_res_users_republic_reader" model="res.groups">
            <field name="name">Res Users Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_region_reader')), 
            (4, ref('group_res_users_district_reader')), 
            (4, ref('group_res_users_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_region_reader" model="res.groups">
            <field name="name">Res Users Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_district_reader')), 
            (4, ref('group_res_users_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_district_reader" model="res.groups">
            <field name="name">Res Users District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_users_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_users_mahalla_reader" model="res.groups">
            <field name="name">Res Users Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Res Partner Moderators -->
        <record id="group_res_partner_republic_moderator" model="res.groups">
            <field name="name">Res Partner Republic Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_region_moderator')), 
            (4, ref('group_res_partner_district_moderator')), 
            (4, ref('group_res_partner_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_region_moderator" model="res.groups">
            <field name="name">Res Partner Region Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_district_moderator')), 
            (4, ref('group_res_partner_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_district_moderator" model="res.groups">
            <field name="name">Res Partner District Moderator</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_mahalla_moderator'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_mahalla_moderator" model="res.groups">
            <field name="name">Res Partner Mahalla Moderator</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <!-- Res Partner Readers -->
        <record id="group_res_partner_republic_reader" model="res.groups">
            <field name="name">Res Partner Republic Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_region_reader')), 
            (4, ref('group_res_partner_district_reader')), 
            (4, ref('group_res_partner_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_region_reader" model="res.groups">
            <field name="name">Res Partner Region Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_district_reader')), 
            (4, ref('group_res_partner_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_district_reader" model="res.groups">
            <field name="name">Res Partner District Reader</field>
            <field name="implied_ids" eval="[
            (4, ref('group_res_partner_mahalla_reader'))
            ]"/>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>

        <record id="group_res_partner_mahalla_reader" model="res.groups">
            <field name="name">Res Partner Mahalla Reader</field>
            <field name="category_id" ref="base.module_category_hidden"/>
        </record>
    </data>
</odoo><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <!-- Announcement Record Rules -->
        <!-- Region Moderator: Access to Announcements within their region -->
        <record id="rule_region_moderator_announcement" model="ir.rule">
            <field name="name">Region Moderator: Announcement</field>
            <field name="model_id" ref="model_announcement"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
            <field name="groups" eval="[(4, ref('mahallam.group_region_moderator'))]"/>
        </record>

        <!-- District Moderator: Access to Announcements within their district -->
        <record id="rule_district_moderator_announcement" model="ir.rule">
            <field name="name">District Moderator: Announcement</field>
            <field name="model_id" ref="model_announcement"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_moderator'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Moderator: Access to Announcements within their mahalla -->
        <record id="rule_mahalla_moderator_announcement" model="ir.rule">
            <field name="name">Mahalla Moderator: Announcement</field>
            <field name="model_id" ref="model_announcement"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_moderator'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>

        <!-- Reader Rules -->
        <!-- District Reader: Read-only Announcements within their district -->
        <record id="rule_district_reader_announcement" model="ir.rule">
            <field name="name">District Reader: Announcement</field>
            <field name="model_id" ref="model_announcement"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_reader'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Reader: Read-only Announcements within their mahalla -->
        <record id="rule_mahalla_reader_announcement" model="ir.rule">
            <field name="name">Mahalla Reader: Announcement</field>
            <field name="model_id" ref="model_announcement"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_reader'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>

        <!-- Region Moderator: Access to Applications within their region -->
        <record id="rule_region_moderator_application" model="ir.rule">
            <field name="name">Region Moderator: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_moderator'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Moderator: Access to Applications within their district -->
        <record id="rule_district_moderator_application" model="ir.rule">
            <field name="name">District Moderator: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_moderator'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Moderator: Access to Applications within their mahalla -->
        <record id="rule_mahalla_moderator_application" model="ir.rule">
            <field name="name">Mahalla Moderator: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_moderator'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>

        <!-- Reader Rules for Application -->
        <!-- Region Reader: Read-only Applications within their region -->
        <record id="rule_region_reader_application" model="ir.rule">
            <field name="name">Region Reader: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_reader'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Reader: Read-only Applications within their district -->
        <record id="rule_district_reader_application" model="ir.rule">
            <field name="name">District Reader: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_reader'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Reader: Read-only Applications within their mahalla -->
        <record id="rule_mahalla_reader_application" model="ir.rule">
            <field name="name">Mahalla Reader: Application</field>
            <field name="model_id" ref="model_mahallam_application"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_reader'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>
        
        <!-- Questionnaire Rules -->
        <!-- Region Moderator: Access to the questionnaire model within their region -->
        <record id="rule_region_moderator_questionnaire" model="ir.rule">
            <field name="name">Region Moderator: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_moderator'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Moderator: Access to the questionnaire model within their district -->
        <record id="rule_district_moderator_questionnaire" model="ir.rule">
            <field name="name">District Moderator: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_moderator'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Moderator: Access to the questionnaire model within their mahalla -->
        <record id="rule_mahalla_moderator_questionnaire" model="ir.rule">
            <field name="name">Mahalla Moderator: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_moderator'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>

        <!-- Reader Rules for Questionnaire -->
        <!-- Region Reader: Read-only Questionnaire within their region -->
        <record id="rule_region_reader_questionnaire" model="ir.rule">
            <field name="name">Region Reader: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_reader'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Reader: Read-only Questionnaire within their district -->
        <record id="rule_district_reader_questionnaire" model="ir.rule">
            <field name="name">District Reader: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_reader'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Reader: Read-only Questionnaire within their mahalla -->
        <record id="rule_mahalla_reader_questionnaire" model="ir.rule">
            <field name="name">Mahalla Reader: Questionnaire</field>
            <field name="model_id" ref="model_questionnaire"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_reader'))]"/>
            <field name="domain_force">[('mahalla_id', 'in', user.mahalla_id.ids)]</field>
        </record>

        <!-- Region Moderator can manage users within their region -->
        <record id="rule_region_moderator_user" model="ir.rule">
            <field name="name">Region Moderator: Manage Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_moderator'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Moderator can manage users within their district -->
        <record id="rule_district_moderator_user" model="ir.rule">
            <field name="name">District Moderator: Manage Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_moderator'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Moderator can manage users within their mahalla -->
        <record id="rule_mahalla_moderator_user" model="ir.rule">
            <field name="name">Mahalla Moderator: Manage Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_moderator'))]"/>
            <field name="domain_force">[('mahalla_id', '=', user.mahalla_id.id)]</field>
        </record>

        <!-- Region Reader can manage users within their region -->
        <record id="rule_region_reader_user" model="ir.rule">
            <field name="name">Region Reader: Read Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_region_reader'))]"/>
            <field name="domain_force">[('region_id', '=', user.region_id.id)]</field>
        </record>

        <!-- District Reader can manage users within their district -->
        <record id="rule_district_reader_user" model="ir.rule">
            <field name="name">District Reader: Read Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_district_reader'))]"/>
            <field name="domain_force">[('district_id', '=', user.district_id.id)]</field>
        </record>

        <!-- Mahalla Reader can manage users within their mahalla -->
        <record id="rule_mahalla_reader_user" model="ir.rule">
            <field name="name">Mahalla Reader: Read Users</field>
            <field name="model_id" ref="model_res_users"/>
            <field name="groups" eval="[(4, ref('mahallam.group_mahalla_reader'))]"/>
            <field name="domain_force">[('mahalla_id', '=', user.mahalla_id.id)]</field>
        </record>

    </data>
</odoo>