odoo-addon-ebill-postfinance 16.0.1.0.0.3__py3-none-any.whl → 16.0.1.0.0.7__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.
@@ -216,8 +216,8 @@
216
216
  {# </Discount> #}
217
217
  <TotalAmountExclusiveTax>{{ invoice.amount_untaxed * amount_sign }}</TotalAmountExclusiveTax>
218
218
  <TotalAmountInclusiveTax>{{ invoice.amount_total * amount_sign }}</TotalAmountInclusiveTax>
219
- {# <TotalAmountPaid></TotalAmountPaid> #}
220
- <TotalAmountDue>{{ invoice.amount_total * amount_sign }}</TotalAmountDue>
219
+ <TotalAmountPaid>{{ (invoice.amount_total - invoice.amount_residual) * amount_sign }}</TotalAmountPaid>
220
+ <TotalAmountDue>{{ invoice.amount_residual * amount_sign }}</TotalAmountDue>
221
221
  </Summary>
222
222
  </Bill>
223
223
  <Appendix>
@@ -200,22 +200,11 @@ class EbillPostfinanceInvoiceMessage(models.Model):
200
200
  return date_string.strftime("%Y-%m-%d")
201
201
 
202
202
  def _get_payload_params(self):
203
- bank_account = ""
204
- if self.payment_type == "iban":
205
- bank_account = sanitize_account_number(
206
- self.invoice_id.partner_bank_id.l10n_ch_qr_iban
207
- or self.invoice_id.partner_bank_id.acc_number
208
- )
209
- else:
210
- bank_account = self.invoice_id.partner_bank_id.l10n_ch_isr_subscription_chf
211
- if bank_account:
212
- account_parts = bank_account.split("-")
213
- bank_account = (
214
- account_parts[0] + account_parts[1].rjust(6, "0") + account_parts[2]
215
- )
216
- else:
217
- bank_account = ""
218
-
203
+ bank_account = sanitize_account_number(
204
+ self.invoice_id.partner_bank_id.l10n_ch_qr_iban
205
+ or self.invoice_id.partner_bank_id.acc_number
206
+ or ""
207
+ )
219
208
  params = {
220
209
  "client_pid": self.service_id.biller_id,
221
210
  "invoice": self.invoice_id,
@@ -248,39 +237,23 @@ class EbillPostfinanceInvoiceMessage(models.Model):
248
237
  )
249
238
  params["amount_by_group"] = amount_by_group
250
239
  # Get the invoice due date
251
- date_due = None
252
- if self.invoice_id.invoice_payment_term_id:
253
- terms = self.invoice_id.invoice_payment_term_id.compute(
254
- self.invoice_id.amount_total
255
- )
256
- if terms:
257
- # Returns all payment and their date like [('2020-12-07', 430.37), ...]
258
- # Get the last payment date in the format "202021207"
259
- date_due = terms[-1][0].replace("-", "")
260
- if not date_due:
261
- date_due = self.format_date(
262
- self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
263
- )
240
+ date_due = self.format_date(
241
+ self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
242
+ )
264
243
  params["date_due"] = date_due
265
244
  return params
266
245
 
267
246
  def _get_payload_params_yb(self):
268
247
  bank_account = ""
269
- if self.payment_type == "iban":
248
+ # Use the appropriate IBAN for qr invoice or not.
249
+ if self.invoice_id.l10n_ch_is_qr_valid:
270
250
  bank_account = sanitize_account_number(
271
- self.invoice_id.partner_bank_id.l10n_ch_qr_iban
272
- or self.invoice_id.partner_bank_id.acc_number
251
+ self.invoice_id.partner_bank_id.l10n_ch_qr_iban or ""
273
252
  )
274
253
  else:
275
- bank_account = self.invoice_id.partner_bank_id.l10n_ch_isr_subscription_chf
276
- if bank_account:
277
- account_parts = bank_account.split("-")
278
- bank_account = (
279
- account_parts[0] + account_parts[1].rjust(6, "0") + account_parts[2]
280
- )
281
- else:
282
- bank_account = ""
283
-
254
+ bank_account = sanitize_account_number(
255
+ self.invoice_id.partner_bank_id.acc_number or ""
256
+ )
284
257
  delivery = (
285
258
  self.invoice_id.partner_shipping_id
286
259
  if self.invoice_id.partner_shipping_id != self.invoice_id.partner_id
@@ -324,18 +297,9 @@ class EbillPostfinanceInvoiceMessage(models.Model):
324
297
  )
325
298
  params["amount_by_group"] = amount_by_group
326
299
  # Get the invoice due date
327
- date_due = None
328
- if self.invoice_id.invoice_payment_term_id:
329
- terms = self.invoice_id.invoice_payment_term_id.compute(
330
- self.invoice_id.amount_total
331
- )
332
- if terms:
333
- # Get the last payment date
334
- date_due = terms[-1][0]
335
- if not date_due:
336
- date_due = self.format_date_yb(
337
- self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
338
- )
300
+ date_due = self.format_date_yb(
301
+ self.invoice_id.invoice_date_due or self.invoice_id.invoice_date
302
+ )
339
303
  params["date_due"] = date_due
340
304
  return params
341
305
 
@@ -166,7 +166,7 @@
166
166
  </Tax>
167
167
  <TotalAmountExclusiveTax>-492.0</TotalAmountExclusiveTax>
168
168
  <TotalAmountInclusiveTax>-529.88</TotalAmountInclusiveTax>
169
- <!-- <TotalAmountPaid>200.00</TotalAmountPaid> -->
169
+ <TotalAmountPaid>-0.0</TotalAmountPaid>
170
170
  <TotalAmountDue>-529.88</TotalAmountDue>
171
171
  </Summary>
172
172
  </Bill>
@@ -172,7 +172,7 @@
172
172
  </Tax>
173
173
  <TotalAmountExclusiveTax>492.0</TotalAmountExclusiveTax>
174
174
  <TotalAmountInclusiveTax>529.88</TotalAmountInclusiveTax>
175
- <!-- <TotalAmountPaid>200.00</TotalAmountPaid> -->
175
+ <TotalAmountPaid>0.0</TotalAmountPaid>
176
176
  <TotalAmountDue>529.88</TotalAmountDue>
177
177
  </Summary>
178
178
  </Bill>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-ebill_postfinance
3
- Version: 16.0.1.0.0.3
3
+ Version: 16.0.1.0.0.7
4
4
  Summary: Postfinance eBill integration
5
5
  Home-page: https://github.com/OCA/l10n-switzerland
6
6
  Author: Camptocamp,Odoo Community Association (OCA)
@@ -12,9 +12,9 @@ Classifier: Framework :: Odoo :: 16.0
12
12
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
13
  Requires-Python: >=3.10
14
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
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
18
  Requires-Dist: zeep
19
19
 
20
20
  =================
@@ -6,12 +6,12 @@ odoo/addons/ebill_postfinance/data/mail_activity_type.xml,sha256=vn41DG3O8F1P1YG
6
6
  odoo/addons/ebill_postfinance/data/transmit.method.xml,sha256=wiFMLenJbf5Cx4fKS56sWnVf58opiWKIEpT41MYihR0,387
7
7
  odoo/addons/ebill_postfinance/i18n/ebill_postfinance.pot,sha256=sFABayEUNYIKqnK3Dq67G33jj62DIdpNjdRJ--UYeo8,18685
8
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
9
+ odoo/addons/ebill_postfinance/messages/invoice-yellowbill.jinja,sha256=HtLKEyFuzfHxMY50qbPRZULO44COqtgEdQO02uoEyy0,12239
10
10
  odoo/addons/ebill_postfinance/messages/ybInvoice_V2.0.4.xsd,sha256=5fbM7Miwb59sXvUgjwJMszIJ19NuHQU3gsGaxTO27fA,48785
11
11
  odoo/addons/ebill_postfinance/models/__init__.py,sha256=2uZGfhJOczB94W5EFvXlky-tXcJeWRF9O1-rtCGvuxA,177
12
12
  odoo/addons/ebill_postfinance/models/account_move.py,sha256=JnMnT1Fu8HtgTKTQaMm2_eLu_hv18SF-l6GSTMXlLaM,5208
13
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
14
+ odoo/addons/ebill_postfinance/models/ebill_postfinance_invoice_message.py,sha256=5vjw0Oo8c7fFeO9l3llYGp_K9nSAqmwExSifxmQLLlg,14041
15
15
  odoo/addons/ebill_postfinance/models/ebill_postfinance_service.py,sha256=8yn9FqlXv_bA26mvlGRslW4cfKVmHRIKpZDziixeLzE,5404
16
16
  odoo/addons/ebill_postfinance/models/sale_order.py,sha256=M2xxj8F5InyBMgJFRJX3ARrXYy70VVcUpdcrd6Ujii8,597
17
17
  odoo/addons/ebill_postfinance/readme/CONFIGURE.rst,sha256=2RxGc9in7UFE1DUKz_z5mgXcgkJWmk7l2xsOL86AzKc,728
@@ -28,8 +28,8 @@ odoo/addons/ebill_postfinance/tests/common.py,sha256=kh0AGK0tvhXJMLnbNtOOBnhQML7
28
28
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance.py,sha256=KpyAx2K9H0RUFNqn9BppI0JlXswDrDVGMQzeI8j3NKs,1752
29
29
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb.py,sha256=db-LWnT83XIz-wr_8uiVXOip2kM91PdYUbhPOmtwMuQ,2446
30
30
  odoo/addons/ebill_postfinance/tests/test_ebill_postfinance_message_yb_creditnote.py,sha256=kLywWsOueBjPm1vsx2fhZvhgy_2mxyWQ791S_EpkeRU,2550
31
- 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
31
+ odoo/addons/ebill_postfinance/tests/examples/credit_note_yb.xml,sha256=JroiAlfZO44vSEFcJ3MvWL5thOeZBBOhNdqd1b25XEI,8441
32
+ odoo/addons/ebill_postfinance/tests/examples/invoice_qr_yb.xml,sha256=8xRr-79-FcedVCS43Agcw9sirB6WbPPr4_ReVdPCSBE,8721
33
33
  odoo/addons/ebill_postfinance/tests/examples/yellowbill_qr_iban.xml,sha256=o6Q5l9hHG0S9RtVjLoXccJ5Arh3CI98y1BD5JMlym84,79818
34
34
  odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_ping_service.yaml,sha256=iJqfZeJIrrK-H7dXwTzYDqqheRpW9APHqjVjQsfwa0c,70472
35
35
  odoo/addons/ebill_postfinance/tests/fixtures/cassettes/test_search_invoices.yaml,sha256=rcVgP3wrk8xV8BfcPNlPyfE3UpC-kDOpPpWI2C-H3vE,37776
@@ -38,7 +38,7 @@ odoo/addons/ebill_postfinance/views/ebill_payment_contract.xml,sha256=efZjo1o4-_
38
38
  odoo/addons/ebill_postfinance/views/ebill_postfinance_invoice_message.xml,sha256=Mj2TrBjOS2fxaINA_ycsNTqP5Y3KPsWtvGWv2IkxcDM,3269
39
39
  odoo/addons/ebill_postfinance/views/ebill_postfinance_service.xml,sha256=KhYEQtbxpo91QohFoGED9dIHPAP6AzLdsP_IFPZU5Vc,5989
40
40
  odoo/addons/ebill_postfinance/views/message_template.xml,sha256=gNBva1ehWFgz6W6lrNCmpxZ_maovQJxhHcBpxcohvZo,213
41
- odoo_addon_ebill_postfinance-16.0.1.0.0.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,,
41
+ odoo_addon_ebill_postfinance-16.0.1.0.0.7.dist-info/METADATA,sha256=5LO4_ibJBDFNTP8Ax5_EQVVGiqF43qHfrHkRr8Y-BG4,5406
42
+ odoo_addon_ebill_postfinance-16.0.1.0.0.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
43
+ odoo_addon_ebill_postfinance-16.0.1.0.0.7.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
44
+ odoo_addon_ebill_postfinance-16.0.1.0.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5