odoo-addon-ebill-postfinance 18.0.1.2.0.2__py3-none-any.whl → 18.0.1.2.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,30 +48,30 @@ class AccountMove(models.Model):
48
48
  self.invoice_exported = True
49
49
  return f"Postfinance invoice generated and in state {message.state}"
50
50
 
51
+ def _get_ebill_postfinance_pdf_report(self):
52
+ """Get the report name(s) to be used to generate the pdf send with the eBill."""
53
+ return ["account.report_invoice"]
54
+
51
55
  def create_postfinance_ebill(self):
52
56
  """Generate the message record for an invoice."""
53
57
  self.ensure_one()
54
58
  contract = self.partner_id.get_active_contract(self.transmit_method_id)
55
59
  if not contract:
56
60
  return
57
- # Generate PDf to be send
58
- pdf_data = []
59
- # When test are run, pdf are not generated, so use an empty pdf
60
- pdf = b""
61
- report_names = ["account.report_invoice"]
62
61
  payment_type = ""
63
62
  if self.move_type == "out_invoice":
64
63
  payment_type = "iban"
65
- if contract.payment_type == "qr":
66
- report_names.append("l10n_ch.qr_report_main")
67
64
  elif self.move_type == "out_refund":
68
65
  payment_type = "credit"
66
+ # Generate PDf to be send
67
+ pdf_data = []
68
+ # When test are run, pdf are not generated, so use an empty pdf
69
+ pdf = b""
70
+ report_names = self._get_ebill_postfinance_pdf_report()
69
71
  for report_name in report_names:
70
- # r = self.env["ir.actions.report"]._get_report_from_name(report_name)
71
72
  pdf_content, _ = self.env["ir.actions.report"]._render(
72
73
  report_name, [self.id]
73
74
  )
74
- # pdf_content, _ = r._render([self.id])
75
75
  pdf_data.append(pdf_content)
76
76
  if not odoo.tools.config["test_enable"]:
77
77
  if len(pdf_data) > 1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-ebill_postfinance
3
- Version: 18.0.1.2.0.2
3
+ Version: 18.0.1.2.0.5
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: ebilling_postfinance
6
6
  Requires-Dist: odoo-addon-account_invoice_export==18.0.*
@@ -9,7 +9,7 @@ odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja,sha256=xd25TK21-Qjytw
9
9
  odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja,sha256=cWrC0Y0Whfos_RWTlzkqw7Lod3XIMokJBlGWltAVPug,12376
10
10
  odoo/addons/ebill_postfinance/messages/ybInvoice_V2.0.4.xsd,sha256=5fbM7Miwb59sXvUgjwJMszIJ19NuHQU3gsGaxTO27fA,48785
11
11
  odoo/addons/ebill_postfinance/models/__init__.py,sha256=94IEqunNsjKCa5QhjyG9Nf8fIWkrUF9cQX1nUHEybiw,209
12
- odoo/addons/ebill_postfinance/models/account_move.py,sha256=dtDrHqQ9b1G2fuSSNJcoIVBwWTqO84uqUJHvlL9hUd4,5496
12
+ odoo/addons/ebill_postfinance/models/account_move.py,sha256=RP8AfkgL2Q4tHvCe0PjM4kqDRqeXZa1nBBfRDcls16M,5448
13
13
  odoo/addons/ebill_postfinance/models/account_move_line.py,sha256=uvkDXVDtKqLYVqUNO-b0mPU5mWlvhLwIBv7UERQkPyg,1040
14
14
  odoo/addons/ebill_postfinance/models/ebill_payment_contract.py,sha256=iUal5MIzTB40i9Y-nMYlAmWJsNI4pTVZGUGQIE1j2V4,2979
15
15
  odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=g_OY9PeSkQOBGApJ2dDBSiZJlqNW-AB9_g9rfk_mMdw,14572
@@ -41,7 +41,7 @@ odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml,sha256=jZJtAsJKs3
41
41
  odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml,sha256=PBuwMKyZwpcoDa6OYKY2a6hN2AZoCer7bMe96uSdadY,3333
42
42
  odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml,sha256=QTCAkVkmu0clT2tQV4-RST2ms1GLiuXYmmsiWUX50hQ,6062
43
43
  odoo/addons/ebill_postfinance/views/message_template.xml,sha256=gNBva1ehWFgz6W6lrNCmpxZ_maovQJxhHcBpxcohvZo,213
44
- odoo_addon_ebill_postfinance-18.0.1.2.0.2.dist-info/METADATA,sha256=w5d4AI1S78D8FwMhtqtcjbzXa3wVWGchmuB-f9f68gE,5683
45
- odoo_addon_ebill_postfinance-18.0.1.2.0.2.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
46
- odoo_addon_ebill_postfinance-18.0.1.2.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
47
- odoo_addon_ebill_postfinance-18.0.1.2.0.2.dist-info/RECORD,,
44
+ odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info/METADATA,sha256=Ik3y6vktCm8ToimHK3SDo1iamlG-qgrYy2i4TBlY9Ls,5683
45
+ odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
46
+ odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
47
+ odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info/RECORD,,