odoo-addon-ebill-postfinance-stock 16.0.1.0.0.1__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_stock/README.rst +84 -0
- odoo/addons/ebill_postfinance_stock/__init__.py +1 -0
- odoo/addons/ebill_postfinance_stock/__manifest__.py +17 -0
- odoo/addons/ebill_postfinance_stock/i18n/ebill_postfinance_stock.pot +19 -0
- odoo/addons/ebill_postfinance_stock/messages/invoice-line-stock-yellowbill.jinja +10 -0
- odoo/addons/ebill_postfinance_stock/models/__init__.py +1 -0
- odoo/addons/ebill_postfinance_stock/models/ebill_postfinance_invoice_message.py +24 -0
- odoo/addons/ebill_postfinance_stock/readme/CONTRIBUTORS.rst +1 -0
- odoo/addons/ebill_postfinance_stock/readme/DESCRIPTION.rst +1 -0
- odoo/addons/ebill_postfinance_stock/static/description/icon.png +0 -0
- odoo/addons/ebill_postfinance_stock/static/description/index.html +423 -0
- odoo/addons/ebill_postfinance_stock/tests/__init__.py +1 -0
- odoo/addons/ebill_postfinance_stock/tests/examples/invoice_qr_yb.xml +192 -0
- odoo/addons/ebill_postfinance_stock/tests/test_ebill_postfinance_message_yb.py +60 -0
- odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/METADATA +100 -0
- odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/RECORD +18 -0
- odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/WHEEL +5 -0
- odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
=======================
|
|
2
|
+
eBill Postfinance Stock
|
|
3
|
+
=======================
|
|
4
|
+
|
|
5
|
+
..
|
|
6
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
7
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
8
|
+
!! changes will be overwritten. !!
|
|
9
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
+
!! source digest: sha256:d560906a22ebe7ea9c8860c9debf497de39154cb16cf9b93cdf7123f96203532
|
|
11
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
|
|
13
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
14
|
+
:target: https://odoo-community.org/page/development-status
|
|
15
|
+
:alt: Beta
|
|
16
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
|
17
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
|
+
:alt: License: AGPL-3
|
|
19
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
|
|
20
|
+
:target: https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock
|
|
21
|
+
:alt: OCA/l10n-switzerland
|
|
22
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
+
:target: https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-ebill_postfinance_stock
|
|
24
|
+
:alt: Translate me on Weblate
|
|
25
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0
|
|
27
|
+
:alt: Try me on Runboat
|
|
28
|
+
|
|
29
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
30
|
+
|
|
31
|
+
This module adds some information related to delivery in the eBill Postfinance integration.
|
|
32
|
+
|
|
33
|
+
**Table of contents**
|
|
34
|
+
|
|
35
|
+
.. contents::
|
|
36
|
+
:local:
|
|
37
|
+
|
|
38
|
+
Bug Tracker
|
|
39
|
+
===========
|
|
40
|
+
|
|
41
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
|
|
42
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
43
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
44
|
+
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance_stock%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
45
|
+
|
|
46
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
47
|
+
|
|
48
|
+
Credits
|
|
49
|
+
=======
|
|
50
|
+
|
|
51
|
+
Authors
|
|
52
|
+
~~~~~~~
|
|
53
|
+
|
|
54
|
+
* Camptocamp
|
|
55
|
+
|
|
56
|
+
Contributors
|
|
57
|
+
~~~~~~~~~~~~
|
|
58
|
+
|
|
59
|
+
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
|
60
|
+
|
|
61
|
+
Maintainers
|
|
62
|
+
~~~~~~~~~~~
|
|
63
|
+
|
|
64
|
+
This module is maintained by the OCA.
|
|
65
|
+
|
|
66
|
+
.. image:: https://odoo-community.org/logo.png
|
|
67
|
+
:alt: Odoo Community Association
|
|
68
|
+
:target: https://odoo-community.org
|
|
69
|
+
|
|
70
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
71
|
+
mission is to support the collaborative development of Odoo features and
|
|
72
|
+
promote its widespread use.
|
|
73
|
+
|
|
74
|
+
.. |maintainer-TDu| image:: https://github.com/TDu.png?size=40px
|
|
75
|
+
:target: https://github.com/TDu
|
|
76
|
+
:alt: TDu
|
|
77
|
+
|
|
78
|
+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
79
|
+
|
|
80
|
+
|maintainer-TDu|
|
|
81
|
+
|
|
82
|
+
This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock>`_ project on GitHub.
|
|
83
|
+
|
|
84
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import models
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright 2022 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
"name": "eBill Postfinance Stock",
|
|
6
|
+
"summary": """Add stock integration to Postfinance eBill""",
|
|
7
|
+
"version": "16.0.1.0.0",
|
|
8
|
+
"license": "AGPL-3",
|
|
9
|
+
"author": "Camptocamp,Odoo Community Association (OCA)",
|
|
10
|
+
"maintainers": ["TDu"],
|
|
11
|
+
"website": "https://github.com/OCA/l10n-switzerland",
|
|
12
|
+
"depends": [
|
|
13
|
+
"ebill_postfinance",
|
|
14
|
+
"sale_stock",
|
|
15
|
+
],
|
|
16
|
+
"auto_install": True,
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * ebill_postfinance_stock
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
|
9
|
+
"Last-Translator: \n"
|
|
10
|
+
"Language-Team: \n"
|
|
11
|
+
"MIME-Version: 1.0\n"
|
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
+
"Content-Transfer-Encoding: \n"
|
|
14
|
+
"Plural-Forms: \n"
|
|
15
|
+
|
|
16
|
+
#. module: ebill_postfinance_stock
|
|
17
|
+
#: model:ir.model,name:ebill_postfinance_stock.model_ebill_postfinance_invoice_message
|
|
18
|
+
msgid "Postfinance message send to service"
|
|
19
|
+
msgstr ""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% for picking in line.sale_line_ids.move_ids.mapped('picking_id') %}
|
|
2
|
+
{%- if picking.state != 'cancel' %}
|
|
3
|
+
{% set ref.position = ref.position + 1 %}
|
|
4
|
+
<FixedReference>
|
|
5
|
+
<ReferencePosition>{{ ref.position }}</ReferencePosition>
|
|
6
|
+
<ReferenceType>DeliveryNoteNumber</ReferenceType>
|
|
7
|
+
<ReferenceValue>{{ picking.name }}</ReferenceValue>
|
|
8
|
+
</FixedReference>
|
|
9
|
+
{%- endif %}
|
|
10
|
+
{% endfor %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import ebill_postfinance_invoice_message
|
|
@@ -0,0 +1,24 @@
|
|
|
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 odoo import models
|
|
7
|
+
from odoo.modules.module import get_module_root
|
|
8
|
+
|
|
9
|
+
MODULE_PATH = get_module_root(os.path.dirname(__file__))
|
|
10
|
+
INVOICE_LINE_STOCK_TEMPLATE = "invoice-line-stock-yellowbill.jinja"
|
|
11
|
+
TEMPLATE_DIR = [MODULE_PATH + "/messages"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EbillPostfinanceInvoiceMessage(models.Model):
|
|
15
|
+
_inherit = "ebill.postfinance.invoice.message"
|
|
16
|
+
|
|
17
|
+
def _get_jinja_env(self, template_dir):
|
|
18
|
+
template_dir += TEMPLATE_DIR
|
|
19
|
+
return super()._get_jinja_env(template_dir)
|
|
20
|
+
|
|
21
|
+
def _get_payload_params_yb(self):
|
|
22
|
+
params = super()._get_payload_params_yb()
|
|
23
|
+
params["invoice_line_stock_template"] = INVOICE_LINE_STOCK_TEMPLATE
|
|
24
|
+
return params
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This module adds some information related to delivery in the eBill Postfinance integration.
|
|
Binary file
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
7
|
+
<title>eBill Postfinance Stock</title>
|
|
8
|
+
<style type="text/css">
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
:Author: David Goodger (goodger@python.org)
|
|
12
|
+
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
|
13
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
14
|
+
|
|
15
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: grey; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document" id="ebill-postfinance-stock">
|
|
364
|
+
<h1 class="title">eBill Postfinance Stock</h1>
|
|
365
|
+
|
|
366
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
368
|
+
!! changes will be overwritten. !!
|
|
369
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
+
!! source digest: sha256:d560906a22ebe7ea9c8860c9debf497de39154cb16cf9b93cdf7123f96203532
|
|
371
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock"><img alt="OCA/l10n-switzerland" src="https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-ebill_postfinance_stock"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
|
+
<p>This module adds some information related to delivery in the eBill Postfinance integration.</p>
|
|
374
|
+
<p><strong>Table of contents</strong></p>
|
|
375
|
+
<div class="contents local topic" id="contents">
|
|
376
|
+
<ul class="simple">
|
|
377
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
|
|
378
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
|
|
379
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
|
|
380
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
|
|
381
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
|
|
382
|
+
</ul>
|
|
383
|
+
</li>
|
|
384
|
+
</ul>
|
|
385
|
+
</div>
|
|
386
|
+
<div class="section" id="bug-tracker">
|
|
387
|
+
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
|
|
388
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-switzerland/issues">GitHub Issues</a>.
|
|
389
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
390
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
391
|
+
<a class="reference external" href="https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance_stock%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
392
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="section" id="credits">
|
|
395
|
+
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
|
|
396
|
+
<div class="section" id="authors">
|
|
397
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
|
|
398
|
+
<ul class="simple">
|
|
399
|
+
<li>Camptocamp</li>
|
|
400
|
+
</ul>
|
|
401
|
+
</div>
|
|
402
|
+
<div class="section" id="contributors">
|
|
403
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
|
|
404
|
+
<ul class="simple">
|
|
405
|
+
<li>Thierry Ducrest <<a class="reference external" href="mailto:thierry.ducrest@camptocamp.com">thierry.ducrest@camptocamp.com</a>></li>
|
|
406
|
+
</ul>
|
|
407
|
+
</div>
|
|
408
|
+
<div class="section" id="maintainers">
|
|
409
|
+
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
|
|
410
|
+
<p>This module is maintained by the OCA.</p>
|
|
411
|
+
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
|
412
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
413
|
+
mission is to support the collaborative development of Odoo features and
|
|
414
|
+
promote its widespread use.</p>
|
|
415
|
+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
|
416
|
+
<p><a class="reference external image-reference" href="https://github.com/TDu"><img alt="TDu" src="https://github.com/TDu.png?size=40px" /></a></p>
|
|
417
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock">OCA/l10n-switzerland</a> project on GitHub.</p>
|
|
418
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</body>
|
|
423
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import test_ebill_postfinance_message_yb
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="string">
|
|
3
|
+
<Header>
|
|
4
|
+
<From>Camptocamp SA</From>
|
|
5
|
+
<To>IPECeBILLServer</To>
|
|
6
|
+
<UseCase>CreateybInvoice</UseCase>
|
|
7
|
+
<SessionID>1</SessionID>
|
|
8
|
+
<Version>2.0</Version>
|
|
9
|
+
<Status>0</Status>
|
|
10
|
+
<SoftwareName>Odoo</SoftwareName>
|
|
11
|
+
<SoftwareVersion>14.0</SoftwareVersion>
|
|
12
|
+
</Header>
|
|
13
|
+
<Body>
|
|
14
|
+
<DeliveryInfo>
|
|
15
|
+
<BillerID>41101000001021209</BillerID>
|
|
16
|
+
<eBillAccountID>41010198248040391</eBillAccountID>
|
|
17
|
+
<DeliveryDate>2019-06-21</DeliveryDate>
|
|
18
|
+
<TransactionID>$TRANSACTION_ID</TransactionID>
|
|
19
|
+
<BillDetailsType>PDFAppendix</BillDetailsType>
|
|
20
|
+
<URLBillDetails/>
|
|
21
|
+
</DeliveryInfo>
|
|
22
|
+
<Bill>
|
|
23
|
+
<Header>
|
|
24
|
+
<DocumentType>BILL</DocumentType>
|
|
25
|
+
<DocumentID>INV_TEST_01</DocumentID>
|
|
26
|
+
<DocumentDate>2019-06-21</DocumentDate>
|
|
27
|
+
<SenderParty>
|
|
28
|
+
<TaxLiability>VAT</TaxLiability>
|
|
29
|
+
<PartyType>
|
|
30
|
+
<Address>
|
|
31
|
+
<CompanyName>Camptocamp SA</CompanyName>
|
|
32
|
+
<Address1>StreetOne</Address1>
|
|
33
|
+
<ZIP>1015</ZIP>
|
|
34
|
+
<City>Lausanne</City>
|
|
35
|
+
<Country>CH</Country>
|
|
36
|
+
<Email>info@camptocamp.com</Email>
|
|
37
|
+
</Address>
|
|
38
|
+
<TaxID>CHE012345678</TaxID>
|
|
39
|
+
</PartyType>
|
|
40
|
+
</SenderParty>
|
|
41
|
+
<ReceiverParty>
|
|
42
|
+
<PartyType>
|
|
43
|
+
<CustomerID>$CUSTOMER_ID</CustomerID>
|
|
44
|
+
<Address>
|
|
45
|
+
<CompanyName>Test RAD Customer XML</CompanyName>
|
|
46
|
+
<Address1>Teststrasse 100</Address1>
|
|
47
|
+
<Address2>This is a very long street name that should be sna</Address2>
|
|
48
|
+
<ZIP>1700</ZIP>
|
|
49
|
+
<City>Fribourg</City>
|
|
50
|
+
<Country>CH</Country>
|
|
51
|
+
</Address>
|
|
52
|
+
<!-- <TaxID>CHE333222111</TaxID> -->
|
|
53
|
+
</PartyType>
|
|
54
|
+
</ReceiverParty>
|
|
55
|
+
<DeliveryPlace>
|
|
56
|
+
<Address>
|
|
57
|
+
<CompanyName>Test RAD Customer XML</CompanyName>
|
|
58
|
+
<ZIP>1700</ZIP>
|
|
59
|
+
<City>Fribourg</City>
|
|
60
|
+
<Country>CH</Country>
|
|
61
|
+
<!-- <Contact1>0000000001</Contact1> -->
|
|
62
|
+
</Address>
|
|
63
|
+
</DeliveryPlace>
|
|
64
|
+
<AchievementDate>
|
|
65
|
+
<StartDateAchievement>2019-06-21</StartDateAchievement>
|
|
66
|
+
<EndDateAchievement>2019-06-21</EndDateAchievement>
|
|
67
|
+
</AchievementDate>
|
|
68
|
+
<Currency>CHF</Currency>
|
|
69
|
+
<AccountAssignment>
|
|
70
|
+
<OrderReference>
|
|
71
|
+
<ReferencePosition>1</ReferencePosition>
|
|
72
|
+
<ReferenceType>OrderReference</ReferenceType>
|
|
73
|
+
<ReferenceValue>CustomerRef</ReferenceValue>
|
|
74
|
+
</OrderReference>
|
|
75
|
+
<OrderDate>2019-06-01</OrderDate>
|
|
76
|
+
</AccountAssignment>
|
|
77
|
+
<Language>en</Language>
|
|
78
|
+
<PaymentInformation>
|
|
79
|
+
<PaymentDueDate>2019-07-01</PaymentDueDate>
|
|
80
|
+
<PaymentType>IBAN</PaymentType>
|
|
81
|
+
<fixAmount>Yes</fixAmount>
|
|
82
|
+
<IBAN>
|
|
83
|
+
<BIC>777</BIC>
|
|
84
|
+
<BankName>Reserve</BankName>
|
|
85
|
+
<IBAN>CH2130808001234567827</IBAN>
|
|
86
|
+
<CreditorReference>210000000003139471430009017</CreditorReference>
|
|
87
|
+
</IBAN>
|
|
88
|
+
</PaymentInformation>
|
|
89
|
+
<!-- <FreeText>Dies ist eine Musterrechnung mit QR-IBAN Angaben</FreeText> -->
|
|
90
|
+
</Header>
|
|
91
|
+
<LineItems>
|
|
92
|
+
<LineItem>
|
|
93
|
+
<LineItemType>NORMAL</LineItemType>
|
|
94
|
+
<LineItemID>1</LineItemID>
|
|
95
|
+
<ProductDescription>Product Q & A</ProductDescription>
|
|
96
|
+
<ProductID>370003021</ProductID>
|
|
97
|
+
<Quantity>4.0</Quantity>
|
|
98
|
+
<QuantityDescription>Units</QuantityDescription>
|
|
99
|
+
<PriceUnit>1</PriceUnit>
|
|
100
|
+
<Tax>
|
|
101
|
+
<TaxDetail>
|
|
102
|
+
<Rate>7.7</Rate>
|
|
103
|
+
<Amount>37.88</Amount>
|
|
104
|
+
<BaseAmountExclusiveTax>492.0</BaseAmountExclusiveTax>
|
|
105
|
+
<BaseAmountInclusiveTax>529.88</BaseAmountInclusiveTax>
|
|
106
|
+
</TaxDetail>
|
|
107
|
+
<TotalTax>37.88</TotalTax>
|
|
108
|
+
</Tax>
|
|
109
|
+
<AmountInclusiveTax>529.88</AmountInclusiveTax>
|
|
110
|
+
<AmountExclusiveTax>492.0</AmountExclusiveTax>
|
|
111
|
+
<FixedReference>
|
|
112
|
+
<ReferencePosition>2</ReferencePosition>
|
|
113
|
+
<ReferenceType>OrderNumberBySupplier</ReferenceType>
|
|
114
|
+
<ReferenceValue>Order123</ReferenceValue>
|
|
115
|
+
</FixedReference>
|
|
116
|
+
<FixedReference>
|
|
117
|
+
<ReferencePosition>3</ReferencePosition>
|
|
118
|
+
<ReferenceType>OrderNumberByBuyer</ReferenceType>
|
|
119
|
+
<ReferenceValue>CustomerRef</ReferenceValue>
|
|
120
|
+
</FixedReference>
|
|
121
|
+
<FixedReference>
|
|
122
|
+
<ReferencePosition>4</ReferencePosition>
|
|
123
|
+
<ReferenceType>DeliveryNoteNumber</ReferenceType>
|
|
124
|
+
<ReferenceValue>Picking Name</ReferenceValue>
|
|
125
|
+
</FixedReference>
|
|
126
|
+
</LineItem>
|
|
127
|
+
<LineItem>
|
|
128
|
+
<LineItemType>NORMAL</LineItemType>
|
|
129
|
+
<LineItemID>2</LineItemID>
|
|
130
|
+
<ProductDescription>Product With a Very Long Name That Need To Be Truncated</ProductDescription>
|
|
131
|
+
<ProductID>370003022</ProductID>
|
|
132
|
+
<Quantity>1.0</Quantity>
|
|
133
|
+
<QuantityDescription>Units</QuantityDescription>
|
|
134
|
+
<PriceUnit>1</PriceUnit>
|
|
135
|
+
<Tax>
|
|
136
|
+
<TaxDetail>
|
|
137
|
+
<Rate>7.7</Rate>
|
|
138
|
+
<Amount>0.0</Amount>
|
|
139
|
+
<BaseAmountExclusiveTax>0.0</BaseAmountExclusiveTax>
|
|
140
|
+
<BaseAmountInclusiveTax>0.0</BaseAmountInclusiveTax>
|
|
141
|
+
</TaxDetail>
|
|
142
|
+
<TotalTax>0.0</TotalTax>
|
|
143
|
+
</Tax>
|
|
144
|
+
<AmountInclusiveTax>0.0</AmountInclusiveTax>
|
|
145
|
+
<AmountExclusiveTax>0.0</AmountExclusiveTax>
|
|
146
|
+
<FixedReference>
|
|
147
|
+
<ReferencePosition>5</ReferencePosition>
|
|
148
|
+
<ReferenceType>OrderNumberBySupplier</ReferenceType>
|
|
149
|
+
<ReferenceValue>Order123</ReferenceValue>
|
|
150
|
+
</FixedReference>
|
|
151
|
+
<FixedReference>
|
|
152
|
+
<ReferencePosition>6</ReferencePosition>
|
|
153
|
+
<ReferenceType>OrderNumberByBuyer</ReferenceType>
|
|
154
|
+
<ReferenceValue>CustomerRef</ReferenceValue>
|
|
155
|
+
</FixedReference>
|
|
156
|
+
<FixedReference>
|
|
157
|
+
<ReferencePosition>7</ReferencePosition>
|
|
158
|
+
<ReferenceType>DeliveryNoteNumber</ReferenceType>
|
|
159
|
+
<ReferenceValue>Picking Name</ReferenceValue>
|
|
160
|
+
</FixedReference>
|
|
161
|
+
</LineItem>
|
|
162
|
+
<LineItem>
|
|
163
|
+
<LineItemType>NORMAL</LineItemType>
|
|
164
|
+
<LineItemID>3</LineItemID>
|
|
165
|
+
<ProductDescription>Phone support</ProductDescription>
|
|
166
|
+
<Quantity>4.0</Quantity>
|
|
167
|
+
<QuantityDescription>PCE</QuantityDescription>
|
|
168
|
+
<PriceUnit>1</PriceUnit>
|
|
169
|
+
<AmountInclusiveTax>0.0</AmountInclusiveTax>
|
|
170
|
+
<AmountExclusiveTax>0.0</AmountExclusiveTax>
|
|
171
|
+
</LineItem>
|
|
172
|
+
</LineItems>
|
|
173
|
+
<Summary>
|
|
174
|
+
<Tax>
|
|
175
|
+
<TaxDetail>
|
|
176
|
+
<Rate>7.7</Rate>
|
|
177
|
+
<Amount>37.88</Amount>
|
|
178
|
+
<BaseAmountExclusiveTax>492.0</BaseAmountExclusiveTax>
|
|
179
|
+
<BaseAmountInclusiveTax>529.88</BaseAmountInclusiveTax>
|
|
180
|
+
</TaxDetail>
|
|
181
|
+
<TotalTax>37.88</TotalTax>
|
|
182
|
+
</Tax>
|
|
183
|
+
<TotalAmountExclusiveTax>492.0</TotalAmountExclusiveTax>
|
|
184
|
+
<TotalAmountInclusiveTax>529.88</TotalAmountInclusiveTax>
|
|
185
|
+
<!-- <TotalAmountPaid>200.00</TotalAmountPaid> -->
|
|
186
|
+
<TotalAmountDue>529.88</TotalAmountDue>
|
|
187
|
+
</Summary>
|
|
188
|
+
</Bill>
|
|
189
|
+
<Appendix>
|
|
190
|
+
</Appendix>
|
|
191
|
+
</Body>
|
|
192
|
+
</Envelope>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Copyright 2022 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
|
3
|
+
|
|
4
|
+
from string import Template
|
|
5
|
+
|
|
6
|
+
from freezegun import freeze_time
|
|
7
|
+
from lxml import etree as ET
|
|
8
|
+
|
|
9
|
+
from odoo.modules.module import get_module_path
|
|
10
|
+
from odoo.tools import file_open
|
|
11
|
+
|
|
12
|
+
from odoo.addons.ebill_postfinance.tests.common import CommonCase
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@freeze_time("2019-06-21 09:06:00")
|
|
16
|
+
class TestEbillPostfinanceMessageYB(CommonCase):
|
|
17
|
+
@classmethod
|
|
18
|
+
def setUpClass(cls):
|
|
19
|
+
super().setUpClass()
|
|
20
|
+
cls.schema_file = (
|
|
21
|
+
get_module_path("ebill_postfinance") + "/messages/ybInvoice_V2.0.4.xsd"
|
|
22
|
+
)
|
|
23
|
+
cls.pickings = cls.sale.order_line.move_ids.mapped("picking_id")
|
|
24
|
+
cls.pickings[0].name = "Picking Name"
|
|
25
|
+
for line in cls.pickings.move_ids.move_line_ids:
|
|
26
|
+
line.qty_done = line.reserved_qty
|
|
27
|
+
cls.pickings._action_done()
|
|
28
|
+
|
|
29
|
+
def test_invoice_qr(self):
|
|
30
|
+
"""Check XML payload genetated for an invoice."""
|
|
31
|
+
self.invoice.name = "INV_TEST_01"
|
|
32
|
+
self.invoice.invoice_date_due = "2019-07-01"
|
|
33
|
+
message = self.invoice.create_postfinance_ebill()
|
|
34
|
+
message.set_transaction_id()
|
|
35
|
+
message.payload = message._generate_payload_yb()
|
|
36
|
+
# Validate the xml generated on top of the xsd schema
|
|
37
|
+
node = ET.fromstring(message.payload.encode("utf-8"))
|
|
38
|
+
self.assertXmlValidXSchema(node, xschema=None, filename=self.schema_file)
|
|
39
|
+
# Remove the PDF file data from the XML to ease diff check
|
|
40
|
+
lines = message.payload.splitlines()
|
|
41
|
+
for pos, line in enumerate(lines):
|
|
42
|
+
if line.find("MimeType") != -1:
|
|
43
|
+
lines.pop(pos)
|
|
44
|
+
break
|
|
45
|
+
payload = "\n".join(lines).encode("utf8")
|
|
46
|
+
# Prepare the XML file that is expected
|
|
47
|
+
expected_tmpl = Template(
|
|
48
|
+
file_open("ebill_postfinance_stock/tests/examples/invoice_qr_yb.xml").read()
|
|
49
|
+
)
|
|
50
|
+
expected = expected_tmpl.substitute(
|
|
51
|
+
TRANSACTION_ID=message.transaction_id, CUSTOMER_ID=self.customer.id
|
|
52
|
+
).encode("utf8")
|
|
53
|
+
# Remove the comments in the expected xml
|
|
54
|
+
expected_nocomment = [
|
|
55
|
+
line
|
|
56
|
+
for line in expected.split(b"\n")
|
|
57
|
+
if not line.lstrip().startswith(b"<!--")
|
|
58
|
+
]
|
|
59
|
+
expected_nocomment = b"\n".join(expected_nocomment)
|
|
60
|
+
self.assertFalse(self.compare_xml_line_by_line(payload, expected_nocomment))
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-ebill_postfinance_stock
|
|
3
|
+
Version: 16.0.1.0.0.1
|
|
4
|
+
Summary: Add stock integration to Postfinance eBill
|
|
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: odoo-addon-ebill-postfinance <16.1dev,>=16.0dev
|
|
15
|
+
Requires-Dist: odoo <16.1dev,>=16.0a
|
|
16
|
+
|
|
17
|
+
=======================
|
|
18
|
+
eBill Postfinance Stock
|
|
19
|
+
=======================
|
|
20
|
+
|
|
21
|
+
..
|
|
22
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
23
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
24
|
+
!! changes will be overwritten. !!
|
|
25
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
+
!! source digest: sha256:d560906a22ebe7ea9c8860c9debf497de39154cb16cf9b93cdf7123f96203532
|
|
27
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
+
|
|
29
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
30
|
+
:target: https://odoo-community.org/page/development-status
|
|
31
|
+
:alt: Beta
|
|
32
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
|
33
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
34
|
+
:alt: License: AGPL-3
|
|
35
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
|
|
36
|
+
:target: https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock
|
|
37
|
+
:alt: OCA/l10n-switzerland
|
|
38
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
39
|
+
:target: https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-ebill_postfinance_stock
|
|
40
|
+
:alt: Translate me on Weblate
|
|
41
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
42
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0
|
|
43
|
+
:alt: Try me on Runboat
|
|
44
|
+
|
|
45
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
46
|
+
|
|
47
|
+
This module adds some information related to delivery in the eBill Postfinance integration.
|
|
48
|
+
|
|
49
|
+
**Table of contents**
|
|
50
|
+
|
|
51
|
+
.. contents::
|
|
52
|
+
:local:
|
|
53
|
+
|
|
54
|
+
Bug Tracker
|
|
55
|
+
===========
|
|
56
|
+
|
|
57
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
|
|
58
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
59
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
60
|
+
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance_stock%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
61
|
+
|
|
62
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
63
|
+
|
|
64
|
+
Credits
|
|
65
|
+
=======
|
|
66
|
+
|
|
67
|
+
Authors
|
|
68
|
+
~~~~~~~
|
|
69
|
+
|
|
70
|
+
* Camptocamp
|
|
71
|
+
|
|
72
|
+
Contributors
|
|
73
|
+
~~~~~~~~~~~~
|
|
74
|
+
|
|
75
|
+
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
|
76
|
+
|
|
77
|
+
Maintainers
|
|
78
|
+
~~~~~~~~~~~
|
|
79
|
+
|
|
80
|
+
This module is maintained by the OCA.
|
|
81
|
+
|
|
82
|
+
.. image:: https://odoo-community.org/logo.png
|
|
83
|
+
:alt: Odoo Community Association
|
|
84
|
+
:target: https://odoo-community.org
|
|
85
|
+
|
|
86
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
87
|
+
mission is to support the collaborative development of Odoo features and
|
|
88
|
+
promote its widespread use.
|
|
89
|
+
|
|
90
|
+
.. |maintainer-TDu| image:: https://github.com/TDu.png?size=40px
|
|
91
|
+
:target: https://github.com/TDu
|
|
92
|
+
:alt: TDu
|
|
93
|
+
|
|
94
|
+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
95
|
+
|
|
96
|
+
|maintainer-TDu|
|
|
97
|
+
|
|
98
|
+
This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/16.0/ebill_postfinance_stock>`_ project on GitHub.
|
|
99
|
+
|
|
100
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
odoo/addons/ebill_postfinance_stock/README.rst,sha256=UkrjlZcmzcNmGddieqoy3jQMKORFbvFFEAO3JX87SQM,3162
|
|
2
|
+
odoo/addons/ebill_postfinance_stock/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
+
odoo/addons/ebill_postfinance_stock/__manifest__.py,sha256=kMPPKPxpHHNv67AN6zCZ3p6xv82KzoKaqq6G4h8K_pE,506
|
|
4
|
+
odoo/addons/ebill_postfinance_stock/i18n/ebill_postfinance_stock.pot,sha256=y3ciU03Zv2Zum_QXYKfUsRuRoreLWTvdGH1Lr79pvyg,547
|
|
5
|
+
odoo/addons/ebill_postfinance_stock/messages/invoice-line-stock-yellowbill.jinja,sha256=er-VJp2PCrt8fpZEj75wW3vvLSuBh3VGIYUPiQXnYTI,375
|
|
6
|
+
odoo/addons/ebill_postfinance_stock/models/__init__.py,sha256=AhNK_VC0Y6dTjeN-pqhoCxOt7L4GSh6CWfQIGkK00Go,48
|
|
7
|
+
odoo/addons/ebill_postfinance_stock/models/ebill_postfinance_invoice_message.py,sha256=6JPCpTdth5QaIj6l1BNSB-NKGs60LU8fN_8gzj4bUBU,778
|
|
8
|
+
odoo/addons/ebill_postfinance_stock/readme/CONTRIBUTORS.rst,sha256=uAPcwg62NVS4AhHWOH1ylKl_Fyk39Tz7bGv0X4PC5Xs,51
|
|
9
|
+
odoo/addons/ebill_postfinance_stock/readme/DESCRIPTION.rst,sha256=7LIhDM4yFY_vCPGT2lhZuYjqlP2s96D37qWXHPXmF0w,92
|
|
10
|
+
odoo/addons/ebill_postfinance_stock/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
11
|
+
odoo/addons/ebill_postfinance_stock/static/description/index.html,sha256=G_JpqL-n-cK8mASwmYMRIarJV-jZRK7Zw8IJTG3AIeI,12492
|
|
12
|
+
odoo/addons/ebill_postfinance_stock/tests/__init__.py,sha256=snhpZz7YPGKB0VK1xFbNpxienkn7ZnZEADKQqSrJy2o,48
|
|
13
|
+
odoo/addons/ebill_postfinance_stock/tests/test_ebill_postfinance_message_yb.py,sha256=oQ6gWZ_zWoY2n9sEU_sCosfnEZHEMvfT0Rem3nhK5tA,2407
|
|
14
|
+
odoo/addons/ebill_postfinance_stock/tests/examples/invoice_qr_yb.xml,sha256=wqa8p967NqQP4K9mGl096C5eoot_mbyquigd2frcOMs,9303
|
|
15
|
+
odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/METADATA,sha256=r1j_SLHXkkUQw2sb_RzBz9BiuPePW4OpMiMZP1Inggg,3771
|
|
16
|
+
odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
17
|
+
odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
18
|
+
odoo_addon_ebill_postfinance_stock-16.0.1.0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|