From b5b2b403ff1db5af0adf8e9ec184ec528d11be30 Mon Sep 17 00:00:00 2001
From: zainab8585
Date: Fri, 26 Jul 2024 22:04:02 +0200
Subject: [PATCH 01/22] [ADD]ADD new notes in transaction module
---
.../models/configuration.py | 12 ++++++-
.../models/entity.py | 2 ++
.../models/internal_transaction.py | 9 ++++--
.../views/entity.xml | 7 ++++
.../views/transcation_common_view.xml | 7 ++--
.../data/state_expired_corn.xml | 24 +++++++++++++-
.../exp_transaction_leave/models/leave.py | 32 ++++++++++++++++++-
7 files changed, 85 insertions(+), 8 deletions(-)
diff --git a/odex25_transactions/exp_transaction_documents/models/configuration.py b/odex25_transactions/exp_transaction_documents/models/configuration.py
index de54fabc3..263dd15e3 100644
--- a/odex25_transactions/exp_transaction_documents/models/configuration.py
+++ b/odex25_transactions/exp_transaction_documents/models/configuration.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from odoo import models, api, fields, _
-
+import base64
+from odoo.exceptions import ValidationError
TRACE_ACTIONS = [
('forward', _('Forwarded')),
('receive', _('Received')),
@@ -80,6 +81,7 @@ class AttachmentRule(models.Model):
entity_id = fields.Many2one(comodel_name='cm.entity', string='Unit Responsible', related='employee_id.parent_id',
store=True)
file_save = fields.Binary('Save File')
+ external_drive_link = fields.Char('External Drive Link')
attachment_filename = fields.Char(string="Attachment Filename")
incoming_transaction_id = fields.Many2one(comodel_name='incoming.transaction', string='Incoming Transaction')
internal_transaction_id = fields.Many2one(comodel_name='internal.transaction', string='Internal Transaction')
@@ -87,6 +89,14 @@ class AttachmentRule(models.Model):
date = fields.Datetime(string='Date', default=fields.Datetime.now)
description = fields.Char(string='Description')
+ @api.constrains('file_save')
+ def _check_attachment_size(self):
+ max_size = 10 * 1024 * 1024 # 10 MB
+ for record in self:
+ if record.file_save:
+ file_size = len(base64.b64decode(record.file_save))
+ if file_size > max_size:
+ raise ValidationError(_('Attachment %s exceeds the maximum allowed size of 10 MB.') % record.attachment_filename)
class TransactionTrace(models.Model):
_name = 'cm.transaction.trace'
diff --git a/odex25_transactions/exp_transaction_documents/models/entity.py b/odex25_transactions/exp_transaction_documents/models/entity.py
index 065437570..f93c80eb5 100644
--- a/odex25_transactions/exp_transaction_documents/models/entity.py
+++ b/odex25_transactions/exp_transaction_documents/models/entity.py
@@ -16,6 +16,8 @@ class Entity(models.Model):
_description = 'Transactions Contacts'
_order = 'name'
+ employee_id = fields.Many2one('hr.employee', string='Delivery Employee')
+ company_name = fields.Char('Delivery Company')
def _normalize_arabic_text(self, text):
translation_map = str.maketrans({
# Define a dictionary to replace different forms of characters
diff --git a/odex25_transactions/exp_transaction_documents/models/internal_transaction.py b/odex25_transactions/exp_transaction_documents/models/internal_transaction.py
index 1f195ca27..e786b8e1c 100644
--- a/odex25_transactions/exp_transaction_documents/models/internal_transaction.py
+++ b/odex25_transactions/exp_transaction_documents/models/internal_transaction.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from odoo import models, api, fields, _
-
-
+from odoo.exceptions import ValidationError
class InternalTransaction(models.Model):
_name = 'internal.transaction'
_inherit = ['transaction.transaction', 'mail.thread']
@@ -58,6 +57,12 @@ class InternalTransaction(models.Model):
new_args.append(arg)
return super(InternalTransaction, self).search(new_args, offset=offset, limit=limit, order=order, count=count)
+ def unlink(self):
+ for record in self:
+ if record.state == 'send':
+ raise ValidationError(_('Cannot delete a sent transaction!'))
+ return super(InternalTransaction, self).unlink()
+
@api.model
def get_url(self):
url = u''
diff --git a/odex25_transactions/exp_transaction_documents/views/entity.xml b/odex25_transactions/exp_transaction_documents/views/entity.xml
index fa12462a1..795325655 100644
--- a/odex25_transactions/exp_transaction_documents/views/entity.xml
+++ b/odex25_transactions/exp_transaction_documents/views/entity.xml
@@ -48,6 +48,13 @@
+
+
+
+
+
diff --git a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
index cd30d870f..6f2011ca4 100644
--- a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
+++ b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
@@ -109,12 +109,12 @@
-
+
-
+
@@ -124,7 +124,8 @@
-
+
+
diff --git a/odex25_transactions/exp_transaction_leave/data/state_expired_corn.xml b/odex25_transactions/exp_transaction_leave/data/state_expired_corn.xml
index 4e1cdccd5..d0dea864d 100644
--- a/odex25_transactions/exp_transaction_leave/data/state_expired_corn.xml
+++ b/odex25_transactions/exp_transaction_leave/data/state_expired_corn.xml
@@ -7,9 +7,31 @@
days
-1
-
+
code
model.action_expired()
+
+ Delegation Accepted Notification
+
+ Delegation Accepted
+ ${(user.email or user.company_id.email) | safe}
+ ${object.employee_id.email}
+
+ Hello ${object.employee_id.name},
+ Your delegation ${object.name} has been accepted.
+ Thank you.
+ ]]>
+
+
+
+
+ Delegation Users Notification
+
+ Delegation Notification
+ ${(user.email or user.company_id.email) | safe}
+
+
diff --git a/odex25_transactions/exp_transaction_leave/models/leave.py b/odex25_transactions/exp_transaction_leave/models/leave.py
index 89971a7d6..5105d18f4 100644
--- a/odex25_transactions/exp_transaction_leave/models/leave.py
+++ b/odex25_transactions/exp_transaction_leave/models/leave.py
@@ -48,16 +48,46 @@ class Leave(models.Model):
# Business methods
####################################################
def action_request(self):
+ template_id = self.env.ref('exp_transaction_leave.email_template_delegation_notification2',False)
+
for rec in self:
- rec.state = 'request'
+ rec.state = 'request'
+ if rec.alternative_employee_ids:
+ for lin in rec.alternative_employee_ids:
+ emails = lin.employee_id.email
+ if emails:
+ body_html = f"""
+ Hello {lin.employee_id.name},
+ You have been delegated a task.
+ Thank you.
+ """
+ email_template = template_id.write(
+ {'email_to': emails,'body_html': body_html,})
+ template_id.with_context(lang=self.env.user.lang).send_mail(rec.id, force_send=True, raise_exception=False)
+ if rec.alternative_manager_ids:
+ for lin in rec.alternative_employee_ids:
+ emails = lin.employee_id.email
+ if emails:
+ body_html = f"""
+ Hello {lin.employee_id.name},
+ You have been delegated a task.
+ Thank you.
+ """
+ email_template = template_id.write(
+ {'email_to': emails,'body_html': body_html,})
+ template_id.with_context(lang=self.env.user.lang).send_mail(rec.id, force_send=True, raise_exception=False)
+
+
def action_refuse(self):
for rec in self:
rec.state = 'refuse'
def action_approve(self):
+ template_id = self.env.ref('exp_transaction_leave.email_template_delegation_accepted').id
for rec in self:
rec.state = 'approve'
+ self.env['mail.template'].browse(template_id).send_mail(rec.id, force_send=True)
def action_expired(self):
date_now = date.today()
From 05bd5b9f39612903787ed171dd2d759db96b3ad7 Mon Sep 17 00:00:00 2001
From: zainab8585
Date: Fri, 26 Jul 2024 22:07:25 +0200
Subject: [PATCH 02/22] [UPDATE]UPDATE
---
.../exp_transaction_documents/__manifest__.py | 2 +-
.../views/transcation_common_view.xml | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/odex25_transactions/exp_transaction_documents/__manifest__.py b/odex25_transactions/exp_transaction_documents/__manifest__.py
index 2c2d47c06..e0725c47f 100644
--- a/odex25_transactions/exp_transaction_documents/__manifest__.py
+++ b/odex25_transactions/exp_transaction_documents/__manifest__.py
@@ -18,7 +18,7 @@ Odex - Communications Management System
Managing Communications Transcations flows
""",
'website': 'http://www.exp-sa.com',
- 'depends': ['base', 'base_odex', 'mail', 'html_text', 'odex_sms'],
+ 'depends': ['base', 'base_odex', 'mail','attachment_indexation', 'html_text', 'odex_sms'],
'data': [
'security/groups.xml',
'security/ir.model.access.csv',
diff --git a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
index 6f2011ca4..d9ef15ba0 100644
--- a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
+++ b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
@@ -109,12 +109,12 @@
-
+
-
+
@@ -124,7 +124,7 @@
-
+
From f222e201598ea96768e5733ae618e4755d2a8c0b Mon Sep 17 00:00:00 2001
From: zainab8585
Date: Fri, 26 Jul 2024 22:10:43 +0200
Subject: [PATCH 03/22] [UPDATE]UPDATE
---
.../receiver_transaction_report_template.xml | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/odex25_transactions/exp_transaction_documents/reports/receiver_transaction_report_template.xml b/odex25_transactions/exp_transaction_documents/reports/receiver_transaction_report_template.xml
index 3110b5720..765325751 100644
--- a/odex25_transactions/exp_transaction_documents/reports/receiver_transaction_report_template.xml
+++ b/odex25_transactions/exp_transaction_documents/reports/receiver_transaction_report_template.xml
@@ -171,5 +171,46 @@
name="exp_transaction_documents.transaction_outgoing_receive_report"
paperformat="paperformat_transaction_receive_report"
menu="True"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
تفاصيل المعاملة
+
رقم المعاملة:
+
الموضوع:
+
التاريخ:
+
+
+
+
+
+
+
+
From 5af53340897d3f3fdea891760e222be6c74d179b 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: Sun, 28 Jul 2024 15:16:02 +0300
Subject: [PATCH 04/22] Update github action file
---
.github/workflows/cyber-project.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/cyber-project.yml b/.github/workflows/cyber-project.yml
index 6e7b79a04..b92efde16 100644
--- a/.github/workflows/cyber-project.yml
+++ b/.github/workflows/cyber-project.yml
@@ -47,15 +47,15 @@ on:
jobs:
deploy_master_server:
name: Deploy to Master
- runs-on: cyber-client-project-runner
+ runs-on: app-sever-project-runner
if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0')
steps:
- name: Checkout And Restart Project
run: |
echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.CYBER_PROJECT_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.CYBER_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.CYBER_PROJECT_USER }} ${{ secrets.CYBER_PROJECT_PATH }} ${{ secrets.CYBER_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
+ sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
+ sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
deploy_preprod_server:
name: Deploy to Preprod
From 1f7017e8bb6aeb2dcfa9537b1eb3cec059bb8942 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 22:38:00 +0300
Subject: [PATCH 05/22] Update transcation_common_view.xml
---
.../exp_transaction_documents/views/transcation_common_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
index d9ef15ba0..973589639 100644
--- a/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
+++ b/odex25_transactions/exp_transaction_documents/views/transcation_common_view.xml
@@ -124,7 +124,7 @@
-
+
From 7e59ba32abfd86d713cea8de0b0ff5cb8790e101 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 22:46:23 +0300
Subject: [PATCH 06/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index d145b604f..a91c7398f 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -35,7 +35,7 @@ class Transaction(models.Model):
binary_barcode = fields.Binary(string='Barcode', attachment=True)
- @api.constrains('ean13', 'name', 'transaction_date', 'type')
+ @api.constrains('ean13', 'name', 'transaction_date', 'type','subject')
def binary_compute_constraint(self):
font_path = os.path.join(os.path.dirname(__file__), 'img', 'amiri-regular.ttf')
font_size = 22
@@ -61,6 +61,7 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
+ draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 20), font)
draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 60), font)
draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 100), font)
draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 140), font)
From 8453dbd09851c48322b9f7f16d09c7c153f5dc5d Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 22:58:24 +0300
Subject: [PATCH 07/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index a91c7398f..9dfbc7c39 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -61,7 +61,7 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
- draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 20), font)
+ draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 50), font)
draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 60), font)
draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 100), font)
draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 140), font)
From edbed7f9bfacc0aadc1bcbea79b55d12f7d400a3 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 23:02:51 +0300
Subject: [PATCH 08/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index 9dfbc7c39..1bdabbbdd 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -61,10 +61,10 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
- draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 50), font)
- draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 60), font)
- draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 100), font)
- draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 140), font)
+ draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 40), font)
+ draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 80), font)
+ draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 120), font)
+ draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 160), font)
# Generate barcode
barcode = self.env['ir.actions.report'].barcode('Code11', self.name, width=250, height=100, humanreadable=0)
From caea238af78096453d6be9184d5e49a5aef765f9 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 23:08:46 +0300
Subject: [PATCH 09/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index 1bdabbbdd..6765fcd5f 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -61,10 +61,11 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
- draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 40), font)
draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 80), font)
draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 120), font)
draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 160), font)
+ draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 200), font)
+
# Generate barcode
barcode = self.env['ir.actions.report'].barcode('Code11', self.name, width=250, height=100, humanreadable=0)
From 108baab6ef68f8ebc7e7fc8d367e60e8f0abac12 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Sun, 28 Jul 2024 23:12:48 +0300
Subject: [PATCH 10/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index 6765fcd5f..9e2ef3d51 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -61,10 +61,10 @@ class Transaction(models.Model):
# draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
#
draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
+ draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 60), font)
draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 80), font)
draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 120), font)
draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 160), font)
- draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 200), font)
# Generate barcode
From 0626e5a03e83a70ffe9cb49cc7dcb2be0608c0a4 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Mon, 29 Jul 2024 10:59:28 +0300
Subject: [PATCH 11/22] Update barcode.py
---
.../cm_odex_barcode/models/barcode.py | 21 +++++++++----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index 9e2ef3d51..703b69270 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -43,6 +43,13 @@ class Transaction(models.Model):
img = Image.new("RGBA", (500, 420), "white")
draw = ImageDraw.Draw(img)
font = ImageFont.truetype(font_path, font_size)
+
+ transaction_text = " رقم المعاملة : " + (self.name or '')
+ subject_text = " موضوع : " + (self.subject or '')
+ h_date =" تاريخ المعاملة الهجري : " +(str(self.transaction_date) if self.transaction_date else '')
+ datem = " تاريخ المعاملة الميلادي : "+ (str(self.transaction_date) if self.transaction_date else '')
+ rank = " رتبة المعاملة : "+(str(self.attachment_num) if self.attachment_num else '0')
+ full_text = transaction_text + "\n" + subject_text.center(30)+"\n"+h_date+'\n'+datem+'\n'+rank.center(50)
def draw_text(draw, text, position, font, alignment="left"):
text_size = draw.textsize(text, font=font)
@@ -54,17 +61,9 @@ class Transaction(models.Model):
draw.text(position, text, "black", font=font)
- # Draw text elements
- # draw_text(draw, (self.name or '')+'رقم المعاملة:', (10, 20), font)
- # draw_text(draw, (self.transaction_date_hijri or '').replace('-', '/')+"تاريخ المعاملة الهجري: ", (10, 60), font)
- # draw_text(draw,(str(self.transaction_date) if self.transaction_date else '').replace('-', '/')+"تاريخ المعاملة الميلادي: ", (10, 100), font)
- # draw_text(draw,(str(self.attachment_num) if self.attachment_num else '0')+ "رتبة المعاملة: " , (10, 140), font)
- #
- draw_text(draw, " رقم المعاملة : " + (self.name or ''), (10, 20), font)
- draw_text(draw, " الموضوع : " + (self.subject or ''), (10, 60), font)
- draw_text(draw, " تاريخ المعاملة الهجري : " + (self.transaction_date_hijri or '').replace('-', '/'), (10, 80), font)
- draw_text(draw, " تاريخ المعاملة الميلادي : " + (str(self.transaction_date) if self.transaction_date else '').replace('-', '/'), (10, 120), font)
- draw_text(draw, " رتبة المعاملة : " + (str(self.attachment_num) if self.attachment_num else '0'), (120, 160), font)
+
+ draw_text(draw, full_text, (10, 20), font)
+
# Generate barcode
From d1402a6cf3310f80cf51a71b38e98edaf449771e 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: Mon, 29 Jul 2024 13:21:03 +0300
Subject: [PATCH 12/22] Update github action file
---
.github/workflows/twahod-project.yml | 81 ----------------------------
1 file changed, 81 deletions(-)
delete mode 100644 .github/workflows/twahod-project.yml
diff --git a/.github/workflows/twahod-project.yml b/.github/workflows/twahod-project.yml
deleted file mode 100644
index e76aa4dc8..000000000
--- a/.github/workflows/twahod-project.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-name: Twahod Project - Pull Code
-
-on:
- push:
- branches:
- - dev_odex-event
- - dev_odex25_accounting
- - dev_odex25_base
- - dev_odex25_dms
- - dev_odex25_fleet
- - dev_odex25_ENSAN
- - dev_odex25_hr
- - dev_odex25_inventory
- - dev_odex25_maintenance
- - dev_odex25_mobile
- - dev_odex25_pos
- - dev_odex25_project
- - dev_odex25_purchase
- - dev_odex25_realstate
- - dev_odex25_sales
- - dev_odex25_survey
- - dev_odex25_transactions
- - dev_odex25_website
- - dev_openeducat_erp-14.0.1.0
- - preprod_odex-event
- - preprod_odex25_accounting
- - preprod_odex25_base
- - preprod_odex25_dms
- - preprod_odex25_fleet
- - preprod_odex25_ENSAN
- - preprod_odex25_hr
- - preprod_odex25_inventory
- - preprod_odex25_maintenance
- - preprod_odex25_mobile
- - preprod_odex25_pos
- - preprod_odex25_project
- - preprod_odex25_purchase
- - preprod_odex25_realstate
- - preprod_odex25_sales
- - preprod_odex25_survey
- - preprod_odex25_transactions
- - preprod_odex25_website
- - preprod_openeducat_erp-14.0.1.0
-
- workflow_dispatch:
-
-jobs:
- # deploy_master_server:
- # name: Deploy to Master
- # runs-on: twahod-project-runner
- # if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0')
- # steps:
- # - name: Checkout And Restart Project
- # run: |
- # echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- # sudo chmod +x ${{ secrets.TWAHOD_PROJECT_PATH }}/scripts/pull_code.sh
- # sudo ${{ secrets.TWAHOD_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.TWAHOD_PROJECT_USER }} ${{ secrets.TWAHOD_PROJECT_PATH }} ${{ secrets.TWAHOD_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
-
- deploy_preprod_server:
- name: Deploy to Preprod
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.TWAHOD_APP_PROJECT_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.TWAHOD_APP_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.TWAHOD_APP_PROJECT_USER }} ${{ secrets.TWAHOD_APP_PROJECT_PATH }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
-
- deploy_test_server:
- name: Deploy to Test
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.TWAHOD_APP_PROJECT_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.TWAHOD_APP_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.TWAHOD_APP_PROJECT_USER }} ${{ secrets.TWAHOD_APP_PROJECT_PATH }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
From 162b3d0d9b32f6180fe444795b6c893ba53c9293 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: Mon, 29 Jul 2024 13:21:46 +0300
Subject: [PATCH 13/22] Update github action file
---
.github/workflows/odex25-general.yml | 81 ----------------------------
1 file changed, 81 deletions(-)
delete mode 100644 .github/workflows/odex25-general.yml
diff --git a/.github/workflows/odex25-general.yml b/.github/workflows/odex25-general.yml
deleted file mode 100644
index d49a9e215..000000000
--- a/.github/workflows/odex25-general.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-name: Odex25-General Project - Pull Code
-
-on:
- push:
- branches:
- - dev_odex-event
- - dev_odex25_accounting
- - dev_odex25_base
- - dev_odex25_dms
- - dev_odex25_fleet
- - dev_odex25_ENSAN
- - dev_odex25_hr
- - dev_odex25_inventory
- - dev_odex25_maintenance
- - dev_odex25_mobile
- - dev_odex25_pos
- - dev_odex25_project
- - dev_odex25_purchase
- - dev_odex25_realstate
- - dev_odex25_sales
- - dev_odex25_survey
- - dev_odex25_transactions
- - dev_odex25_website
- - dev_openeducat_erp-14.0.1.0
- - preprod_odex-event
- - preprod_odex25_accounting
- - preprod_odex25_base
- - preprod_odex25_dms
- - preprod_odex25_fleet
- - preprod_odex25_ENSAN
- - preprod_odex25_hr
- - preprod_odex25_inventory
- - preprod_odex25_maintenance
- - preprod_odex25_mobile
- - preprod_odex25_pos
- - preprod_odex25_project
- - preprod_odex25_purchase
- - preprod_odex25_realstate
- - preprod_odex25_sales
- - preprod_odex25_survey
- - preprod_odex25_transactions
- - preprod_odex25_website
- - preprod_openeducat_erp-14.0.1.0
-
- workflow_dispatch:
-
-jobs:
- # deploy_master_server:
- # name: Deploy to Master
- # runs-on: app-sever-project-runner
- # if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0')
- # steps:
- # - name: Checkout And Restart Project
- # run: |
- # echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- # sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- # sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_GENERAL_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
-
- deploy_preprod_server:
- name: Deploy to Preprod
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
-
- deploy_test_server:
- name: Deploy to Test
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
From fd3dda2f9bdfd58526d7f0a5a99e7d885b5f4cae 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: Mon, 29 Jul 2024 13:22:29 +0300
Subject: [PATCH 14/22] Update github action file
---
.github/workflows/cyber-project.yml | 81 -----------------------------
1 file changed, 81 deletions(-)
delete mode 100644 .github/workflows/cyber-project.yml
diff --git a/.github/workflows/cyber-project.yml b/.github/workflows/cyber-project.yml
deleted file mode 100644
index b92efde16..000000000
--- a/.github/workflows/cyber-project.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-name: Cyber Security Project - Pull Code
-
-on:
- push:
- branches:
- - dev_odex-event
- - dev_odex25_accounting
- - dev_odex25_base
- - dev_odex25_dms
- - dev_odex25_fleet
- - dev_odex25_ENSAN
- - dev_odex25_hr
- - dev_odex25_inventory
- - dev_odex25_maintenance
- - dev_odex25_mobile
- - dev_odex25_pos
- - dev_odex25_project
- - dev_odex25_purchase
- - dev_odex25_realstate
- - dev_odex25_sales
- - dev_odex25_survey
- - dev_odex25_transactions
- - dev_odex25_website
- - dev_openeducat_erp-14.0.1.0
- - preprod_odex-event
- - preprod_odex25_accounting
- - preprod_odex25_base
- - preprod_odex25_dms
- - preprod_odex25_fleet
- - preprod_odex25_ENSAN
- - preprod_odex25_hr
- - preprod_odex25_inventory
- - preprod_odex25_maintenance
- - preprod_odex25_mobile
- - preprod_odex25_pos
- - preprod_odex25_project
- - preprod_odex25_purchase
- - preprod_odex25_realstate
- - preprod_odex25_sales
- - preprod_odex25_survey
- - preprod_odex25_transactions
- - preprod_odex25_website
- - preprod_openeducat_erp-14.0.1.0
-
- workflow_dispatch:
-
-jobs:
- deploy_master_server:
- name: Deploy to Master
- runs-on: app-sever-project-runner
- if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0')
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
-
- deploy_preprod_server:
- name: Deploy to Preprod
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
-
- deploy_test_server:
- name: Deploy to Test
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
From 6a69e9752a099573d1716855555f48b1ba4f8761 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: Mon, 29 Jul 2024 13:25:05 +0300
Subject: [PATCH 15/22] Update github action file
---
.github/workflows/odex25-standard.yml | 81 ---------------------------
1 file changed, 81 deletions(-)
delete mode 100644 .github/workflows/odex25-standard.yml
diff --git a/.github/workflows/odex25-standard.yml b/.github/workflows/odex25-standard.yml
deleted file mode 100644
index 267342024..000000000
--- a/.github/workflows/odex25-standard.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-name: ODEX25_STANDARD Project - Pull Code
-
-on:
- push:
- branches:
- - dev_odex-event
- - dev_odex25_accounting
- - dev_odex25_base
- - dev_odex25_dms
- - dev_odex25_fleet
- - dev_odex25_ENSAN
- - dev_odex25_hr
- - dev_odex25_inventory
- - dev_odex25_maintenance
- - dev_odex25_mobile
- - dev_odex25_pos
- - dev_odex25_project
- - dev_odex25_purchase
- - dev_odex25_realstate
- - dev_odex25_sales
- - dev_odex25_survey
- - dev_odex25_transactions
- - dev_odex25_website
- - dev_openeducat_erp-14.0.1.0
- - preprod_odex-event
- - preprod_odex25_accounting
- - preprod_odex25_base
- - preprod_odex25_dms
- - preprod_odex25_fleet
- - preprod_odex25_ENSAN
- - preprod_odex25_hr
- - preprod_odex25_inventory
- - preprod_odex25_maintenance
- - preprod_odex25_mobile
- - preprod_odex25_pos
- - preprod_odex25_project
- - preprod_odex25_purchase
- - preprod_odex25_realstate
- - preprod_odex25_sales
- - preprod_odex25_survey
- - preprod_odex25_transactions
- - preprod_odex25_website
- - preprod_openeducat_erp-14.0.1.0
-
- workflow_dispatch:
-
-jobs:
- deploy_master_server:
- name: Deploy to Master
- runs-on: app-sever-project-runner
- if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0')
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_STANDARD_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
-
- deploy_preprod_server:
- name: Deploy to Preprod
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
-
- deploy_test_server:
- name: Deploy to Test
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
From a734510df7f3674e321cd6d31bd16578e97229a0 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: Mon, 29 Jul 2024 13:33:09 +0300
Subject: [PATCH 16/22] Update github action file
---
.github/workflows/app-server.yml | 124 +++++++++++++++++++++++++++++++
1 file changed, 124 insertions(+)
create mode 100644 .github/workflows/app-server.yml
diff --git a/.github/workflows/app-server.yml b/.github/workflows/app-server.yml
new file mode 100644
index 000000000..533cd5f5d
--- /dev/null
+++ b/.github/workflows/app-server.yml
@@ -0,0 +1,124 @@
+name: App Server - Pull Code
+
+# This Server contain many services:
+# - Cyber project (dev - preprod - prod)
+# - Ensan project (dev - preprod)
+# - Odex25-General Project (dev - preprod)
+# - ODEX25_STANDARD Project (dev - preprod - prod)
+# - Twahod Project (dev - preprod)
+on:
+ push:
+ branches:
+ - dev_odex-event
+ - dev_odex25_accounting
+ - dev_odex25_base
+ - dev_odex25_dms
+ - dev_odex25_fleet
+ - dev_odex25_ENSAN
+ - dev_odex25_hr
+ - dev_odex25_inventory
+ - dev_odex25_maintenance
+ - dev_odex25_mobile
+ - dev_odex25_pos
+ - dev_odex25_project
+ - dev_odex25_purchase
+ - dev_odex25_realstate
+ - dev_odex25_sales
+ - dev_odex25_survey
+ - dev_odex25_transactions
+ - dev_odex25_website
+ - dev_openeducat_erp-14.0.1.0
+ - preprod_odex-event
+ - preprod_odex25_accounting
+ - preprod_odex25_base
+ - preprod_odex25_dms
+ - preprod_odex25_fleet
+ - preprod_odex25_ENSAN
+ - preprod_odex25_hr
+ - preprod_odex25_inventory
+ - preprod_odex25_maintenance
+ - preprod_odex25_mobile
+ - preprod_odex25_pos
+ - preprod_odex25_project
+ - preprod_odex25_purchase
+ - preprod_odex25_realstate
+ - preprod_odex25_sales
+ - preprod_odex25_survey
+ - preprod_odex25_transactions
+ - preprod_odex25_website
+ - preprod_openeducat_erp-14.0.1.0
+ - master_odex-event
+ - master_odex25_accounting
+ - master_odex25_base
+ - master_odex25_dms
+ - master_odex25_fleet
+ - master_odex25_ENSAN
+ - master_odex25_hr
+ - master_odex25_inventory
+ - master_odex25_maintenance
+ - master_odex25_mobile
+ - master_odex25_pos
+ - master_odex25_project
+ - master_odex25_purchase
+ - master_odex25_realstate
+ - master_odex25_sales
+ - master_odex25_survey
+ - master_odex25_transactions
+ - master_odex25_website
+ - master_openeducat_erp-14.0.1.0
+
+ workflow_dispatch:
+
+jobs:
+ deploy_master_server:
+ name: Deploy to Master
+ runs-on: app-sever-project-runner
+ if: github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0'
+ steps:
+ - name: Checkout And Restart Project
+ run: |
+ echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
+
+ sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
+ sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
+ sudo systemctl restart ${{ secrets.ODEX25_STANDARD_MASTER_SERVICE }}
+ if [ $? -eq 0 ]; then
+ echo "** [INFO] "MASTER" services have been restarted."
+ else
+ echo "** [ERROR] Failed to restart "MASTER" services."
+ fi
+
+ deploy_preprod_server:
+ name: Deploy to Preprod
+ runs-on: app-sever-project-runner
+ if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
+ steps:
+ - name: Checkout And Restart Project
+ run: |
+ echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
+
+ sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
+ sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
+ sudo systemctl restart ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }}
+ if [ $? -eq 0 ]; then
+ echo "** [INFO] "PREPROD" services have been restarted."
+ else
+ echo "** [ERROR] Failed to restart "PREPROD" services."
+ fi
+
+ deploy_test_server:
+ name: Deploy to Test
+ runs-on: app-sever-project-runner
+ if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
+ steps:
+ - name: Checkout And Restart Project
+ run: |
+ echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
+ sudo chmod +x ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh
+ sudo ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.APP_SERVER_USER14 }} ${{ secrets.APP_SERVER_STANDARD_FOLDER_PATH }} ${{ secrets.CYBER_APP_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
+ sudo systemctl restart ${{ secrets.ENSAN_APP_TEST_SERVICE }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }}
+ if [ $? -eq 0 ]; then
+ echo "** [INFO] "DEV" services have been restarted."
+ else
+ echo "** [ERROR] Failed to restart "DEV" services."
+ fi
From 950d5e974324f307c56428280c2b89e42e8c8ab2 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: Mon, 29 Jul 2024 13:33:11 +0300
Subject: [PATCH 17/22] Update github action file
---
.github/workflows/ensan-project.yml | 79 +++++++----------------------
1 file changed, 19 insertions(+), 60 deletions(-)
diff --git a/.github/workflows/ensan-project.yml b/.github/workflows/ensan-project.yml
index a9a862d1d..cb81a85d8 100644
--- a/.github/workflows/ensan-project.yml
+++ b/.github/workflows/ensan-project.yml
@@ -3,44 +3,25 @@ name: Ensan Project - Pull Code
on:
push:
branches:
- - dev_odex-event
- - dev_odex25_accounting
- - dev_odex25_base
- - dev_odex25_dms
- - dev_odex25_fleet
- - dev_odex25_ENSAN
- - dev_odex25_hr
- - dev_odex25_inventory
- - dev_odex25_maintenance
- - dev_odex25_mobile
- - dev_odex25_pos
- - dev_odex25_project
- - dev_odex25_purchase
- - dev_odex25_realstate
- - dev_odex25_sales
- - dev_odex25_survey
- - dev_odex25_transactions
- - dev_odex25_website
- - dev_openeducat_erp-14.0.1.0
- - preprod_odex-event
- - preprod_odex25_accounting
- - preprod_odex25_base
- - preprod_odex25_dms
- - preprod_odex25_fleet
- - preprod_odex25_ENSAN
- - preprod_odex25_hr
- - preprod_odex25_inventory
- - preprod_odex25_maintenance
- - preprod_odex25_mobile
- - preprod_odex25_pos
- - preprod_odex25_project
- - preprod_odex25_purchase
- - preprod_odex25_realstate
- - preprod_odex25_sales
- - preprod_odex25_survey
- - preprod_odex25_transactions
- - preprod_odex25_website
- - preprod_openeducat_erp-14.0.1.0
+ - master_odex-event
+ - master_odex25_accounting
+ - master_odex25_base
+ - master_odex25_dms
+ - master_odex25_fleet
+ - master_odex25_ENSAN
+ - master_odex25_hr
+ - master_odex25_inventory
+ - master_odex25_maintenance
+ - master_odex25_mobile
+ - master_odex25_pos
+ - master_odex25_project
+ - master_odex25_purchase
+ - master_odex25_realstate
+ - master_odex25_sales
+ - master_odex25_survey
+ - master_odex25_transactions
+ - master_odex25_website
+ - master_openeducat_erp-14.0.1.0
workflow_dispatch:
@@ -57,25 +38,3 @@ jobs:
sudo chmod +x ${{ secrets.ENSAN_PROJECT_PATH }}/scripts/pull_code.sh
sudo ${{ secrets.ENSAN_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.ENSAN_PROJECT_USER }} ${{ secrets.ENSAN_PROJECT_PATH }} ${{ secrets.ENSAN_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/}
- deploy_preprod_server:
- name: Deploy to Preprod
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_ENSAN' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
-
- sudo chmod +x ${{ secrets.ENSAN_APP_PROJECT_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.ENSAN_APP_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.ENSAN_APP_PROJECT_USER }} ${{ secrets.ENSAN_APP_PROJECT_PATH }} ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/preprod_} ${GITHUB_REF#refs/heads/}
-
- deploy_test_server:
- name: Deploy to Test
- runs-on: app-sever-project-runner
- if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_ENSAN' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/dev_openeducat_erp-14.0.1.0'
- steps:
- - name: Checkout And Restart Project
- run: |
- echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}"
- sudo chmod +x ${{ secrets.ENSAN_APP_PROJECT_PATH }}/scripts/pull_code.sh
- sudo ${{ secrets.ENSAN_APP_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.ENSAN_APP_PROJECT_USER }} ${{ secrets.ENSAN_APP_PROJECT_PATH }} ${{ secrets.ENSAN_APP_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/dev_} ${GITHUB_REF#refs/heads/}
From 1f2c7f5e56bb6011f8f3a13d6892c2995e334404 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Mon, 29 Jul 2024 17:11:58 +0300
Subject: [PATCH 18/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index 703b69270..ae5440001 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -49,7 +49,7 @@ class Transaction(models.Model):
h_date =" تاريخ المعاملة الهجري : " +(str(self.transaction_date) if self.transaction_date else '')
datem = " تاريخ المعاملة الميلادي : "+ (str(self.transaction_date) if self.transaction_date else '')
rank = " رتبة المعاملة : "+(str(self.attachment_num) if self.attachment_num else '0')
- full_text = transaction_text + "\n" + subject_text.center(30)+"\n"+h_date+'\n'+datem+'\n'+rank.center(50)
+ full_text = transaction_text + "\n" + subject_text.center(60)+"\n"+h_date+'\n'+datem+'\n'+rank.center(50)
def draw_text(draw, text, position, font, alignment="left"):
text_size = draw.textsize(text, font=font)
From 008eef4e7c456ec6cd072fd7ea47a6ea7d04b4c8 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Mon, 29 Jul 2024 17:18:24 +0300
Subject: [PATCH 19/22] Update outgoing_transaction.py
---
.../models/outgoing_transaction.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/odex25_transactions/exp_transaction_documents/models/outgoing_transaction.py b/odex25_transactions/exp_transaction_documents/models/outgoing_transaction.py
index 6c14516e5..8388e82eb 100644
--- a/odex25_transactions/exp_transaction_documents/models/outgoing_transaction.py
+++ b/odex25_transactions/exp_transaction_documents/models/outgoing_transaction.py
@@ -92,6 +92,12 @@ class OutgoingTransaction(models.Model):
####################################################
#
#
+ def unlink(self):
+ for record in self:
+ if record.state == 'send':
+ raise ValidationError(_('Cannot delete a sent transaction!'))
+ return super(InternalTransaction, self).unlink()
+
def action_draft(self):
for record in self:
"""her i need to review code for to_ids"""
From 9a98f1c04d1196feeb30e05b666e835faf173d07 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Mon, 29 Jul 2024 17:29:11 +0300
Subject: [PATCH 20/22] Update configuration.py
---
.../exp_transaction_documents/models/configuration.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/exp_transaction_documents/models/configuration.py b/odex25_transactions/exp_transaction_documents/models/configuration.py
index 263dd15e3..8032d48b4 100644
--- a/odex25_transactions/exp_transaction_documents/models/configuration.py
+++ b/odex25_transactions/exp_transaction_documents/models/configuration.py
@@ -91,7 +91,7 @@ class AttachmentRule(models.Model):
@api.constrains('file_save')
def _check_attachment_size(self):
- max_size = 10 * 1024 * 1024 # 10 MB
+ max_size = 4 * 1024 * 1024 # 4 MB
for record in self:
if record.file_save:
file_size = len(base64.b64decode(record.file_save))
From f42f580d6c21afccb5f3b2c62e9b73e61beaae74 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Tue, 30 Jul 2024 11:51:21 +0300
Subject: [PATCH 21/22] Update entity.py
---
odex25_transactions/exp_transaction_documents/models/entity.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/exp_transaction_documents/models/entity.py b/odex25_transactions/exp_transaction_documents/models/entity.py
index f93c80eb5..93ed0d330 100644
--- a/odex25_transactions/exp_transaction_documents/models/entity.py
+++ b/odex25_transactions/exp_transaction_documents/models/entity.py
@@ -16,7 +16,7 @@ class Entity(models.Model):
_description = 'Transactions Contacts'
_order = 'name'
- employee_id = fields.Many2one('hr.employee', string='Delivery Employee')
+ employee_id = fields.Char(string='Delivery Employee')
company_name = fields.Char('Delivery Company')
def _normalize_arabic_text(self, text):
translation_map = str.maketrans({
From 27b1e9bd91c57ba3eb39168bac15a26c5fea7c40 Mon Sep 17 00:00:00 2001
From: zainab2097 <149927291+zainab2097@users.noreply.github.com>
Date: Tue, 30 Jul 2024 11:54:00 +0300
Subject: [PATCH 22/22] Update barcode.py
---
odex25_transactions/cm_odex_barcode/models/barcode.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/odex25_transactions/cm_odex_barcode/models/barcode.py b/odex25_transactions/cm_odex_barcode/models/barcode.py
index ae5440001..1f30baf53 100644
--- a/odex25_transactions/cm_odex_barcode/models/barcode.py
+++ b/odex25_transactions/cm_odex_barcode/models/barcode.py
@@ -49,7 +49,7 @@ class Transaction(models.Model):
h_date =" تاريخ المعاملة الهجري : " +(str(self.transaction_date) if self.transaction_date else '')
datem = " تاريخ المعاملة الميلادي : "+ (str(self.transaction_date) if self.transaction_date else '')
rank = " رتبة المعاملة : "+(str(self.attachment_num) if self.attachment_num else '0')
- full_text = transaction_text + "\n" + subject_text.center(60)+"\n"+h_date+'\n'+datem+'\n'+rank.center(50)
+ full_text = transaction_text + "\n" + subject_text.center(100)+"\n"+h_date+'\n'+datem+'\n'+rank.center(60)
def draw_text(draw, text, position, font, alignment="left"):
text_size = draw.textsize(text, font=font)