diff --git a/.github/workflows/dev-preprod-servers.yml b/.github/workflows/dev-preprod-servers.yml index d86cbb29d..0e4906744 100644 --- a/.github/workflows/dev-preprod-servers.yml +++ b/.github/workflows/dev-preprod-servers.yml @@ -23,6 +23,7 @@ on: - dev_odex25_website - dev_openeducat_erp-14.0.1.0 - dev_odex25_ensan + - dev_odex25_donation - preprod_odex-event - preprod_odex25_accounting - preprod_odex25_base @@ -43,6 +44,7 @@ on: - preprod_odex25_website - preprod_openeducat_erp-14.0.1.0 - preprod_odex25_ensan + - preprod_odex25_donation workflow_dispatch: inputs: @@ -60,13 +62,13 @@ jobs: deploy_preprod_server: name: Deploy to Preprod Servers 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' || github.ref == 'refs/heads/preprod_odex25_ensan') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'preprod') + 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' || github.ref == 'refs/heads/preprod_odex25_ensan' || github.ref == 'refs/heads/preprod_odex25_donation') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'preprod') steps: - name: Checkout And Restart Project run: | sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/preprod_pull_standard_code.sh sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/preprod_pull_standard_code.sh - sudo systemctl restart ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_DEMO_PREPROD_SERVICE }} ${{ secrets.HELPDESK_PREPROD_SERVICE }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} + sudo systemctl restart ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_DEMO_PREPROD_SERVICE }} ${{ secrets.HELPDESK_PREPROD_SERVICE }} ${{ secrets.TRAHUM_PREPROD_SERVICE }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} if [ $? -eq 0 ]; then echo "** [INFO] "PREPROD" services have been restarted." else @@ -76,13 +78,13 @@ jobs: deploy_test_server: name: Deploy to Dev Servers 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' || github.ref == 'refs/heads/dev_odex25_ensan') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'dev') + 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' || github.ref == 'refs/heads/dev_odex25_ensan' || github.ref == 'refs/heads/dev_odex25_donation') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'dev') steps: - name: Checkout And Restart Project run: | sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/dev_pull_standard_code.sh sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/dev_pull_standard_code.sh - sudo systemctl restart ${{ secrets.ENSAN_APP_TEST_SERVICE }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }} ${{ secrets.HELPDESK_TEST_SERVICE }} ${{ secrets.KAZ_LIBRARY_TEST_SERVICE }} ${{ secrets.CYBER_APP_TEST_SERVICE }} + sudo systemctl restart ${{ secrets.ENSAN_APP_TEST_SERVICE }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }} ${{ secrets.HELPDESK_TEST_SERVICE }} ${{ secrets.KAZ_LIBRARY_TEST_SERVICE }} ${{ secrets.TRAHUM_TEST_SERVICE }} ${{ secrets.CYBER_APP_TEST_SERVICE }} if [ $? -eq 0 ]; then echo "** [INFO] "DEV" services have been restarted." else diff --git a/odex25_donation/ensan_donation_request/__init__.py b/odex25_donation/ensan_donation_request/__init__.py index e89927ca6..c3d410ea1 100644 --- a/odex25_donation/ensan_donation_request/__init__.py +++ b/odex25_donation/ensan_donation_request/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- from . import models -from . import controllers \ No newline at end of file +from . import controllers diff --git a/odex25_donation/ensan_donation_request/models/donation_request.py b/odex25_donation/ensan_donation_request/models/donation_request.py index 028eefb10..c7fbf1680 100644 --- a/odex25_donation/ensan_donation_request/models/donation_request.py +++ b/odex25_donation/ensan_donation_request/models/donation_request.py @@ -11,6 +11,7 @@ class DonationRequest(models.Model): name = fields.Char(string="Donation Name", required=True, tracking=True, copy=False, default=_('New')) request_number = fields.Char(string="Request Number", readonly=True, default=lambda self: _('New'), copy=False) user_id = fields.Many2one('res.users', string="Responsible/Submitter", default=lambda self: self.env.user) + partner_id = fields.Many2one('res.partner', related='user_id.partner_id', store=True) partner_name = fields.Char(string="Beneficiary Name", related='partner_id.name') @@ -89,6 +90,7 @@ class DonationRequest(models.Model): sms_numbers=[record.partner_mobile] ) + def action_open_product(self): self.ensure_one() return { @@ -154,3 +156,4 @@ class DonationRequest(models.Model): # # notification_ids=notification_ids # ) + diff --git a/odex25_donation/ensan_donation_request/models/product_template.py b/odex25_donation/ensan_donation_request/models/product_template.py index ac19a5d81..bdac6c0d3 100644 --- a/odex25_donation/ensan_donation_request/models/product_template.py +++ b/odex25_donation/ensan_donation_request/models/product_template.py @@ -4,4 +4,4 @@ class ProductTemplate(models.Model): _inherit = 'product.template' donation_request_id = fields.Many2one('donation.request', ondelete='restrict') - hide_from_shop_front = fields.Boolean(related="donation_request_id.is_private_request", store=True) \ No newline at end of file + hide_from_shop_front = fields.Boolean(related="donation_request_id.is_private_request", store=True) diff --git a/odex25_donation/ensan_donation_request/views/donation_request_views.xml b/odex25_donation/ensan_donation_request/views/donation_request_views.xml index 2ca5eea2c..dd9644a47 100644 --- a/odex25_donation/ensan_donation_request/views/donation_request_views.xml +++ b/odex25_donation/ensan_donation_request/views/donation_request_views.xml @@ -164,6 +164,7 @@ +