Skip to content

Commit

Permalink
Merge branch '12.0' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino authored Aug 19, 2021
2 parents 8c78a61 + 6f5a502 commit ee9347c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 7 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/trigger_build_prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will trigger a prod build when a release occur on this repo

name: Trigger Docker prod image build

# Controls when the workflow will run
on:
# Triggers this workflow on release events
release:
branches: [ "12.0" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "ask_to_build"
ask_to_build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Trigger a "manual" build on the private repo in charge of building the prod docker image
# See: https://github.community/t/triggering-by-other-repository/16163/2
# Could also be performed with action: https://github.com/peter-evans/repository-dispatch
# Secrets are:
# - PAT_USERNAME: Username of Personnal Access Token
# - PAT_TOKEN: Personnal Access Token
# - BUILDING_REPO_REF: The repo to which trigger a workflow, on the form username/repo or organization/repo
# - WORKFLOW_FILENAME: The workflow to be triggered, identified by its filename
- name: Trigger prod docker image build
run: |
curl -X POST \
-u "${{ secrets.PAT_USERNAME }}:${{ secrets.PAT_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
--data '{"ref": "main"}' \
"https://api.github.com/repos/${{ secrets.BUILDING_REPO_REF }}/actions/workflows/${{ secrets.WORKFLOW_FILENAME }}/dispatches"
1 change: 1 addition & 0 deletions crowdfunding_compassion/forms/project_creation_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ class ProjectCreationStep3(models.AbstractModel):
partner_street = fields.Char(required=True)
partner_zip = fields.Char(required=True)
partner_city = fields.Char(required=True)
partner_phone = fields.Char(required=True)

@property
def _form_fieldsets(self):
Expand Down
4 changes: 2 additions & 2 deletions report_compassion/report/paperformats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="orientation">Portrait</field>
<field name="margin_top">20</field>
<field name="margin_bottom">20</field>
<field name="margin_top">0</field>
<field name="margin_bottom">0</field>
<field name="margin_left">0</field>
<field name="margin_right">0</field>
<field name="header_line" eval="False"/>
Expand Down
4 changes: 2 additions & 2 deletions report_compassion/report/partner_communication.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<t t-set="custom_css">
#header {
margin-left: 15mm;
<t t-if="not bvr and not print_header">
margin-top: -20mm;
<t t-if="bvr or print_header">
margin-top: 20mm;
</t>
height: 45mm;
font-size: 8pt;
Expand Down
9 changes: 6 additions & 3 deletions wordpress_connector/models/match_partner_wp.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def _match_get_rules_order(self):
def _match_rule_child_id(self, partner_obj, infos, options=None):
# if a keyerror is raise it is handled as "no child found go to next rule"
child_local_id = infos.pop("child_id")
child = self.env["compassion.child"].search([("local_id", "like", child_local_id)])
sponsorship = self.env["recurring.contract"].search([("child_id", "=", child.id)], limit=1)
return sponsorship[sponsorship.send_gifts_to]
if child_local_id:
child = self.env["compassion.child"].search([("local_id", "like", child_local_id)])
sponsorship = self.env["recurring.contract"].search([("child_id", "=", child.id)], limit=1)
return sponsorship[sponsorship.send_gifts_to]
else:
return False

0 comments on commit ee9347c

Please sign in to comment.