odoo-addon-ebill-postfinance 18.0.1.2.0__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.
- odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot +12 -0
- odoo/addons/ebill_postfinance/models/account_move.py +9 -9
- odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py +8 -0
- odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py +6 -0
- odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml +1 -0
- {odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info → odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info}/METADATA +1 -1
- {odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info → odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info}/RECORD +9 -9
- {odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info → odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info}/WHEEL +0 -0
- {odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info → odoo_addon_ebill_postfinance-18.0.1.2.0.5.dist-info}/top_level.txt +0 -0
|
@@ -468,6 +468,13 @@ msgstr ""
|
|
|
468
468
|
msgid "The Postfinance system rejected the eBill that was send."
|
|
469
469
|
msgstr ""
|
|
470
470
|
|
|
471
|
+
#. module: ebill_postfinance
|
|
472
|
+
#: model:ir.model.fields,help:ebill_postfinance.field_ebill_postfinance_service__xml_file_language
|
|
473
|
+
msgid ""
|
|
474
|
+
"The language used to generate the XML file, if unset default to the customer"
|
|
475
|
+
" language."
|
|
476
|
+
msgstr ""
|
|
477
|
+
|
|
471
478
|
#. module: ebill_postfinance
|
|
472
479
|
#. odoo-python
|
|
473
480
|
#: code:addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py:0
|
|
@@ -504,6 +511,11 @@ msgstr ""
|
|
|
504
511
|
msgid "XML Yellow Bill"
|
|
505
512
|
msgstr ""
|
|
506
513
|
|
|
514
|
+
#. module: ebill_postfinance
|
|
515
|
+
#: model:ir.model.fields,field_description:ebill_postfinance.field_ebill_postfinance_service__xml_file_language
|
|
516
|
+
msgid "XML file Language"
|
|
517
|
+
msgstr ""
|
|
518
|
+
|
|
507
519
|
#. module: ebill_postfinance
|
|
508
520
|
#: model:ir.model,name:ebill_postfinance.model_ebill_payment_contract
|
|
509
521
|
msgid "eBill Payment Contract"
|
|
@@ -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:
|
|
@@ -324,8 +324,16 @@ class EbillPostfinanceInvoiceMessage(models.Model):
|
|
|
324
324
|
def _get_template_yb(self, jinja_env):
|
|
325
325
|
return jinja_env.get_template(INVOICE_TEMPLATE_YB)
|
|
326
326
|
|
|
327
|
+
def _get_xml_language_code(self):
|
|
328
|
+
if self.service_id.xml_file_language:
|
|
329
|
+
return self.service_id.xml_file_language.code
|
|
330
|
+
if self.ebill_payment_contract_id.partner_id.lang:
|
|
331
|
+
return self.ebill_payment_contract_id.partner_id.lang
|
|
332
|
+
return self.env.lang.code
|
|
333
|
+
|
|
327
334
|
def _generate_payload(self):
|
|
328
335
|
self.ensure_one()
|
|
336
|
+
self = self.with_context(lang=self._get_xml_language_code())
|
|
329
337
|
assert self.state in ("draft", "error")
|
|
330
338
|
if self.service_id.file_type_to_use == "XML":
|
|
331
339
|
if self.service_id.use_file_type_xml_paynet:
|
|
@@ -57,6 +57,12 @@ class EbillPostfinanceService(models.Model):
|
|
|
57
57
|
default="600",
|
|
58
58
|
help="Timeout for each HTTP (GET, POST) request in seconds.",
|
|
59
59
|
)
|
|
60
|
+
xml_file_language = fields.Many2one(
|
|
61
|
+
comodel_name="res.lang",
|
|
62
|
+
string="XML file Language",
|
|
63
|
+
help="The language used to generate the XML file, "
|
|
64
|
+
"if unset default to the customer language.",
|
|
65
|
+
)
|
|
60
66
|
|
|
61
67
|
def _get_service(self):
|
|
62
68
|
return ebilling_postfinance.WebService(
|
|
@@ -4,16 +4,16 @@ odoo/addons/ebill_postfinance/__manifest__.py,sha256=aZVWX38WubWzjgTWbz3rydFTpWt
|
|
|
4
4
|
odoo/addons/ebill_postfinance/data/ir_cron.xml,sha256=MZ7JTxS6NX6R8cW-Zu1Hf37PWFc6Znoh3k-IX3llJEk,542
|
|
5
5
|
odoo/addons/ebill_postfinance/data/mail_activity_type.xml,sha256=mP5La42MmtGFeCHQ_EIeoZ3VdH6cgAhtJx7Wfmos9Go,410
|
|
6
6
|
odoo/addons/ebill_postfinance/data/transmit.method.xml,sha256=q4Mf1yO2Nv_pjhy_lKWhptDEKVHwM7EPCyEhFLmR90s,406
|
|
7
|
-
odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot,sha256=
|
|
7
|
+
odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot,sha256=KzGF68PL61KiMUIUVvpMut0sHlzU1-bp-ksg6EmeyoM,18609
|
|
8
8
|
odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja,sha256=xd25TK21-QjytwddSqKhiJEswKg58t17_U9yl82qqok,9486
|
|
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=
|
|
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
|
-
odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=
|
|
16
|
-
odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py,sha256=
|
|
15
|
+
odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=g_OY9PeSkQOBGApJ2dDBSiZJlqNW-AB9_g9rfk_mMdw,14572
|
|
16
|
+
odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py,sha256=GamfNsIFUt8ic0zzyYec_x0VWCmf7iUTMBHR1fDZXPg,5626
|
|
17
17
|
odoo/addons/ebill_postfinance/models/sale_order.py,sha256=FcZO5xIwLwQ3DfIRhxQ_u3ce4xF4JLRXSoLq4gcxpj0,596
|
|
18
18
|
odoo/addons/ebill_postfinance/readme/CONFIGURE.md,sha256=9Ltm2r63Vf2hXKqelKqy3rRKWqh4uJOui4VXtcLQsmo,668
|
|
19
19
|
odoo/addons/ebill_postfinance/readme/CONTRIBUTORS.md,sha256=-UAChp179PC2iHOfWylWiPmdcRXFo5YjCUrTVcyvZDU,102
|
|
@@ -39,9 +39,9 @@ odoo/addons/ebill_postfinance/tests/samples/invoice_qr_yb_discount.xml,sha256=1p
|
|
|
39
39
|
odoo/addons/ebill_postfinance/tests/samples/yellowbill_qr_iban.xml,sha256=otxiwxkOf1pVOC4jU8EPlZqHzoFNDRTZEcQbEvASn1w,82082
|
|
40
40
|
odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml,sha256=jZJtAsJKs3u9OvSprf0qgPkIdvmrXJxI7ADAPe08Wck,2251
|
|
41
41
|
odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml,sha256=PBuwMKyZwpcoDa6OYKY2a6hN2AZoCer7bMe96uSdadY,3333
|
|
42
|
-
odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml,sha256=
|
|
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.dist-info/METADATA,sha256=
|
|
45
|
-
odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
|
|
46
|
-
odoo_addon_ebill_postfinance-18.0.1.2.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
47
|
-
odoo_addon_ebill_postfinance-18.0.1.2.0.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,,
|
|
File without changes
|