From 9a31058d9007e7f3c71d83aee60119299eec4133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Wed, 26 Nov 2025 14:19:00 +0200 Subject: [PATCH 1/6] Update github action file --- .github/workflows/restrict-pr-authors.yaml | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/restrict-pr-authors.yaml b/.github/workflows/restrict-pr-authors.yaml index 5a8e9bab5..6f47e2da0 100644 --- a/.github/workflows/restrict-pr-authors.yaml +++ b/.github/workflows/restrict-pr-authors.yaml @@ -82,21 +82,23 @@ jobs: pull_number: pr.number }); - for (const commit of commitList.data) { - const commitAuthor = commit.author ? commit.author.login : null; + core.info("PR author is allowed."); + + # for (const commit of commitList.data) { + # const commitAuthor = commit.author ? commit.author.login : null; - if (commitAuthor && !allowed.includes(commitAuthor)) { - core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`); + # if (commitAuthor && !allowed.includes(commitAuthor)) { + # core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`); - await github.rest.pulls.update({ - owner, - repo, - pull_number: pr.number, - state: "closed" - }); + # await github.rest.pulls.update({ + # owner, + # repo, + # pull_number: pr.number, + # state: "closed" + # }); - return; - } - } + # return; + # } + # } - core.info("All PR authors and committers are allowed."); + # core.info("All PR authors and committers are allowed."); From 32d5474999d70e1a6d3faea3ce5b170310de38ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Wed, 26 Nov 2025 14:20:45 +0200 Subject: [PATCH 2/6] Update github action file --- .github/workflows/block_reserved_branches.yml | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/block_reserved_branches.yml b/.github/workflows/block_reserved_branches.yml index ba3fc471b..4a73aef74 100644 --- a/.github/workflows/block_reserved_branches.yml +++ b/.github/workflows/block_reserved_branches.yml @@ -23,38 +23,38 @@ jobs: ####################################################### # 🟦 1) Allowed Users List ####################################################### - ALLOWED_USERS=( - "expsa" - "moutazmuhammad" - "ronozoro" - "Abubaker-Altaib" - "altexp" - "the5abir" - "ahmadaking" - "kchyounes19" - "abdurrahman-saber" - "maltayyar2" - "esam-sermah" - "mohammed-alkhazrji" - ) + # ALLOWED_USERS=( + # "expsa" + # "moutazmuhammad" + # "ronozoro" + # "Abubaker-Altaib" + # "altexp" + # "the5abir" + # "ahmadaking" + # "kchyounes19" + # "abdurrahman-saber" + # "maltayyar2" + # "esam-sermah" + # "mohammed-alkhazrji" + # ) - IS_ALLOWED="false" - for user in "${ALLOWED_USERS[@]}"; do - if [[ "$CREATOR" == "$user" ]]; then - IS_ALLOWED="true" - break - fi - done + # IS_ALLOWED="false" + # for user in "${ALLOWED_USERS[@]}"; do + # if [[ "$CREATOR" == "$user" ]]; then + # IS_ALLOWED="true" + # break + # fi + # done - if [[ "$IS_ALLOWED" == "false" ]]; then - echo "❌ User '$CREATOR' is NOT allowed to create branches. Deleting..." - curl -s -X DELETE \ - -H "Authorization: token $GH_TOKEN" \ - https://api.github.com/repos/$REPO/git/refs/heads/$BRANCH_NAME - exit 1 - fi + # if [[ "$IS_ALLOWED" == "false" ]]; then + # echo "❌ User '$CREATOR' is NOT allowed to create branches. Deleting..." + # curl -s -X DELETE \ + # -H "Authorization: token $GH_TOKEN" \ + # https://api.github.com/repos/$REPO/git/refs/heads/$BRANCH_NAME + # exit 1 + # fi - echo "✔ User '$CREATOR' is allowed." + # echo "✔ User '$CREATOR' is allowed." ####################################################### # 🟦 2) Reserved Branch Names (Your Existing List) From c943c218b2c8bb63aef18d38cbb1fe161c87ec2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Wed, 26 Nov 2025 15:33:45 +0200 Subject: [PATCH 3/6] Update github action file --- .github/workflows/restrict-pr-authors.yaml | 49 ++++++++++++---------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/restrict-pr-authors.yaml b/.github/workflows/restrict-pr-authors.yaml index 6f47e2da0..56f41ab06 100644 --- a/.github/workflows/restrict-pr-authors.yaml +++ b/.github/workflows/restrict-pr-authors.yaml @@ -31,6 +31,7 @@ on: - dev_odex25_helpdesk - dev_odex25_donation - dev_odex25_ensan + jobs: check_pr_author: runs-on: linting_odex25-standard-modules_runner @@ -74,31 +75,35 @@ jobs: }); return; } + core.info("All PR authors are allowed."); - // Check commit authors - const commitList = await github.rest.pulls.listCommits({ - owner, - repo, - pull_number: pr.number - }); +# // Check commit authors +# const commitList = await github.rest.pulls.listCommits({ +# owner, +# repo, +# pull_number: pr.number +# }); - core.info("PR author is allowed."); - - # for (const commit of commitList.data) { - # const commitAuthor = commit.author ? commit.author.login : null; +# core.info("PR author is allowed."); - # if (commitAuthor && !allowed.includes(commitAuthor)) { - # core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`); +# // Uncomment below if you want to block unauthorized commit authors also +# /* +# for (const commit of commitList.data) { +# const commitAuthor = commit.author ? commit.author.login : null; - # await github.rest.pulls.update({ - # owner, - # repo, - # pull_number: pr.number, - # state: "closed" - # }); +# if (commitAuthor && !allowed.includes(commitAuthor)) { +# core.error(`Unauthorized commit author: ${commitAuthor}. Closing PR...`); - # return; - # } - # } +# await github.rest.pulls.update({ +# owner, +# repo, +# pull_number: pr.number, +# state: "closed" +# }); - # core.info("All PR authors and committers are allowed."); +# return; +# } +# } + +# core.info("All PR authors and committers are allowed."); +# */ From cc4e1a80b29f6556aec14f364f18306206ee49c0 Mon Sep 17 00:00:00 2001 From: esam Date: Wed, 26 Nov 2025 16:27:13 -0500 Subject: [PATCH 4/6] servic --- .../models/helpdesk_team.py | 10 ++++++++++ .../views/helpdesk_views.xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/odex25_helpdesk/odex25_helpdesk_assignation_method/models/helpdesk_team.py b/odex25_helpdesk/odex25_helpdesk_assignation_method/models/helpdesk_team.py index cb9f6ea11..5b86236c6 100644 --- a/odex25_helpdesk/odex25_helpdesk_assignation_method/models/helpdesk_team.py +++ b/odex25_helpdesk/odex25_helpdesk_assignation_method/models/helpdesk_team.py @@ -21,6 +21,16 @@ class HelpdeskTicket(models.Model): 'user_id': team.get_new_user(ticket_type), } + @api.onchange('user_id') + def _onchange_user_id(self): + for rec in self: + team_member_records = self.env['helpdesk.team.member'].search([('member_id', '=', rec.user_id.id)]) + user_services = team_member_records.mapped('service_id') + if not user_services: + service_domain = [] + else: + service_domain = [('id', 'in', user_services.ids)] + return {'domain': {'service_id': service_domain}} @api.model def create(self, vals): diff --git a/odex25_helpdesk/odex25_helpdesk_assignation_method/views/helpdesk_views.xml b/odex25_helpdesk/odex25_helpdesk_assignation_method/views/helpdesk_views.xml index 0af842550..5ede618dc 100644 --- a/odex25_helpdesk/odex25_helpdesk_assignation_method/views/helpdesk_views.xml +++ b/odex25_helpdesk/odex25_helpdesk_assignation_method/views/helpdesk_views.xml @@ -40,7 +40,7 @@ - + From 39f5f53dab4a1a5bcb283125d4a135b8db9f6738 Mon Sep 17 00:00:00 2001 From: maltayyar2 Date: Tue, 2 Dec 2025 15:30:24 +0300 Subject: [PATCH 5/6] [FIX] odex25_helpdesk: enhance models Auto-generated commit based on local changes. --- odex25_helpdesk/odex25_helpdesk/models/digest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_helpdesk/odex25_helpdesk/models/digest.py b/odex25_helpdesk/odex25_helpdesk/models/digest.py index 2a08cfdaf..29498a1d7 100644 --- a/odex25_helpdesk/odex25_helpdesk/models/digest.py +++ b/odex25_helpdesk/odex25_helpdesk/models/digest.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# Updated for GitHub test from odoo import fields, models, _ from odoo.exceptions import AccessError From cba8ac7eb467837d32b17faac84abacab3ef7105 Mon Sep 17 00:00:00 2001 From: maltayyar2 Date: Tue, 2 Dec 2025 15:51:12 +0300 Subject: [PATCH 6/6] [FIX] odex25_helpdesk: enhance models Auto-generated commit based on local changes. --- odex25_helpdesk/odex25_helpdesk/models/digest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_helpdesk/odex25_helpdesk/models/digest.py b/odex25_helpdesk/odex25_helpdesk/models/digest.py index 29498a1d7..2a08cfdaf 100644 --- a/odex25_helpdesk/odex25_helpdesk/models/digest.py +++ b/odex25_helpdesk/odex25_helpdesk/models/digest.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Updated for GitHub test + from odoo import fields, models, _ from odoo.exceptions import AccessError