odoo-addon-ebill-postfinance 17.0.1.0.0.3__py3-none-any.whl → 18.0.1.1.0__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.
Files changed (34) hide show
  1. odoo/addons/ebill_postfinance/README.rst +13 -8
  2. odoo/addons/ebill_postfinance/__manifest__.py +1 -1
  3. odoo/addons/ebill_postfinance/data/ir_cron.xml +0 -2
  4. odoo/addons/ebill_postfinance/data/mail_activity_type.xml +7 -7
  5. odoo/addons/ebill_postfinance/data/transmit.method.xml +1 -1
  6. odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot +6 -7
  7. odoo/addons/ebill_postfinance/messages/invoice-2003A.jinja +1 -1
  8. odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja +12 -6
  9. odoo/addons/ebill_postfinance/models/__init__.py +1 -0
  10. odoo/addons/ebill_postfinance/models/account_move.py +13 -6
  11. odoo/addons/ebill_postfinance/models/account_move_line.py +36 -0
  12. odoo/addons/ebill_postfinance/models/ebill_payment_contract.py +3 -1
  13. odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py +20 -10
  14. odoo/addons/ebill_postfinance/readme/CONTRIBUTORS.md +1 -0
  15. odoo/addons/ebill_postfinance/readme/INSTALL.md +1 -1
  16. odoo/addons/ebill_postfinance/static/description/index.html +26 -19
  17. odoo/addons/ebill_postfinance/tests/__init__.py +1 -0
  18. odoo/addons/ebill_postfinance/tests/common.py +25 -6
  19. odoo/addons/ebill_postfinance/tests/{examples → samples}/credit_note_yb.xml +24 -19
  20. odoo/addons/ebill_postfinance/tests/{examples → samples}/invoice_qr_yb.xml +26 -20
  21. odoo/addons/ebill_postfinance/tests/samples/invoice_qr_yb_discount.xml +192 -0
  22. odoo/addons/ebill_postfinance/tests/{examples → samples}/yellowbill_qr_iban.xml +164 -163
  23. odoo/addons/ebill_postfinance/tests/test_account_move.py +57 -0
  24. odoo/addons/ebill_postfinance/tests/test_ebill_postfinance.py +8 -1
  25. odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb.py +28 -15
  26. odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb_creditnote.py +5 -9
  27. odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml +12 -15
  28. odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml +21 -21
  29. odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml +14 -14
  30. {odoo_addon_ebill_postfinance-17.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-18.0.1.1.0.dist-info}/METADATA +19 -13
  31. odoo_addon_ebill_postfinance-18.0.1.1.0.dist-info/RECORD +47 -0
  32. {odoo_addon_ebill_postfinance-17.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-18.0.1.1.0.dist-info}/WHEEL +1 -1
  33. odoo_addon_ebill_postfinance-17.0.1.0.0.3.dist-info/RECORD +0 -44
  34. {odoo_addon_ebill_postfinance-17.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-18.0.1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,7 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
1
5
  =================
2
6
  eBill Postfinance
3
7
  =================
@@ -7,23 +11,23 @@ eBill Postfinance
7
11
  !! This file is generated by oca-gen-addon-readme !!
8
12
  !! changes will be overwritten. !!
9
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:6f6e6ca32f9808a18ea3fad1447dd4f32abbd1d4f6ee1ad8944f1e66b39f9808
14
+ !! source digest: sha256:e717898ad88ed5bab6ea19013e97a879f5c173aea9dc3d53d6214bf53f76a228
11
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
16
 
13
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14
18
  :target: https://odoo-community.org/page/development-status
15
19
  :alt: Beta
16
- .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
17
21
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18
22
  :alt: License: AGPL-3
19
23
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
20
- :target: https://github.com/OCA/l10n-switzerland/tree/17.0/ebill_postfinance
24
+ :target: https://github.com/OCA/l10n-switzerland/tree/18.0/ebill_postfinance
21
25
  :alt: OCA/l10n-switzerland
22
26
  .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23
- :target: https://translation.odoo-community.org/projects/l10n-switzerland-17-0/l10n-switzerland-17-0-ebill_postfinance
27
+ :target: https://translation.odoo-community.org/projects/l10n-switzerland-18-0/l10n-switzerland-18-0-ebill_postfinance
24
28
  :alt: Translate me on Weblate
25
29
  .. |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=17.0
30
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=18.0
27
31
  :alt: Try me on Runboat
28
32
 
29
33
  |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +43,7 @@ Postfinance web service.
39
43
  Installation
40
44
  ============
41
45
 
42
- This module needs the Python library ebilling_postfiance which can be
46
+ This module needs the Python library ebilling_postfinance which can be
43
47
  installed from Pypi. More information can be found at
44
48
  `repository <repository%20https://github.com/camptocamp/ebilling-postfinance>`__
45
49
  https://github.com/camptocamp/ebilling-postfinance.
@@ -95,7 +99,7 @@ Bug Tracker
95
99
  Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
96
100
  In case of trouble, please check there if your issue has already been reported.
97
101
  If you spotted it first, help us to smash it by providing a detailed and welcomed
98
- `feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
102
+ `feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
99
103
 
100
104
  Do not contact contributors directly about support or help with technical issues.
101
105
 
@@ -111,6 +115,7 @@ Contributors
111
115
  ------------
112
116
 
113
117
  - Thierry Ducrest <thierry.ducrest@camptocamp.com>
118
+ - Simone Orsi <simone.orsi@camptocamp.com>
114
119
 
115
120
  Maintainers
116
121
  -----------
@@ -133,6 +138,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
133
138
 
134
139
  |maintainer-TDu|
135
140
 
136
- This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/17.0/ebill_postfinance>`_ project on GitHub.
141
+ This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/18.0/ebill_postfinance>`_ project on GitHub.
137
142
 
138
143
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "name": "eBill Postfinance",
6
6
  "summary": """Postfinance eBill integration""",
7
- "version": "17.0.1.0.0",
7
+ "version": "18.0.1.1.0",
8
8
  "license": "AGPL-3",
9
9
  "author": "Camptocamp,Odoo Community Association (OCA)",
10
10
  "maintainers": ["TDu"],
@@ -4,9 +4,7 @@
4
4
  <field name="name">eBill Postfinance - Check invoices state on server</field>
5
5
  <field name="interval_number">1</field>
6
6
  <field name="interval_type">hours</field>
7
- <field name="numbercall">-1</field>
8
7
  <field name="active" eval="True" />
9
- <field name="doall" eval="False" />
10
8
  <field name="model_id" ref="model_ebill_postfinance_service" />
11
9
  <field name="state">code</field>
12
10
  <field name="code">model.cron_update_invoices()</field>
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <odoo noupdate="1">
3
- <record id="mail_activity_ebill_postfinance_error" model="mail.activity.type">
4
- <field name="name">eBill Postfinance Error</field>
5
- <field name="icon">fa-warning</field>
6
- <field name="delay_count">0</field>
7
- <field name="sequence">99</field>
8
- <field name="decoration_type">warning</field>
9
- </record>
3
+ <record id="mail_activity_ebill_postfinance_error" model="mail.activity.type">
4
+ <field name="name">eBill Postfinance Error</field>
5
+ <field name="icon">fa-warning</field>
6
+ <field name="delay_count">0</field>
7
+ <field name="sequence">99</field>
8
+ <field name="decoration_type">warning</field>
9
+ </record>
10
10
  </odoo>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <odoo>
3
- <record id="postfinance_transmit_method" model="transmit.method">
3
+ <record id="postfinance_transmit_method" model="transmit.method" forcecreate="True">
4
4
  <field name="name">Postfinance</field>
5
5
  <field name="code">postfinance</field>
6
6
  <field name="customer_ok" eval="True" />
@@ -4,7 +4,7 @@
4
4
  #
5
5
  msgid ""
6
6
  msgstr ""
7
- "Project-Id-Version: Odoo Server 17.0\n"
7
+ "Project-Id-Version: Odoo Server 18.0\n"
8
8
  "Report-Msgid-Bugs-To: \n"
9
9
  "Last-Translator: \n"
10
10
  "Language-Team: \n"
@@ -16,7 +16,6 @@ msgstr ""
16
16
  #. module: ebill_postfinance
17
17
  #. odoo-python
18
18
  #: code:addons/ebill_postfinance/models/ebill_payment_contract.py:0
19
- #, python-format
20
19
  msgid "A Postfinance service is required for a Postfinance contract."
21
20
  msgstr ""
22
21
 
@@ -132,7 +131,6 @@ msgstr ""
132
131
  #. module: ebill_postfinance
133
132
  #. odoo-python
134
133
  #: code:addons/ebill_postfinance/models/account_move.py:0
135
- #, python-format
136
134
  msgid "Error generating postfinance eBill"
137
135
  msgstr ""
138
136
 
@@ -201,14 +199,12 @@ msgstr ""
201
199
  #. module: ebill_postfinance
202
200
  #. odoo-python
203
201
  #: code:addons/ebill_postfinance/models/account_move.py:0
204
- #, python-format
205
202
  msgid "Invoice accepted by the Postfinance system"
206
203
  msgstr ""
207
204
 
208
205
  #. module: ebill_postfinance
209
206
  #. odoo-python
210
207
  #: code:addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py:0
211
- #, python-format
212
208
  msgid "Invoice paid through eBilling"
213
209
  msgstr ""
214
210
 
@@ -239,6 +235,11 @@ msgstr ""
239
235
  msgid "Journal Entry"
240
236
  msgstr ""
241
237
 
238
+ #. module: ebill_postfinance
239
+ #: model:ir.model,name:ebill_postfinance.model_account_move_line
240
+ msgid "Journal Item"
241
+ msgstr ""
242
+
242
243
  #. module: ebill_postfinance
243
244
  #: model:ir.model.fields,field_description:ebill_postfinance.field_ebill_postfinance_invoice_message__write_uid
244
245
  #: model:ir.model.fields,field_description:ebill_postfinance.field_ebill_postfinance_service__write_uid
@@ -459,7 +460,6 @@ msgstr ""
459
460
  #. module: ebill_postfinance
460
461
  #. odoo-python
461
462
  #: code:addons/ebill_postfinance/models/ebill_payment_contract.py:0
462
- #, python-format
463
463
  msgid "The Postfinacnce Account ID is required for a Postfinance contract."
464
464
  msgstr ""
465
465
 
@@ -471,7 +471,6 @@ msgstr ""
471
471
  #. module: ebill_postfinance
472
472
  #. odoo-python
473
473
  #: code:addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py:0
474
- #, python-format
475
474
  msgid "The payload is valid."
476
475
  msgstr ""
477
476
 
@@ -179,7 +179,7 @@
179
179
  {%- if loop.index == 1 %}
180
180
  <TAX>
181
181
  <Rate>{{ tax.amount}}</Rate>
182
- <Amount Currency="{{ invoice.currency_id.name }}">{{ tax._compute_amount(line.price_subtotal, line.price_unit)|round(2) }}</Amount>
182
+ <Amount Currency="{{ invoice.currency_id.name }}">{{ line._ebill_tax_amount(tax)|round(2) }}</Amount>
183
183
  </TAX>
184
184
  {%- endif %}
185
185
  {% else %}
@@ -163,11 +163,11 @@
163
163
  <Tax>
164
164
  <TaxDetail>
165
165
  <Rate>{{ tax.amount|round(2)|replace(",", ".") }}</Rate>
166
- <Amount>{{ tax._compute_amount(line.price_subtotal, line.price_unit)|round(2) }}</Amount>
166
+ <Amount>{{ line._ebill_tax_amount(tax)|round(2) }}</Amount>
167
167
  <BaseAmountExclusiveTax>{{ line.price_subtotal|round(6) }}</BaseAmountExclusiveTax>
168
168
  <BaseAmountInclusiveTax>{{ line.price_total|round(6) }}</BaseAmountInclusiveTax>
169
169
  </TaxDetail>
170
- <TotalTax>{{ tax._compute_amount(line.price_subtotal, line.price_unit)|round(2) }}</TotalTax>
170
+ <TotalTax>{{ line._ebill_tax_amount(tax)|round(2) }}</TotalTax>
171
171
  </Tax>
172
172
  {%- endif %}
173
173
  {% endfor %}
@@ -210,10 +210,16 @@
210
210
  <TotalTax>{{ invoice.amount_tax|round(6) }}</TotalTax>
211
211
  </Tax>
212
212
  {% endif -%}
213
- {# <Discount> #}
214
- {# <Days></Days> #}
215
- {# <Rate></Rate> #}
216
- {# </Discount> #}
213
+ {% for discount in discounts %}
214
+ <Discount>
215
+ {% if discount.days %}
216
+ <Days>{{ discount.days }}</Days>
217
+ {% else %}
218
+ <DiscountDate>{{ discount.date }}</DiscountDate>
219
+ {% endif -%}
220
+ <Rate>{{ discount.percentage }}</Rate>
221
+ </Discount>
222
+ {% endfor -%}
217
223
  <TotalAmountExclusiveTax>{{ invoice.amount_untaxed * amount_sign }}</TotalAmountExclusiveTax>
218
224
  <TotalAmountInclusiveTax>{{ invoice.amount_total * amount_sign }}</TotalAmountInclusiveTax>
219
225
  {# <TotalAmountPaid></TotalAmountPaid> #}
@@ -1,4 +1,5 @@
1
1
  from . import account_move
2
+ from . import account_move_line
2
3
  from . import ebill_payment_contract
3
4
  from . import ebill_postfinance_invoice_message
4
5
  from . import ebill_postfinance_service
@@ -5,7 +5,7 @@ import base64
5
5
  import logging
6
6
 
7
7
  import odoo
8
- from odoo import _, api, fields, models
8
+ from odoo import api, fields, models
9
9
  from odoo.exceptions import UserError
10
10
  from odoo.tools.pdf import merge_pdf
11
11
 
@@ -15,8 +15,15 @@ _logger = logging.getLogger(__name__)
15
15
  class AccountMove(models.Model):
16
16
  _inherit = "account.move"
17
17
 
18
- @api.onchange("transmit_method_id")
19
- def _onchange_transmit_method(self):
18
+ @api.depends("transmit_method_id")
19
+ def _compute_partner_bank_id(self): # pylint: disable=missing-return
20
+ super()._compute_partner_bank_id()
21
+ for rec in self:
22
+ pf_partner_bank = rec._get_postfinance_partner_bank()
23
+ if pf_partner_bank:
24
+ rec.partner_bank_id = pf_partner_bank
25
+
26
+ def _get_postfinance_partner_bank(self):
20
27
  if self.move_type not in ("out_invoice", "out_refund"):
21
28
  return
22
29
  postfinance_method = self.env.ref(
@@ -25,7 +32,7 @@ class AccountMove(models.Model):
25
32
  if self.transmit_method_id == postfinance_method:
26
33
  contract = self.partner_id.get_active_contract(self.transmit_method_id)
27
34
  if contract:
28
- self.partner_bank_id = contract.postfinance_service_id.partner_bank_id
35
+ return contract.postfinance_service_id.partner_bank_id
29
36
 
30
37
  def _export_invoice(self):
31
38
  """Export invoice with the help of account_invoice_export module."""
@@ -36,7 +43,7 @@ class AccountMove(models.Model):
36
43
  return super()._export_invoice()
37
44
  message = self.create_postfinance_ebill()
38
45
  if not message:
39
- raise UserError(_("Error generating postfinance eBill"))
46
+ raise UserError(self.env._("Error generating postfinance eBill"))
40
47
  message.send_to_postfinance()
41
48
  self.invoice_exported = True
42
49
  return f"Postfinance invoice generated and in state {message.state}"
@@ -120,7 +127,7 @@ class AccountMove(models.Model):
120
127
  ["ebill_postfinance.mail_activity_dws_error"],
121
128
  feedback="It worked on a later try",
122
129
  )
123
- self.message_post(body=_("Invoice accepted by the Postfinance system"))
130
+ self.message_post(body=self.env._("Invoice accepted by the Postfinance system"))
124
131
  self.invoice_export_confirmed = True
125
132
 
126
133
  def log_invoice_refused_by_system(self):
@@ -0,0 +1,36 @@
1
+ # Copyright 2025 Camptocamp SA
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import models
5
+
6
+
7
+ class AccountMoveLine(models.Model):
8
+ _inherit = "account.move.line"
9
+
10
+ def _ebill_tax_amount(self, tax):
11
+ """Helper to compute tax amount for a given tax on invoice line.
12
+
13
+ :param tax: The tax to compute.
14
+ :return: Computed tax amount.
15
+ """
16
+ if not tax:
17
+ return 0.0
18
+
19
+ # Compute the tax amount
20
+ price_unit = self.price_unit
21
+ quantity = self.quantity
22
+ currency = self.move_id.currency_id
23
+
24
+ # Adjust price for discount
25
+ discount = self.discount or 0.0
26
+ price = price_unit * (1 - discount / 100)
27
+
28
+ # Compute the tax amount using the tax's compute_all method
29
+ res = tax.compute_all(
30
+ price_unit=price,
31
+ currency=currency,
32
+ quantity=quantity,
33
+ product=self.product_id,
34
+ partner=self.move_id.partner_id,
35
+ )
36
+ return res["taxes"][0]["amount"]
@@ -70,5 +70,7 @@ class EbillPaymentContract(models.Model):
70
70
  for contract in self:
71
71
  if contract.is_postfinance_contract and not contract.postfinance_service_id:
72
72
  raise ValidationError(
73
- _("A Postfinance service is required for a Postfinance contract.")
73
+ self.env._(
74
+ "A Postfinance service is required for a Postfinance contract."
75
+ )
74
76
  )
@@ -9,7 +9,7 @@ import pytz
9
9
  from jinja2 import Environment, FileSystemLoader
10
10
  from lxml import etree
11
11
 
12
- from odoo import _, api, fields, models
12
+ from odoo import api, fields, models
13
13
  from odoo.exceptions import UserError
14
14
  from odoo.modules.module import get_module_root
15
15
 
@@ -139,7 +139,9 @@ class EbillPostfinanceInvoiceMessage(models.Model):
139
139
  for record in self:
140
140
  if record.state != "done":
141
141
  record.state = "done"
142
- record.invoice_id.message_post(body=_("Invoice paid through eBilling"))
142
+ record.invoice_id.message_post(
143
+ body=self.env._("Invoice paid through eBilling")
144
+ )
143
145
 
144
146
  @api.model
145
147
  def _remove_pdf_data_from_payload(self, data):
@@ -222,7 +224,7 @@ class EbillPostfinanceInvoiceMessage(models.Model):
222
224
  "format_date": self.format_date,
223
225
  "ebill_account_number": self.ebill_account_number,
224
226
  "discount_template": "",
225
- "discount": {},
227
+ "discounts": [],
226
228
  }
227
229
  amount_by_group = []
228
230
  # Get the percentage of the tax from the name of the group
@@ -275,20 +277,20 @@ class EbillPostfinanceInvoiceMessage(models.Model):
275
277
  "format_date": self.format_date_yb,
276
278
  "ebill_account_number": self.ebill_account_number,
277
279
  "discount_template": "",
278
- "discount": {},
280
+ "discounts": [],
279
281
  "invoice_line_stock_template": "",
280
282
  }
281
283
  amount_by_group = []
282
284
  # Get the percentage of the tax from the name of the group
283
285
  # Could be improve by searching in the account_tax linked to the group
284
- for __, tax_group in self.invoice_id.tax_totals["groups_by_subtotal"].items():
285
- for taxgroup in tax_group:
286
- rate = taxgroup["tax_group_name"].split()[-1:][0][:-1]
286
+ for subtotal in self.invoice_id.tax_totals["subtotals"]:
287
+ for taxgroup in subtotal["tax_groups"]:
288
+ rate = taxgroup["group_name"].split()[-1:][0][:-1]
287
289
  amount_by_group.append(
288
290
  (
289
291
  rate or "0",
290
- taxgroup["tax_group_amount"],
291
- taxgroup["tax_group_base_amount"],
292
+ taxgroup["tax_amount"],
293
+ taxgroup["base_amount"],
292
294
  )
293
295
  )
294
296
  params["amount_by_group"] = amount_by_group
@@ -297,6 +299,14 @@ class EbillPostfinanceInvoiceMessage(models.Model):
297
299
  self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
298
300
  )
299
301
  params["date_due"] = date_due
302
+ if self.invoice_id.invoice_payment_term_id.early_discount:
303
+ terms = self.invoice_id.invoice_payment_term_id
304
+ params["discounts"].append(
305
+ {
306
+ "percentage": terms.discount_percentage,
307
+ "days": terms.discount_days,
308
+ }
309
+ )
300
310
  return params
301
311
 
302
312
  def _get_jinja_env(self, template_dir):
@@ -350,7 +360,7 @@ class EbillPostfinanceInvoiceMessage(models.Model):
350
360
  "type": "ir.actions.client",
351
361
  "tag": "display_notification",
352
362
  "params": {
353
- "title": _("The payload is valid."),
363
+ "title": self.env._("The payload is valid."),
354
364
  "sticky": False,
355
365
  },
356
366
  }
@@ -1 +1,2 @@
1
1
  - Thierry Ducrest \<<thierry.ducrest@camptocamp.com>\>
2
+ - Simone Orsi \<<simone.orsi@camptocamp.com>\>
@@ -1,3 +1,3 @@
1
- This module needs the Python library ebilling_postfiance which can be
1
+ This module needs the Python library ebilling_postfinance which can be
2
2
  installed from Pypi. More information can be found at
3
3
  [repository https://github.com/camptocamp/ebilling-postfinance](repository%20https://github.com/camptocamp/ebilling-postfinance).
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
- <title>eBill Postfinance</title>
6
+ <title>README.rst</title>
7
7
  <style type="text/css">
8
8
 
9
9
  /*
@@ -360,16 +360,21 @@ ul.auto-toc {
360
360
  </style>
361
361
  </head>
362
362
  <body>
363
- <div class="document" id="ebill-postfinance">
364
- <h1 class="title">eBill Postfinance</h1>
363
+ <div class="document">
365
364
 
365
+
366
+ <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
+ <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
+ </a>
369
+ <div class="section" id="ebill-postfinance">
370
+ <h1>eBill Postfinance</h1>
366
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
372
  !! This file is generated by oca-gen-addon-readme !!
368
373
  !! changes will be overwritten. !!
369
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:6f6e6ca32f9808a18ea3fad1447dd4f32abbd1d4f6ee1ad8944f1e66b39f9808
375
+ !! source digest: sha256:e717898ad88ed5bab6ea19013e97a879f5c173aea9dc3d53d6214bf53f76a228
371
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/17.0/ebill_postfinance"><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-17-0/l10n-switzerland-17-0-ebill_postfinance"><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&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377
+ <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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-switzerland/tree/18.0/ebill_postfinance"><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-18-0/l10n-switzerland-18-0-ebill_postfinance"><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&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
378
  <p>This module implements the exchange of electronic invoices with the
374
379
  Postfinance web service.</p>
375
380
  <p><strong>Table of contents</strong></p>
@@ -393,23 +398,23 @@ Postfinance web service.</p>
393
398
  </ul>
394
399
  </div>
395
400
  <div class="section" id="installation">
396
- <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
397
- <p>This module needs the Python library ebilling_postfiance which can be
401
+ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
402
+ <p>This module needs the Python library ebilling_postfinance which can be
398
403
  installed from Pypi. More information can be found at
399
404
  <a class="reference external" href="repository%20https://github.com/camptocamp/ebilling-postfinance">repository</a>
400
405
  <a class="reference external" href="https://github.com/camptocamp/ebilling-postfinance">https://github.com/camptocamp/ebilling-postfinance</a>.</p>
401
406
  </div>
402
407
  <div class="section" id="configuration">
403
- <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
408
+ <h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
404
409
  <div class="section" id="create-a-service">
405
- <h2><a class="toc-backref" href="#toc-entry-3">Create a service</a></h2>
410
+ <h3><a class="toc-backref" href="#toc-entry-3">Create a service</a></h3>
406
411
  <p>First you need to be registred on ‘Postfinance eBill service
407
412
  &lt;<a class="reference external" href="https://www.postfinance.ch/en/business/products/accounts-receivable-solutions/e-bill-invoice-issuer.html">https://www.postfinance.ch/en/business/products/accounts-receivable-solutions/e-bill-invoice-issuer.html</a>&gt;’
408
413
  To create a service go to Accounting - Configuration - Payments -
409
414
  Postfinance eBill Service</p>
410
415
  </div>
411
416
  <div class="section" id="configure-a-customer-and-create-his-contract">
412
- <h2><a class="toc-backref" href="#toc-entry-4">Configure a customer and create his contract</a></h2>
417
+ <h3><a class="toc-backref" href="#toc-entry-4">Configure a customer and create his contract</a></h3>
413
418
  <p>The contracts specific to Postfinance e-billing are located in
414
419
  Accounting - Customers - eBill Postfinance Contract Create a contract
415
420
  for a customer with his PayerId and make sure that the contract is
@@ -418,7 +423,7 @@ active by being in Open state with valid start/end dates.</p>
418
423
  </div>
419
424
  </div>
420
425
  <div class="section" id="usage">
421
- <h1><a class="toc-backref" href="#toc-entry-5">Usage</a></h1>
426
+ <h2><a class="toc-backref" href="#toc-entry-5">Usage</a></h2>
422
427
  <p>To use this module, you need to:</p>
423
428
  <ol class="arabic simple">
424
429
  <li>Configure the service, customers and contracts as described in the
@@ -428,7 +433,7 @@ CONFIGURATION section.</li>
428
433
  </ol>
429
434
  </div>
430
435
  <div class="section" id="known-issues-roadmap">
431
- <h1><a class="toc-backref" href="#toc-entry-6">Known issues / Roadmap</a></h1>
436
+ <h2><a class="toc-backref" href="#toc-entry-6">Known issues / Roadmap</a></h2>
432
437
  <p>ToDo</p>
433
438
  <ul class="simple">
434
439
  <li>Add option to import the contract subscription (csv)</li>
@@ -442,29 +447,30 @@ endpoint ?</li>
442
447
  </ul>
443
448
  </div>
444
449
  <div class="section" id="bug-tracker">
445
- <h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
450
+ <h2><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h2>
446
451
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-switzerland/issues">GitHub Issues</a>.
447
452
  In case of trouble, please check there if your issue has already been reported.
448
453
  If you spotted it first, help us to smash it by providing a detailed and welcomed
449
- <a class="reference external" href="https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
454
+ <a class="reference external" href="https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20ebill_postfinance%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
450
455
  <p>Do not contact contributors directly about support or help with technical issues.</p>
451
456
  </div>
452
457
  <div class="section" id="credits">
453
- <h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
458
+ <h2><a class="toc-backref" href="#toc-entry-8">Credits</a></h2>
454
459
  <div class="section" id="authors">
455
- <h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
460
+ <h3><a class="toc-backref" href="#toc-entry-9">Authors</a></h3>
456
461
  <ul class="simple">
457
462
  <li>Camptocamp</li>
458
463
  </ul>
459
464
  </div>
460
465
  <div class="section" id="contributors">
461
- <h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
466
+ <h3><a class="toc-backref" href="#toc-entry-10">Contributors</a></h3>
462
467
  <ul class="simple">
463
468
  <li>Thierry Ducrest &lt;<a class="reference external" href="mailto:thierry.ducrest&#64;camptocamp.com">thierry.ducrest&#64;camptocamp.com</a>&gt;</li>
469
+ <li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
464
470
  </ul>
465
471
  </div>
466
472
  <div class="section" id="maintainers">
467
- <h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
473
+ <h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
468
474
  <p>This module is maintained by the OCA.</p>
469
475
  <a class="reference external image-reference" href="https://odoo-community.org">
470
476
  <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -474,10 +480,11 @@ mission is to support the collaborative development of Odoo features and
474
480
  promote its widespread use.</p>
475
481
  <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
476
482
  <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>
477
- <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-switzerland/tree/17.0/ebill_postfinance">OCA/l10n-switzerland</a> project on GitHub.</p>
483
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-switzerland/tree/18.0/ebill_postfinance">OCA/l10n-switzerland</a> project on GitHub.</p>
478
484
  <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>
479
485
  </div>
480
486
  </div>
481
487
  </div>
488
+ </div>
482
489
  </body>
483
490
  </html>
@@ -1,3 +1,4 @@
1
1
  from . import test_ebill_postfinance
2
2
  from . import test_ebill_postfinance_message_yb
3
3
  from . import test_ebill_postfinance_message_yb_creditnote
4
+ from . import test_account_move