odoo-addon-ebill-postfinance 16.0.1.0.0.8__py3-none-any.whl → 16.0.1.0.0.11__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.
@@ -42,30 +42,36 @@ class AccountMove(models.Model):
42
42
  self.invoice_exported = True
43
43
  return "Postfinance invoice generated and in state {}".format(message.state)
44
44
 
45
+ def _get_ebill_postfinance_pdf_report(self, payment_type):
46
+ """Get the report name(s) to be used to generate the pdf send with the eBill."""
47
+ report_names = ["account.report_invoice"]
48
+ if self.move_type == "out_invoice":
49
+ # Should it not depends on the invoice being sent, instead of a
50
+ # configuration on the contract ?
51
+ if payment_type == "qr":
52
+ report_names.append("l10n_ch.qr_report_main")
53
+ return report_names
54
+
45
55
  def create_postfinance_ebill(self):
46
56
  """Generate the message record for an invoice."""
47
57
  self.ensure_one()
48
58
  contract = self.partner_id.get_active_contract(self.transmit_method_id)
49
59
  if not contract:
50
60
  return
51
- # Generate PDf to be send
52
- pdf_data = []
53
- # When test are run, pdf are not generated, so use an empty pdf
54
- pdf = b""
55
- report_names = ["account.report_invoice"]
56
61
  payment_type = ""
57
62
  if self.move_type == "out_invoice":
58
63
  payment_type = "iban"
59
- if contract.payment_type == "qr":
60
- report_names.append("l10n_ch.qr_report_main")
61
64
  elif self.move_type == "out_refund":
62
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(payment_type)
63
71
  for report_name in report_names:
64
- # r = self.env["ir.actions.report"]._get_report_from_name(report_name)
65
72
  pdf_content, _ = self.env["ir.actions.report"]._render(
66
73
  report_name, [self.id]
67
74
  )
68
- # pdf_content, _ = r._render([self.id])
69
75
  pdf_data.append(pdf_content)
70
76
  if not odoo.tools.config["test_enable"]:
71
77
  if len(pdf_data) > 1:
@@ -40,7 +40,7 @@ class CommonCase(TransactionCase, XmlTestMixin):
40
40
  cls.company.email = "info@camptocamp.com"
41
41
  cls.company.phone = ""
42
42
  cls.bank = cls.env.ref("base.res_bank_1")
43
- cls.bank.bic = 777
43
+ cls.bank.bic = "POFICHBEXXX"
44
44
  cls.tax7 = cls.env.ref("l10n_ch.{}_vat_77".format(cls.company.id))
45
45
  cls.partner_bank = cls.env["res.partner.bank"].create(
46
46
  {
@@ -80,7 +80,7 @@
80
80
  <PaymentType>IBAN</PaymentType>
81
81
  <fixAmount>Yes</fixAmount>
82
82
  <IBAN>
83
- <BIC>777</BIC>
83
+ <BIC>POFICHBEXXX</BIC>
84
84
  <BankName>Reserve</BankName>
85
85
  <IBAN>CH2130808001234567827</IBAN>
86
86
  <CreditorReference>210000000003139471430009017</CreditorReference>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-ebill_postfinance
3
- Version: 16.0.1.0.0.8
3
+ Version: 16.0.1.0.0.11
4
4
  Summary: Postfinance eBill integration
5
5
  Home-page: https://github.com/OCA/l10n-switzerland
6
6
  Author: Camptocamp,Odoo Community Association (OCA)
@@ -9,7 +9,7 @@ odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja,sha256=RLLvsbKIG-Yiwz
9
9
  odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja,sha256=HtLKEyFuzfHxMY50qbPRZULO44COqtgEdQO02uoEyy0,12239
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=2uZGfhJOczB94W5EFvXlky-tXcJeWRF9O1-rtCGvuxA,177
12
- odoo/addons/ebill_postfinance/models/account_move.py,sha256=n2fqw4cNhl948EcUxM7yBoFNTEffgStQrEma4OTgFnM,5297
12
+ odoo/addons/ebill_postfinance/models/account_move.py,sha256=2GEbzHU44xrBnC4SG2Z18p25JkjJRe6-852iMV47BCU,5576
13
13
  odoo/addons/ebill_postfinance/models/ebill_payment_contract.py,sha256=kVunbB_XN6pw0zcf6iCfe-ceuqMpoalw3TIr1UEtST4,2913
14
14
  odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=5vjw0Oo8c7fFeO9l3llYGp_K9nSAqmwExSifxmQLLlg,14041
15
15
  odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py,sha256=8yn9FqlXv_bA26mvlGRslW4cfKVmHRIKpZDziixeLzE,5404
@@ -24,12 +24,12 @@ odoo/addons/ebill_postfinance/security/ir.model.access.csv,sha256=fJD04mfPfepHjk
24
24
  odoo/addons/ebill_postfinance/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
25
25
  odoo/addons/ebill_postfinance/static/description/index.html,sha256=otn-rP3cuD1QcdY0wbJesez-IT48DdiJSVrGBZww4o0,15669
26
26
  odoo/addons/ebill_postfinance/tests/__init__.py,sha256=_OvInRZJ36eC1p_O1Ip8NmFzMe2sakl8IYI6OU4ye9o,144
27
- odoo/addons/ebill_postfinance/tests/common.py,sha256=kh0AGK0tvhXJMLnbNtOOBnhQML7UQqMFExvzW6-le4k,7458
27
+ odoo/addons/ebill_postfinance/tests/common.py,sha256=eU0TWIS7DN4SErAc3AKzVouXm8LXa9bJmlHyJcLtt9w,7468
28
28
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance.py,sha256=KpyAx2K9H0RUFNqn9BppI0JlXswDrDVGMQzeI8j3NKs,1752
29
29
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb.py,sha256=db-LWnT83XIz-wr_8uiVXOip2kM91PdYUbhPOmtwMuQ,2446
30
30
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb_creditnote.py,sha256=kLywWsOueBjPm1vsx2fhZvhgy_2mxyWQ791S_EpkeRU,2550
31
31
  odoo/addons/ebill_postfinance/tests/examples/credit_note_yb.xml,sha256=JroiAlfZO44vSEFcJ3MvWL5thOeZBBOhNdqd1b25XEI,8441
32
- odoo/addons/ebill_postfinance/tests/examples/invoice_qr_yb.xml,sha256=8xRr-79-FcedVCS43Agcw9sirB6WbPPr4_ReVdPCSBE,8721
32
+ odoo/addons/ebill_postfinance/tests/examples/invoice_qr_yb.xml,sha256=9bThpmfj26t-xf-3mO4JkZpggprSKddWOtkyCyuwi4c,8729
33
33
  odoo/addons/ebill_postfinance/tests/examples/yellowbill_qr_iban.xml,sha256=o6Q5l9hHG0S9RtVjLoXccJ5Arh3CI98y1BD5JMlym84,79818
34
34
  odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_ping_service.yaml,sha256=iJqfZeJIrrK-H7dXwTzYDqqheRpW9APHqjVjQsfwa0c,70472
35
35
  odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_search_invoices.yaml,sha256=rcVgP3wrk8xV8BfcPNlPyfE3UpC-kDOpPpWI2C-H3vE,37776
@@ -38,7 +38,7 @@ odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml,sha256=efZjo1o4-_
38
38
  odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml,sha256=Mj2TrBjOS2fxaINA_ycsNTqP5Y3KPsWtvGWv2IkxcDM,3269
39
39
  odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml,sha256=KhYEQtbxpo91QohFoGED9dIHPAP6AzLdsP_IFPZU5Vc,5989
40
40
  odoo/addons/ebill_postfinance/views/message_template.xml,sha256=gNBva1ehWFgz6W6lrNCmpxZ_maovQJxhHcBpxcohvZo,213
41
- odoo_addon_ebill_postfinance-16.0.1.0.0.8.dist-info/METADATA,sha256=SMLQuTf63WV85K5pRYFT3aNzWwJdaMOliUqBXOHAfm8,5406
42
- odoo_addon_ebill_postfinance-16.0.1.0.0.8.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
43
- odoo_addon_ebill_postfinance-16.0.1.0.0.8.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
44
- odoo_addon_ebill_postfinance-16.0.1.0.0.8.dist-info/RECORD,,
41
+ odoo_addon_ebill_postfinance-16.0.1.0.0.11.dist-info/METADATA,sha256=59NmAKaBvsFQgegKvu6A2nmIjDwYNTIklWmlcSvDB7Y,5407
42
+ odoo_addon_ebill_postfinance-16.0.1.0.0.11.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
43
+ odoo_addon_ebill_postfinance-16.0.1.0.0.11.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
44
+ odoo_addon_ebill_postfinance-16.0.1.0.0.11.dist-info/RECORD,,