odoo-addon-ebill-postfinance 16.0.1.0.0.3__py3-none-any.whl → 16.0.1.0.0.6__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/models/ebill_postfinance_invoice_message.py +17 -53
- {odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info}/METADATA +4 -4
- {odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info}/RECORD +5 -5
- {odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info}/WHEEL +1 -1
- {odoo_addon_ebill_postfinance-16.0.1.0.0.3.dist-info → odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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 =
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
|
|
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 =
|
|
276
|
-
|
|
277
|
-
|
|
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 =
|
|
328
|
-
|
|
329
|
-
|
|
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
|
|
|
@@ -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
|
+
Version: 16.0.1.0.0.6
|
|
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
|
-
Requires-Dist: odoo-addon-base-ebill-payment-contract
|
|
17
|
-
Requires-Dist: odoo
|
|
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
|
=================
|
|
@@ -11,7 +11,7 @@ odoo/addons/ebill_postfinance/messages/ybInvoice_V2.0.4.xsd,sha256=5fbM7Miwb59sX
|
|
|
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=
|
|
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
|
|
@@ -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.
|
|
42
|
-
odoo_addon_ebill_postfinance-16.0.1.0.0.
|
|
43
|
-
odoo_addon_ebill_postfinance-16.0.1.0.0.
|
|
44
|
-
odoo_addon_ebill_postfinance-16.0.1.0.0.
|
|
41
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info/METADATA,sha256=hc8pLM4fz9egT1ZYqP3sxR1RjQC4SsrIlxn6ExKDs7w,5406
|
|
42
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
43
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
44
|
+
odoo_addon_ebill_postfinance-16.0.1.0.0.6.dist-info/RECORD,,
|