odoo-addon-ebill-postfinance 16.0.1.0.0.3__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/README.rst +130 -0
- odoo/addons/ebill_postfinance/__init__.py +1 -0
- odoo/addons/ebill_postfinance/__manifest__.py +35 -0
- odoo/addons/ebill_postfinance/data/ir_cron.xml +14 -0
- odoo/addons/ebill_postfinance/data/mail_activity_type.xml +10 -0
- odoo/addons/ebill_postfinance/data/transmit.method.xml +10 -0
- odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot +533 -0
- odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja +238 -0
- odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja +227 -0
- odoo/addons/ebill_postfinance/messages/ybInvoice_V2.0.4.xsd +1395 -0
- odoo/addons/ebill_postfinance/models/__init__.py +5 -0
- odoo/addons/ebill_postfinance/models/account_move.py +140 -0
- odoo/addons/ebill_postfinance/models/ebill_payment_contract.py +73 -0
- odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py +404 -0
- odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py +154 -0
- odoo/addons/ebill_postfinance/models/sale_order.py +19 -0
- odoo/addons/ebill_postfinance/readme/CONFIGURE.rst +13 -0
- odoo/addons/ebill_postfinance/readme/CONTRIBUTORS.rst +1 -0
- odoo/addons/ebill_postfinance/readme/DESCRIPTION.rst +1 -0
- odoo/addons/ebill_postfinance/readme/INSTALL.rst +2 -0
- odoo/addons/ebill_postfinance/readme/ROADMAP.rst +10 -0
- odoo/addons/ebill_postfinance/readme/USAGE.rst +5 -0
- odoo/addons/ebill_postfinance/security/ir.model.access.csv +5 -0
- odoo/addons/ebill_postfinance/static/description/icon.png +0 -0
- odoo/addons/ebill_postfinance/static/description/index.html +470 -0
- odoo/addons/ebill_postfinance/tests/__init__.py +3 -0
- odoo/addons/ebill_postfinance/tests/common.py +194 -0
- odoo/addons/ebill_postfinance/tests/examples/credit_note_yb.xml +176 -0
- odoo/addons/ebill_postfinance/tests/examples/invoice_qr_yb.xml +182 -0
- odoo/addons/ebill_postfinance/tests/examples/yellowbill_qr_iban.xml +178 -0
- odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_ping_service.yaml +1057 -0
- odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_search_invoices.yaml +564 -0
- odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_upload_file.yaml +561 -0
- odoo/addons/ebill_postfinance/tests/test_ebill_postfinance.py +50 -0
- odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb.py +65 -0
- odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb_creditnote.py +67 -0
- odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml +56 -0
- odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml +81 -0
- odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml +136 -0
- odoo/addons/ebill_postfinance/views/message_template.xml +8 -0
- odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/METADATA +149 -0
- odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/RECORD +44 -0
- odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/WHEEL +5 -0
- odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright 2022 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from .common import CommonCase, recorder
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TestEbillPostfinance(CommonCase):
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
super().setUpClass()
|
|
13
|
+
cls.transaction_id = "test-transaction-123"
|
|
14
|
+
cls.invoice_message = cls.invoice.create_postfinance_ebill()
|
|
15
|
+
|
|
16
|
+
@recorder.use_cassette
|
|
17
|
+
def test_ping_service(self):
|
|
18
|
+
"""Check the ping service testing purpose only."""
|
|
19
|
+
self.service.ping_service()
|
|
20
|
+
|
|
21
|
+
@recorder.use_cassette
|
|
22
|
+
def test_upload_file(self):
|
|
23
|
+
"""Check uploading an XML invoice to the service."""
|
|
24
|
+
with open(
|
|
25
|
+
os.path.join(
|
|
26
|
+
os.path.dirname(__file__), "examples", "yellowbill_qr_iban.xml"
|
|
27
|
+
),
|
|
28
|
+
"r",
|
|
29
|
+
) as f:
|
|
30
|
+
data = f.read()
|
|
31
|
+
data = data.encode("utf-8")
|
|
32
|
+
res = self.service.upload_file(self.transaction_id, "XML", data)
|
|
33
|
+
result = res[0]
|
|
34
|
+
self.assertEqual(result.FileType, "XML")
|
|
35
|
+
self.assertEqual(result.TransactionID, "test-transaction-123")
|
|
36
|
+
self.assertEqual(result.ProcessingState, "OK")
|
|
37
|
+
|
|
38
|
+
@recorder.use_cassette
|
|
39
|
+
def test_search_invoices(self):
|
|
40
|
+
"""Check the search invoice endpoint.
|
|
41
|
+
|
|
42
|
+
Get the state of the invoice send in the previous test.
|
|
43
|
+
And update the invoice message record with the result.
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
res = self.service.search_invoice(transaction_id=self.transaction_id)
|
|
47
|
+
data = res.InvoiceList["SearchInvoice"][0]
|
|
48
|
+
self.invoice_message.update_message_from_server_data(data)
|
|
49
|
+
self.assertEqual(self.invoice_message.state, "error")
|
|
50
|
+
self.assertEqual(self.invoice_message.server_state, "invalid")
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Copyright 2022 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
|
3
|
+
|
|
4
|
+
import logging
|
|
5
|
+
import os
|
|
6
|
+
from string import Template
|
|
7
|
+
|
|
8
|
+
from freezegun import freeze_time
|
|
9
|
+
from lxml import etree as ET
|
|
10
|
+
|
|
11
|
+
from odoo.modules.module import get_module_root
|
|
12
|
+
from odoo.tools import file_open
|
|
13
|
+
|
|
14
|
+
from .common import CommonCase
|
|
15
|
+
|
|
16
|
+
_logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@freeze_time("2019-06-21 09:06:00")
|
|
20
|
+
class TestEbillPostfinanceMessageYB(CommonCase):
|
|
21
|
+
@classmethod
|
|
22
|
+
def setUpClass(cls):
|
|
23
|
+
super().setUpClass()
|
|
24
|
+
cls.schema_file = (
|
|
25
|
+
get_module_root(os.path.dirname(__file__))
|
|
26
|
+
+ "/messages/ybInvoice_V2.0.4.xsd"
|
|
27
|
+
)
|
|
28
|
+
# If ebill_postfinance_stock is installed it will break the test
|
|
29
|
+
try:
|
|
30
|
+
cls.invoice.invoice_line_ids.sale_line_ids.write({"move_ids": False})
|
|
31
|
+
except Exception:
|
|
32
|
+
_logger.info("Disabling moves on invoice lines.")
|
|
33
|
+
|
|
34
|
+
def test_invoice_qr(self):
|
|
35
|
+
"""Check XML payload genetated for an invoice."""
|
|
36
|
+
self.invoice.name = "INV_TEST_01"
|
|
37
|
+
self.invoice.invoice_date_due = "2019-07-01"
|
|
38
|
+
message = self.invoice.create_postfinance_ebill()
|
|
39
|
+
message.set_transaction_id()
|
|
40
|
+
message.payload = message._generate_payload_yb()
|
|
41
|
+
# Validate the xml generated on top of the xsd schema
|
|
42
|
+
node = ET.fromstring(message.payload.encode("utf-8"))
|
|
43
|
+
self.assertXmlValidXSchema(node, xschema=None, filename=self.schema_file)
|
|
44
|
+
# Remove the PDF file data from the XML to ease diff check
|
|
45
|
+
lines = message.payload.splitlines()
|
|
46
|
+
for pos, line in enumerate(lines):
|
|
47
|
+
if line.find("MimeType") != -1:
|
|
48
|
+
lines.pop(pos)
|
|
49
|
+
break
|
|
50
|
+
payload = "\n".join(lines).encode("utf8")
|
|
51
|
+
# Prepare the XML file that is expected
|
|
52
|
+
expected_tmpl = Template(
|
|
53
|
+
file_open("ebill_postfinance/tests/examples/invoice_qr_yb.xml").read()
|
|
54
|
+
)
|
|
55
|
+
expected = expected_tmpl.substitute(
|
|
56
|
+
TRANSACTION_ID=message.transaction_id, CUSTOMER_ID=self.customer.id
|
|
57
|
+
).encode("utf8")
|
|
58
|
+
# Remove the comments in the expected xml
|
|
59
|
+
expected_nocomment = [
|
|
60
|
+
line
|
|
61
|
+
for line in expected.split(b"\n")
|
|
62
|
+
if not line.lstrip().startswith(b"<!--")
|
|
63
|
+
]
|
|
64
|
+
expected_nocomment = b"\n".join(expected_nocomment)
|
|
65
|
+
self.assertFalse(self.compare_xml_line_by_line(payload, expected_nocomment))
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Copyright 2022 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
|
3
|
+
|
|
4
|
+
import logging
|
|
5
|
+
import os
|
|
6
|
+
from string import Template
|
|
7
|
+
|
|
8
|
+
from freezegun import freeze_time
|
|
9
|
+
from lxml import etree as ET
|
|
10
|
+
|
|
11
|
+
from odoo.modules.module import get_module_root
|
|
12
|
+
from odoo.tools import file_open
|
|
13
|
+
|
|
14
|
+
from .common import CommonCase
|
|
15
|
+
|
|
16
|
+
_logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@freeze_time("2019-06-21 09:06:00")
|
|
20
|
+
class TestEbillPostfinanceMessageYBCreditNote(CommonCase):
|
|
21
|
+
@classmethod
|
|
22
|
+
def setUpClass(cls):
|
|
23
|
+
super().setUpClass()
|
|
24
|
+
cls.schema_file = (
|
|
25
|
+
get_module_root(os.path.dirname(__file__))
|
|
26
|
+
+ "/messages/ybInvoice_V2.0.4.xsd"
|
|
27
|
+
)
|
|
28
|
+
# If ebill_postfinance_stock is installed it will break the test
|
|
29
|
+
try:
|
|
30
|
+
cls.invoice.invoice_line_ids.sale_line_ids.write({"move_ids": False})
|
|
31
|
+
except Exception:
|
|
32
|
+
_logger.info("Disabling moves on invoice lines.")
|
|
33
|
+
|
|
34
|
+
def test_invoice_credit_note(self):
|
|
35
|
+
"""Check XML payload genetated for a credit note."""
|
|
36
|
+
self.invoice.name = "INV_TEST_01"
|
|
37
|
+
self.invoice.invoice_date_due = "2019-07-01"
|
|
38
|
+
self.invoice.move_type = "out_refund"
|
|
39
|
+
self.invoice.action_post()
|
|
40
|
+
message = self.invoice.create_postfinance_ebill()
|
|
41
|
+
message.set_transaction_id()
|
|
42
|
+
message.payload = message._generate_payload_yb()
|
|
43
|
+
# Validate the xml generated on top of the xsd schema
|
|
44
|
+
node = ET.fromstring(message.payload.encode("utf-8"))
|
|
45
|
+
self.assertXmlValidXSchema(node, xschema=None, filename=self.schema_file)
|
|
46
|
+
# Remove the PDF file data from the XML to ease diff check
|
|
47
|
+
lines = message.payload.splitlines()
|
|
48
|
+
for pos, line in enumerate(lines):
|
|
49
|
+
if line.find("MimeType") != -1:
|
|
50
|
+
lines.pop(pos)
|
|
51
|
+
break
|
|
52
|
+
payload = "\n".join(lines).encode("utf8")
|
|
53
|
+
# Prepare the XML file that is expected
|
|
54
|
+
expected_tmpl = Template(
|
|
55
|
+
file_open("ebill_postfinance/tests/examples/credit_note_yb.xml").read()
|
|
56
|
+
)
|
|
57
|
+
expected = expected_tmpl.substitute(
|
|
58
|
+
TRANSACTION_ID=message.transaction_id, CUSTOMER_ID=self.customer.id
|
|
59
|
+
).encode("utf8")
|
|
60
|
+
# Remove the comments in the expected xml
|
|
61
|
+
expected_nocomment = [
|
|
62
|
+
line
|
|
63
|
+
for line in expected.split(b"\n")
|
|
64
|
+
if not line.lstrip().startswith(b"<!--")
|
|
65
|
+
]
|
|
66
|
+
expected_nocomment = b"\n".join(expected_nocomment)
|
|
67
|
+
self.assertFalse(self.compare_xml_line_by_line(payload, expected_nocomment))
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record id="invoices_sent_to_service_4_contract" model="ir.actions.act_window">
|
|
4
|
+
<field name="name">Invoices Sent to Postfinance</field>
|
|
5
|
+
<field name="res_model">ebill.postfinance.invoice.message</field>
|
|
6
|
+
<field name="type">ir.actions.act_window</field>
|
|
7
|
+
<field name="domain">[('ebill_payment_contract_id', '=', active_id)]</field>
|
|
8
|
+
<field name="view_mode">tree,form</field>
|
|
9
|
+
</record>
|
|
10
|
+
<record model="ir.ui.view" id="ebill_payment_contract_form_view">
|
|
11
|
+
<field name="name">ebill.payment.contract.form (in ebill_postfinance)</field>
|
|
12
|
+
<field name="model">ebill.payment.contract</field>
|
|
13
|
+
<field
|
|
14
|
+
name="inherit_id"
|
|
15
|
+
ref="base_ebill_payment_contract.ebill_payment_contract_form_view"
|
|
16
|
+
/>
|
|
17
|
+
<field name="arch" type="xml">
|
|
18
|
+
<group name="main" position="after">
|
|
19
|
+
<group
|
|
20
|
+
name="postfinance"
|
|
21
|
+
string="Postfinance"
|
|
22
|
+
attrs="{'invisible': [('is_postfinance_contract', '=', False)]}"
|
|
23
|
+
>
|
|
24
|
+
<field name="postfinance_service_id" />
|
|
25
|
+
<field name="postfinance_billerid" />
|
|
26
|
+
<field name="payment_type" />
|
|
27
|
+
<field name="is_postfinance_contract" invisible="1" />
|
|
28
|
+
<field name="is_postfinance_method_on_partner" invisible="1" />
|
|
29
|
+
</group>
|
|
30
|
+
</group>
|
|
31
|
+
|
|
32
|
+
<group name="main" position="before">
|
|
33
|
+
<div class="oe_button_box" name="button_box">
|
|
34
|
+
<button
|
|
35
|
+
name="set_postfinance_method_on_partner"
|
|
36
|
+
help="Sets the invoice transmit method on the customer"
|
|
37
|
+
type="object"
|
|
38
|
+
class="oe_stat_button"
|
|
39
|
+
icon="fa-user-o"
|
|
40
|
+
string="Set invoicing method"
|
|
41
|
+
attrs="{'invisible': [('is_postfinance_method_on_partner', '=', True)]}"
|
|
42
|
+
>
|
|
43
|
+
</button>
|
|
44
|
+
<button
|
|
45
|
+
name="%(invoices_sent_to_service_4_contract)d"
|
|
46
|
+
type="action"
|
|
47
|
+
class="oe_stat_button"
|
|
48
|
+
icon="fa-envelope-o"
|
|
49
|
+
>
|
|
50
|
+
Invoices
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</group>
|
|
54
|
+
</field>
|
|
55
|
+
</record>
|
|
56
|
+
</odoo>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record model="ir.ui.view" id="ebill_postfinance_invoice_message_form_view">
|
|
4
|
+
<field name="name">ebill.postfinance.invoice.message.form</field>
|
|
5
|
+
<field name="model">ebill.postfinance.invoice.message</field>
|
|
6
|
+
<field name="arch" type="xml">
|
|
7
|
+
<form>
|
|
8
|
+
<header>
|
|
9
|
+
<button type="object" name="send_to_postfinance" string="Resend" />
|
|
10
|
+
<button
|
|
11
|
+
type="object"
|
|
12
|
+
name="validate_xml_payload"
|
|
13
|
+
string="Check payload validity"
|
|
14
|
+
/>
|
|
15
|
+
<field
|
|
16
|
+
name="state"
|
|
17
|
+
widget="statusbar"
|
|
18
|
+
readonly="1"
|
|
19
|
+
statusbar_visible="draft,sent,done"
|
|
20
|
+
/>
|
|
21
|
+
</header>
|
|
22
|
+
<sheet>
|
|
23
|
+
<group>
|
|
24
|
+
<group>
|
|
25
|
+
<field name="transaction_id" />
|
|
26
|
+
<field name="submitted_on" />
|
|
27
|
+
</group>
|
|
28
|
+
<group>
|
|
29
|
+
<field name="service_id" />
|
|
30
|
+
<field name="invoice_id" />
|
|
31
|
+
</group>
|
|
32
|
+
</group>
|
|
33
|
+
<group>
|
|
34
|
+
<field name="server_state" />
|
|
35
|
+
<field name="server_reason_code" />
|
|
36
|
+
<field name="server_reason_text" />
|
|
37
|
+
</group>
|
|
38
|
+
<group>
|
|
39
|
+
<field name="response" />
|
|
40
|
+
<field name="payload_size" />
|
|
41
|
+
<field name="payload" />
|
|
42
|
+
<field name="attachment_id" />
|
|
43
|
+
</group>
|
|
44
|
+
</sheet>
|
|
45
|
+
</form>
|
|
46
|
+
</field>
|
|
47
|
+
</record>
|
|
48
|
+
<record model="ir.ui.view" id="ebill_postfinance_invoice_message_search_view">
|
|
49
|
+
<field name="name">ebill.postfinance.invoice.message.search</field>
|
|
50
|
+
<field name="model">ebill.postfinance.invoice.message</field>
|
|
51
|
+
<field name="arch" type="xml">
|
|
52
|
+
<search>
|
|
53
|
+
<filter
|
|
54
|
+
name="in_error"
|
|
55
|
+
string="In Error"
|
|
56
|
+
domain="[('state', '=', 'error')]"
|
|
57
|
+
/>
|
|
58
|
+
<field name="state" />
|
|
59
|
+
<field name="invoice_id" />
|
|
60
|
+
<filter
|
|
61
|
+
string="Invoice"
|
|
62
|
+
name="invoice_id"
|
|
63
|
+
context="{'group_by': 'invoice_id'}"
|
|
64
|
+
/>
|
|
65
|
+
<filter string="State" name="state" context="{'group_by': 'state'}" />
|
|
66
|
+
</search>
|
|
67
|
+
</field>
|
|
68
|
+
</record>
|
|
69
|
+
<record model="ir.ui.view" id="ebill_postfinance_invoice_message_tree_view">
|
|
70
|
+
<field name="name">ebill.postfinance.invoice.message.tree</field>
|
|
71
|
+
<field name="model">ebill.postfinance.invoice.message</field>
|
|
72
|
+
<field name="arch" type="xml">
|
|
73
|
+
<tree create="false" default_order="submitted_on desc">
|
|
74
|
+
<field name="invoice_id" />
|
|
75
|
+
<field name="transaction_id" />
|
|
76
|
+
<field name="submitted_on" />
|
|
77
|
+
<field name="state" />
|
|
78
|
+
</tree>
|
|
79
|
+
</field>
|
|
80
|
+
</record>
|
|
81
|
+
</odoo>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record id="invoices_sent_to_service" model="ir.actions.act_window">
|
|
4
|
+
<field name="name">Invoices Sent to Postfinance</field>
|
|
5
|
+
<field name="res_model">ebill.postfinance.invoice.message</field>
|
|
6
|
+
<field name="type">ir.actions.act_window</field>
|
|
7
|
+
<field name="domain">[('service_id', '=', active_id)]</field>
|
|
8
|
+
<field name="context">{'default_service_id': active_id}</field>
|
|
9
|
+
<field name="view_mode">tree,form</field>
|
|
10
|
+
</record>
|
|
11
|
+
<record id="contract_for_service" model="ir.actions.act_window">
|
|
12
|
+
<field name="name">Subscription</field>
|
|
13
|
+
<field name="res_model">ebill.payment.contract</field>
|
|
14
|
+
<field name="type">ir.actions.act_window</field>
|
|
15
|
+
<field name="domain">[('postfinance_service_id', '=', active_id)]</field>
|
|
16
|
+
<field name="context">{'default_postfinance_service_id': active_id}</field>
|
|
17
|
+
<field name="view_mode">tree,form</field>
|
|
18
|
+
</record>
|
|
19
|
+
<record model="ir.ui.view" id="postfinance_service_form_view">
|
|
20
|
+
<field name="name">postfinance.service.form</field>
|
|
21
|
+
<field name="model">ebill.postfinance.service</field>
|
|
22
|
+
<field name="arch" type="xml">
|
|
23
|
+
<form>
|
|
24
|
+
<header>
|
|
25
|
+
<button
|
|
26
|
+
type="object"
|
|
27
|
+
name="test_ping"
|
|
28
|
+
string="Test connection"
|
|
29
|
+
class="oe_highlight"
|
|
30
|
+
/>
|
|
31
|
+
<button
|
|
32
|
+
type="object"
|
|
33
|
+
name="search_invoice"
|
|
34
|
+
string="Search Invoices"
|
|
35
|
+
class="oe_highlight"
|
|
36
|
+
/>
|
|
37
|
+
</header>
|
|
38
|
+
<sheet>
|
|
39
|
+
<div class="oe_button_box" name="button_box">
|
|
40
|
+
<button
|
|
41
|
+
name="%(contract_for_service)d"
|
|
42
|
+
type="action"
|
|
43
|
+
class="oe_stat_button"
|
|
44
|
+
icon="fa-handshake-o"
|
|
45
|
+
>
|
|
46
|
+
Contracts
|
|
47
|
+
</button>
|
|
48
|
+
<button
|
|
49
|
+
name="%(invoices_sent_to_service)d"
|
|
50
|
+
type="action"
|
|
51
|
+
class="oe_stat_button"
|
|
52
|
+
icon="fa-envelope-o"
|
|
53
|
+
>
|
|
54
|
+
Invoices
|
|
55
|
+
</button>
|
|
56
|
+
<button
|
|
57
|
+
name="toggle_active"
|
|
58
|
+
type="object"
|
|
59
|
+
class="oe_stat_button"
|
|
60
|
+
icon="fa-archive"
|
|
61
|
+
>
|
|
62
|
+
<field
|
|
63
|
+
name="active"
|
|
64
|
+
widget="boolean_button"
|
|
65
|
+
options="{"terminology": "disabled"}"
|
|
66
|
+
/>
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
69
|
+
<label for="name" class="oe_edit_only" />
|
|
70
|
+
<h2>
|
|
71
|
+
<field name="name" class="oe_inline" />
|
|
72
|
+
</h2>
|
|
73
|
+
<group>
|
|
74
|
+
<group>
|
|
75
|
+
<field name="use_test_service" />
|
|
76
|
+
<field name="operation_timeout" />
|
|
77
|
+
<field name="file_type_to_use" readonly="1" />
|
|
78
|
+
<field
|
|
79
|
+
name="use_file_type_xml_paynet"
|
|
80
|
+
attrs="{'invisible':[('file_type_to_use', '!=', 'XML')]}"
|
|
81
|
+
/>
|
|
82
|
+
<field
|
|
83
|
+
name="partner_bank_id"
|
|
84
|
+
options="{'no_create': True}"
|
|
85
|
+
/>
|
|
86
|
+
</group>
|
|
87
|
+
<group>
|
|
88
|
+
<field name="biller_id" />
|
|
89
|
+
<field name="username" />
|
|
90
|
+
<field name="password" password="True" />
|
|
91
|
+
</group>
|
|
92
|
+
</group>
|
|
93
|
+
</sheet>
|
|
94
|
+
</form>
|
|
95
|
+
</field>
|
|
96
|
+
</record>
|
|
97
|
+
<record model="ir.ui.view" id="postfinance_service_search_view">
|
|
98
|
+
<field name="name">postfinance.service.search</field>
|
|
99
|
+
<field name="model">ebill.postfinance.service</field>
|
|
100
|
+
<field name="arch" type="xml">
|
|
101
|
+
<search>
|
|
102
|
+
<field name="name" />
|
|
103
|
+
<filter
|
|
104
|
+
name="all_service"
|
|
105
|
+
string="All"
|
|
106
|
+
domain="['|', ('active', '=', True), ('active', '=', False)]"
|
|
107
|
+
/>
|
|
108
|
+
</search>
|
|
109
|
+
</field>
|
|
110
|
+
</record>
|
|
111
|
+
<record model="ir.ui.view" id="postfinance_service_tree_view">
|
|
112
|
+
<field name="name">postfinance.service.tree</field>
|
|
113
|
+
<field name="model">ebill.postfinance.service</field>
|
|
114
|
+
<field name="arch" type="xml">
|
|
115
|
+
<tree>
|
|
116
|
+
<field name="name" />
|
|
117
|
+
<field name="use_test_service" />
|
|
118
|
+
<field name="biller_id" />
|
|
119
|
+
<field name="active" invisible="1" />
|
|
120
|
+
</tree>
|
|
121
|
+
</field>
|
|
122
|
+
</record>
|
|
123
|
+
<record model="ir.actions.act_window" id="postfinance_service_act_window">
|
|
124
|
+
<field name="name">Postinance eBill Service</field>
|
|
125
|
+
<field name="res_model">ebill.postfinance.service</field>
|
|
126
|
+
<field name="view_mode">tree,form</field>
|
|
127
|
+
<field name="domain">[]</field>
|
|
128
|
+
<field name="context">{'search_default_all_service': 1}</field>
|
|
129
|
+
</record>
|
|
130
|
+
<record model="ir.ui.menu" id="postfinance_service_config_menu">
|
|
131
|
+
<field name="name">Postfinance eBill Service</field>
|
|
132
|
+
<field name="parent_id" ref="account.root_payment_menu" />
|
|
133
|
+
<field name="action" ref="postfinance_service_act_window" />
|
|
134
|
+
<field name="sequence" eval="16" />
|
|
135
|
+
</record>
|
|
136
|
+
</odoo>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-ebill_postfinance
|
|
3
|
+
Version: 16.0.1.0.0.3
|
|
4
|
+
Summary: Postfinance eBill integration
|
|
5
|
+
Home-page: https://github.com/OCA/l10n-switzerland
|
|
6
|
+
Author: Camptocamp,Odoo Community Association (OCA)
|
|
7
|
+
Author-email: support@odoo-community.org
|
|
8
|
+
License: AGPL-3
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Framework :: Odoo
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: ebilling-postfinance
|
|
15
|
+
Requires-Dist: odoo-addon-account-invoice-export <16.1dev,>=16.0dev
|
|
16
|
+
Requires-Dist: odoo-addon-base-ebill-payment-contract <16.1dev,>=16.0dev
|
|
17
|
+
Requires-Dist: odoo <16.1dev,>=16.0a
|
|
18
|
+
Requires-Dist: zeep
|
|
19
|
+
|
|
20
|
+
=================
|
|
21
|
+
eBill Postfinance
|
|
22
|
+
=================
|
|
23
|
+
|
|
24
|
+
..
|
|
25
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
27
|
+
!! changes will be overwritten. !!
|
|
28
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
|
+
!! source digest: sha256:8fe54c201370aabd37f966becd9bc102925267307e434f56a4c558a943f058ed
|
|
30
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
31
|
+
|
|
32
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
33
|
+
:target: https://odoo-community.org/page/development-status
|
|
34
|
+
:alt: Beta
|
|
35
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
|
36
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
37
|
+
:alt: License: AGPL-3
|
|
38
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
|
|
39
|
+
:target: https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance
|
|
40
|
+
:alt: OCA/l10n-switzerland
|
|
41
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
42
|
+
:target: https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-ebill_postfinance
|
|
43
|
+
:alt: Translate me on Weblate
|
|
44
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
45
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0
|
|
46
|
+
:alt: Try me on Runboat
|
|
47
|
+
|
|
48
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
49
|
+
|
|
50
|
+
This module implements the exchange of electronic invoices with the Postfinance web service.
|
|
51
|
+
|
|
52
|
+
**Table of contents**
|
|
53
|
+
|
|
54
|
+
.. contents::
|
|
55
|
+
:local:
|
|
56
|
+
|
|
57
|
+
Installation
|
|
58
|
+
============
|
|
59
|
+
|
|
60
|
+
This module needs the Python library `ebilling_postfiance` which can be installed from Pypi.
|
|
61
|
+
More information can be found at `<repository https://github.com/camptocamp/ebilling-postfinance>`_.
|
|
62
|
+
|
|
63
|
+
Configuration
|
|
64
|
+
=============
|
|
65
|
+
|
|
66
|
+
Create a service
|
|
67
|
+
================
|
|
68
|
+
|
|
69
|
+
First you need to be registred on 'Postfinance eBill service <https://www.postfinance.ch/en/business/products/accounts-receivable-solutions/e-bill-invoice-issuer.html>'
|
|
70
|
+
To create a service go to `Accounting - Configuration - Payments - Postfinance eBill Service`
|
|
71
|
+
|
|
72
|
+
Configure a customer and create his contract
|
|
73
|
+
============================================
|
|
74
|
+
|
|
75
|
+
The contracts specific to Postfinance e-billing are located in `Accounting - Customers - eBill Postfinance Contract`
|
|
76
|
+
Create a contract for a customer with his PayerId and make sure that the contract is active by being in `Open` state with valid start/end dates.
|
|
77
|
+
|
|
78
|
+
Set `Customer Invoice Transmission Method` on the customer to Postfinance.
|
|
79
|
+
|
|
80
|
+
Usage
|
|
81
|
+
=====
|
|
82
|
+
|
|
83
|
+
To use this module, you need to:
|
|
84
|
+
|
|
85
|
+
#. Configure the service, customers and contracts as described in the CONFIGURATION section.
|
|
86
|
+
#. Create an invoice for a customer with an open Postfinance contract.
|
|
87
|
+
#. Validate the invoice, and click the Send eBill button.
|
|
88
|
+
|
|
89
|
+
Known issues / Roadmap
|
|
90
|
+
======================
|
|
91
|
+
|
|
92
|
+
ToDo
|
|
93
|
+
|
|
94
|
+
* Add option to import the contract subscription (csv)
|
|
95
|
+
* Add the download of this csv from web service, but what is the endpoint ?
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
Nice to have
|
|
99
|
+
|
|
100
|
+
* Add a link to the failed job in the chatter message.
|
|
101
|
+
* Add an action on partner to create a ebilling contract.
|
|
102
|
+
|
|
103
|
+
Bug Tracker
|
|
104
|
+
===========
|
|
105
|
+
|
|
106
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
|
|
107
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
108
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
109
|
+
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
110
|
+
|
|
111
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
112
|
+
|
|
113
|
+
Credits
|
|
114
|
+
=======
|
|
115
|
+
|
|
116
|
+
Authors
|
|
117
|
+
~~~~~~~
|
|
118
|
+
|
|
119
|
+
* Camptocamp
|
|
120
|
+
|
|
121
|
+
Contributors
|
|
122
|
+
~~~~~~~~~~~~
|
|
123
|
+
|
|
124
|
+
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
|
125
|
+
|
|
126
|
+
Maintainers
|
|
127
|
+
~~~~~~~~~~~
|
|
128
|
+
|
|
129
|
+
This module is maintained by the OCA.
|
|
130
|
+
|
|
131
|
+
.. image:: https://odoo-community.org/logo.png
|
|
132
|
+
:alt: Odoo Community Association
|
|
133
|
+
:target: https://odoo-community.org
|
|
134
|
+
|
|
135
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
136
|
+
mission is to support the collaborative development of Odoo features and
|
|
137
|
+
promote its widespread use.
|
|
138
|
+
|
|
139
|
+
.. |maintainer-TDu| image:: https://github.com/TDu.png?size=40px
|
|
140
|
+
:target: https://github.com/TDu
|
|
141
|
+
:alt: TDu
|
|
142
|
+
|
|
143
|
+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
144
|
+
|
|
145
|
+
|maintainer-TDu|
|
|
146
|
+
|
|
147
|
+
This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance>`_ project on GitHub.
|
|
148
|
+
|
|
149
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
odoo/addons/ebill_postfinance/README.rst,sha256=XEDJ0JSB4Fvm_K5iN1C-mI9NRgKmgTdETmxl-R9NQEI,4685
|
|
2
|
+
odoo/addons/ebill_postfinance/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
+
odoo/addons/ebill_postfinance/__manifest__.py,sha256=Y3yfqnRRlJH03cq-dGu9f9KqJ6pp3g3EmG6w10HD1JY,1009
|
|
4
|
+
odoo/addons/ebill_postfinance/data/ir_cron.xml,sha256=8Qx-IU5w2M6qWPLurex0IDH9nJhVTcPEVg3QureQKj0,630
|
|
5
|
+
odoo/addons/ebill_postfinance/data/mail_activity_type.xml,sha256=vn41DG3O8F1P1YG4xifAuXHBicY13oHIeKeZTvfshnc,438
|
|
6
|
+
odoo/addons/ebill_postfinance/data/transmit.method.xml,sha256=wiFMLenJbf5Cx4fKS56sWnVf58opiWKIEpT41MYihR0,387
|
|
7
|
+
odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot,sha256=sFABayEUNYIKqnK3Dq67G33jj62DIdpNjdRJ--UYeo8,18685
|
|
8
|
+
odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja,sha256=RLLvsbKIG-Yiwzx1ZE4rruPmlyoV4uMr8sJNUTmeF5k,9516
|
|
9
|
+
odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja,sha256=vsajAMlsFuuyS0eeD_xWol7oPRGMz0coYZZHXZeYQfE,12174
|
|
10
|
+
odoo/addons/ebill_postfinance/messages/ybInvoice_V2.0.4.xsd,sha256=5fbM7Miwb59sXvUgjwJMszIJ19NuHQU3gsGaxTO27fA,48785
|
|
11
|
+
odoo/addons/ebill_postfinance/models/__init__.py,sha256=2uZGfhJOczB94W5EFvXlky-tXcJeWRF9O1-rtCGvuxA,177
|
|
12
|
+
odoo/addons/ebill_postfinance/models/account_move.py,sha256=JnMnT1Fu8HtgTKTQaMm2_eLu_hv18SF-l6GSTMXlLaM,5208
|
|
13
|
+
odoo/addons/ebill_postfinance/models/ebill_payment_contract.py,sha256=kVunbB_XN6pw0zcf6iCfe-ceuqMpoalw3TIr1UEtST4,2913
|
|
14
|
+
odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=prOJbNW0WJJd-qJNVhsSGgc-VJ8f6W4uTuLIwtSFF5g,15535
|
|
15
|
+
odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py,sha256=8yn9FqlXv_bA26mvlGRslW4cfKVmHRIKpZDziixeLzE,5404
|
|
16
|
+
odoo/addons/ebill_postfinance/models/sale_order.py,sha256=M2xxj8F5InyBMgJFRJX3ARrXYy70VVcUpdcrd6Ujii8,597
|
|
17
|
+
odoo/addons/ebill_postfinance/readme/CONFIGURE.rst,sha256=2RxGc9in7UFE1DUKz_z5mgXcgkJWmk7l2xsOL86AzKc,728
|
|
18
|
+
odoo/addons/ebill_postfinance/readme/CONTRIBUTORS.rst,sha256=uAPcwg62NVS4AhHWOH1ylKl_Fyk39Tz7bGv0X4PC5Xs,51
|
|
19
|
+
odoo/addons/ebill_postfinance/readme/DESCRIPTION.rst,sha256=EMQrIPrfP7M_tLpV_88DW20SQ_2FHCj3MyqkYcDJ6DM,93
|
|
20
|
+
odoo/addons/ebill_postfinance/readme/INSTALL.rst,sha256=RuSmRKy3-0dy0LLBvonTcIF7JUERVM0kbpvJqxxcLLo,194
|
|
21
|
+
odoo/addons/ebill_postfinance/readme/ROADMAP.rst,sha256=LIkYLW8NdngN_pSjhmjDM1F_9ZNsFUyXDplDzfyUlek,266
|
|
22
|
+
odoo/addons/ebill_postfinance/readme/USAGE.rst,sha256=6yddFhmoN74--rLm0pmVa5azulbhUW7K3bYnO9vSIHA,256
|
|
23
|
+
odoo/addons/ebill_postfinance/security/ir.model.access.csv,sha256=fJD04mfPfepHjkTEJxMqMdSM5CX7pYGy3cPP-b6GC-A,687
|
|
24
|
+
odoo/addons/ebill_postfinance/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
25
|
+
odoo/addons/ebill_postfinance/static/description/index.html,sha256=otn-rP3cuD1QcdY0wbJesez-IT48DdiJSVrGBZww4o0,15669
|
|
26
|
+
odoo/addons/ebill_postfinance/tests/__init__.py,sha256=_OvInRZJ36eC1p_O1Ip8NmFzMe2sakl8IYI6OU4ye9o,144
|
|
27
|
+
odoo/addons/ebill_postfinance/tests/common.py,sha256=kh0AGK0tvhXJMLnbNtOOBnhQML7UQqMFExvzW6-le4k,7458
|
|
28
|
+
odoo/addons/ebill_postfinance/tests/test_ebill_postfinance.py,sha256=KpyAx2K9H0RUFNqn9BppI0JlXswDrDVGMQzeI8j3NKs,1752
|
|
29
|
+
odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb.py,sha256=db-LWnT83XIz-wr_8uiVXOip2kM91PdYUbhPOmtwMuQ,2446
|
|
30
|
+
odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb_creditnote.py,sha256=kLywWsOueBjPm1vsx2fhZvhgy_2mxyWQ791S_EpkeRU,2550
|
|
31
|
+
odoo/addons/ebill_postfinance/tests/examples/credit_note_yb.xml,sha256=9J5A0d9K-4ULmyjd0b2jpHREtEU5tk2PRs4eHEKzxM4,8452
|
|
32
|
+
odoo/addons/ebill_postfinance/tests/examples/invoice_qr_yb.xml,sha256=5Bkf5ePizH7rLOxD-swMNNmyEBOyJz0zkILYrJPnWRM,8733
|
|
33
|
+
odoo/addons/ebill_postfinance/tests/examples/yellowbill_qr_iban.xml,sha256=o6Q5l9hHG0S9RtVjLoXccJ5Arh3CI98y1BD5JMlym84,79818
|
|
34
|
+
odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_ping_service.yaml,sha256=iJqfZeJIrrK-H7dXwTzYDqqheRpW9APHqjVjQsfwa0c,70472
|
|
35
|
+
odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_search_invoices.yaml,sha256=rcVgP3wrk8xV8BfcPNlPyfE3UpC-kDOpPpWI2C-H3vE,37776
|
|
36
|
+
odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_upload_file.yaml,sha256=u5trLGrZ8OjtsQrsWZ-xwEWB8Ryk9oefKlxfqf2SkvE,142979
|
|
37
|
+
odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml,sha256=efZjo1o4-__vVKU35lfkJ51G97AozOEIzWqRegPKsv4,2452
|
|
38
|
+
odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml,sha256=Mj2TrBjOS2fxaINA_ycsNTqP5Y3KPsWtvGWv2IkxcDM,3269
|
|
39
|
+
odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml,sha256=KhYEQtbxpo91QohFoGED9dIHPAP6AzLdsP_IFPZU5Vc,5989
|
|
40
|
+
odoo/addons/ebill_postfinance/views/message_template.xml,sha256=gNBva1ehWFgz6W6lrNCmpxZ_maovQJxhHcBpxcohvZo,213
|
|
41
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/METADATA,sha256=yVygSai-iBGtfuqs74DUvOELSxOEs-RgfaL9rjRauI4,5409
|
|
42
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
43
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
44
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info/RECORD,,
|