Skip to content

Commit

Permalink
Merge pull request #7 from CompassionCH/FIX-T1633-urgent-mini-child-p…
Browse files Browse the repository at this point in the history
…ack-wp-French-text-in-English

Fix t1633 urgent mini child pack wp french text in english
  • Loading branch information
NoeBerdoz authored Jul 18, 2024
2 parents 11a03f4 + 0fcc13a commit 5761a67
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions base_report_to_printer/models/ir_actions_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,17 @@ def print_document(self, record_ids, data=None):
% str(self.report_type)
)
method_name = "_render_qweb_%s" % (report_type)
document, doc_format = getattr(
self.with_context(must_skip_send_to_printer=True), method_name
)(record_ids, data=data)

if "lang" in data and data["lang"]:
document, doc_format = getattr(
self.with_context(must_skip_send_to_printer=True, lang=data["lang"]),
method_name,
)(record_ids, data=data)
else:
document, doc_format = getattr(
self.with_context(must_skip_send_to_printer=True), method_name
)(record_ids, data=data)

behaviour = self.behaviour()
printer = behaviour.pop("printer", None)

Expand Down

0 comments on commit 5761a67

Please sign in to comment.