Skip to content

Commit

Permalink
Merge branch '14.0' into T1789-sponsorship-gifts
Browse files Browse the repository at this point in the history
  • Loading branch information
clementcharmillot authored Sep 4, 2024
2 parents d5d288f + f21e779 commit bb38b6e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
16 changes: 16 additions & 0 deletions interaction_resume/models/crm_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ class CrmRequest(models.Model):
def _get_interaction_data(self, partner_id):
res = []
for claim in self:
if claim.description:
res.append(
{
"partner_id": partner_id,
"res_model": self._name,
"res_id": claim.id,
"direction": "in",
"date": claim.create_date,
"email": claim.email_from or claim.partner_id.email,
"communication_type": "Support",
"subject": claim.name,
"body": html2plaintext(claim.description).replace("\n\n", "\n"),
"has_attachment": bool(claim.message_attachment_count),
"tracking_status": "delivered",
}
)
messages = claim.message_ids.filtered(
lambda m: m.message_type in ("email", "comment")
and (m.author_id.id == partner_id or partner_id in m.partner_ids.ids)
Expand Down
2 changes: 1 addition & 1 deletion interaction_resume/models/other_interaction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from odoo import models, fields
from odoo import fields, models
from odoo.tools import html2plaintext


Expand Down
4 changes: 3 additions & 1 deletion sbc_compassion/migrations/14.0.1.0.2/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
@openupgrade.migrate()
def migrate(env, version):
if version:
letters = env["correspondence"].search([("read_url", "=", False), ("uuid", "!=", False)])
letters = env["correspondence"].search(
[("read_url", "=", False), ("uuid", "!=", False)]
)
letters.with_delay()._compute_read_url()
3 changes: 0 additions & 3 deletions sbc_compassion/models/correspondence.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,6 @@ def enrich_letter(self, vals):

def process_letter(self):
"""Method called when new B2S letter is Published."""
base_url = (
self.env["ir.config_parameter"].sudo().get_param("web.external.url", "")
)
self.download_attach_letter_image(letter_type="final_letter_url")
return True

Expand Down
1 change: 0 additions & 1 deletion sponsorship_compassion/models/contract_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ def _should_skip_invoice_generation(self, invoicing_date, contract=None):
and self.invoice_suspended_until > invoicing_date
)
return bool(existing_invoices) or is_suspended

0 comments on commit bb38b6e

Please sign in to comment.