Skip to content

Commit 8ac420f

Browse files
[IMP] Updated the PO file of module payment_bitcoin, and improved the controller method
1 parent 92d0cde commit 8ac420f

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

payment_bitcoin/controllers/portal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def portal_order_page(
2727
**kw,
2828
)
2929
order = request.env["sale.order"].sudo().browse(order_id)
30-
last_transaction = order.transaction_ids[-1]
30+
if order and order.transaction_ids:
31+
last_transaction = order.transaction_ids[-1]
32+
else:
33+
return res
3134
if last_transaction and last_transaction.provider_code == "bitcoin":
3235
lang_code = (
3336
request.env.context.get("lang") or order.partner_id.lang or "en_US"

payment_bitcoin/i18n/de.po

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ msgid " "
2121
msgstr ""
2222

2323
#. module: payment_bitcoin
24-
#: code:addons/payment_bitcoin/controllers/main.py:0
24+
#: code:addons/payment_bitcoin/controllers/bitcoin.py:0
2525
#, python-format
2626
msgid ""
2727
"<div class=\"panel-body\" style=\"padding-bottom:0px;\">\n"
@@ -34,7 +34,7 @@ msgid ""
3434
msgstr ""
3535

3636
#. module: payment_bitcoin
37-
#: code:addons/payment_bitcoin/controllers/main.py:0
37+
#: code:addons/payment_bitcoin/controllers/bitcoin.py:0
3838
#, python-format
3939
msgid ""
4040
"<div class=\"panel-body\" style=\"padding-bottom:0px;\">\n"
@@ -151,7 +151,7 @@ msgstr "Adresslink"
151151
#. module: payment_bitcoin
152152
#: model:ir.model.fields,help:payment_bitcoin.field_payment_acquirer__bitcoin_order_older_than
153153
msgid "Address check for orders which are not older than"
154-
msgstr ""
154+
msgstr "Adressprüfung für Bestellungen, die nicht älter als"
155155

156156
#. module: payment_bitcoin
157157
#: model:ir.model.fields,field_description:payment_bitcoin.field_bitcoin_rate_line__amount
@@ -259,6 +259,9 @@ msgid ""
259259
"%(max_amount_received)s BTC too much. The"
260260
" corresponding payment is posted: %(invoices)s"
261261
msgstr ""
262+
"Bitcoin-Transaktion %(transaction)s für "
263+
"%(address)s mit %(amount)s BTC wurde bestätigt. Dies ist "
264+
"%(max_amount_received)s BTC zu viel. Die entsprechende Zahlung wurde gebucht: %(invoices)s."
262265

263266
#. module: payment_bitcoin
264267
#: code:addons/payment_bitcoin/models/bitcoin.py:0
@@ -269,6 +272,8 @@ msgid ""
269272
" confirmed. The corresponding payment is"
270273
" posted: %(invoices)s"
271274
msgstr ""
275+
Bitcoin-Transaktion %(transaction)s für "
276+
"%(address)s mit %(amount)s BTC wurde bestätigt. Die entsprechende Zahlung wurde gebucht: %(invoices)s."
272277

273278
#. module: payment_bitcoin
274279
#: code:addons/payment_bitcoin/models/bitcoin.py:0
@@ -294,6 +299,7 @@ msgstr "Bitcoin Adressprüfung"
294299
#, python-format
295300
msgid "Bitcoin: No transaction found matching reference %s."
296301
msgstr ""
302+
"Bitcoin: Keine Transaktion mit der Referenz %s gefunden."
297303

298304
#. module: payment_bitcoin
299305
#: model:mail.template,name:payment_bitcoin.mail_template_data_bit_coin_order_notification
@@ -304,7 +310,7 @@ msgstr ""
304310
#: code:addons/payment_bitcoin/models/payment_transaction.py:0
305311
#, python-format
306312
msgid "Bitcoin: Received data with invalid payment status: %s"
307-
msgstr ""
313+
msgstr "Bitcoin: Empfangene Daten mit ungültigem Zahlungsstatus: %s"
308314

309315
#. module: payment_bitcoin
310316
#: model:ir.model,name:payment_bitcoin.model_res_config_settings
@@ -379,6 +385,8 @@ msgid ""
379385
"If amount of unused Bitcoin addresses goes below this, than system sends "
380386
"notifications to its related users."
381387
msgstr ""
388+
"Wenn die Anzahl ungenutzter Bitcoin-Adressen unter diesen Wert sinkt, sendet das System eine Nachricht."
389+
"Benachrichtigungen an die zugehörigen Nutzer.“
382390
383391
#. module: payment_bitcoin
384392
#: model:ir.model.fields,field_description:payment_bitcoin.field_bitcoin_address__invoice_id
@@ -388,12 +396,12 @@ msgstr ""
388396
#. module: payment_bitcoin
389397
#: model:ir.model.fields,field_description:payment_bitcoin.field_bitcoin_rate_line__invoice_id
390398
msgid "Invoice ID"
391-
msgstr ""
399+
msgstr "Rechnungs-ID"
392400

393401
#. module: payment_bitcoin
394402
#: model:ir.model.fields,field_description:payment_bitcoin.field_bitcoin_address__is_btc_used
395403
msgid "Is Bitcoin used?"
396-
msgstr ""
404+
msgstr "Wird Bitcoin verwendet?"
397405

398406
#. module: payment_bitcoin
399407
#: model:ir.model,name:payment_bitcoin.model_account_move
@@ -486,11 +494,11 @@ msgid "Payment reference required"
486494
msgstr "Zahlungsreferenz erforderlich"
487495

488496
#. module: payment_bitcoin
489-
#: code:addons/payment_bitcoin/controllers/main.py:0
490-
#, python-format
497+
#. odoo-python
498+
#: code:addons/payment_bitcoin/controllers/bitcoin.py:0
491499
msgid ""
492-
"Please send %(amount_btc)s %(unit_btc)s (%(amount_mbtc)s %(unit_mbtc)s)"
493-
" to the address %(address)s by %(deadline_date)s UTC."
500+
"Please send %(amount_btc)s %(unit_btc)s (%(amount_mbtc)s "
501+
"%(unit_mbtc)s) to the address %(address)s by %(deadline_date)s UTC."
494502
msgstr ""
495503
"Bitte senden Sie den Betrag von %(amount_btc)s %(unit_btc)s (%(amount_mbtc)s"
496504
" %(unit_mbtc)s) bis um %(deadline_date)s UTC an die Adresse %(address)s"
@@ -526,6 +534,8 @@ msgid ""
526534
"Send notification to users when amount of unused Bitcoin\n"
527535
" addresses are less than or equal"
528536
msgstr ""
537+
"Benachrichtigung an Nutzer senden, wenn die Menge ungenutzter Bitcoin-Adressen kleiner oder gleich ist“
538+
"Adressen“
529539

530540
#. module: payment_bitcoin
531541
#: model_terms:ir.ui.view,arch_db:payment_bitcoin.view_bitcoin_rate_form
@@ -538,7 +548,7 @@ msgid "The Payment Service Provider to use with this acquirer"
538548
msgstr "Der mit diesem Zahlungsanbieter zu verwendende Dienstleister"
539549

540550
#. module: payment_bitcoin
541-
#: code:addons/payment_bitcoin/controllers/main.py:0
551+
#: code:addons/payment_bitcoin/controllers/bitcoin.py:0
542552
#, python-format
543553
msgid "The access token is invalid."
544554
msgstr ""
@@ -558,7 +568,7 @@ msgstr "Ungebraucht"
558568
#. module: payment_bitcoin
559569
#: model_terms:payment.acquirer,auth_msg:payment_bitcoin.payment_acquirer_bitcoin
560570
msgid "Your payment has been authorized."
561-
msgstr ""
571+
msgstr "Ihre Zahlung wurde autorisiert."
562572

563573
#. module: payment_bitcoin
564574
#: model:ir.model.fields,help:payment_bitcoin.field_bitcoin_rate__valid_minutes
@@ -567,7 +577,7 @@ msgstr ""
567577
"Nach dieser Zeit wird der Kurs erneut auf den gleichen Betrag überprüft"
568578

569579
#. module: payment_bitcoin
570-
#: code:addons/payment_bitcoin/controllers/main.py:0
580+
#: code:addons/payment_bitcoin/controllers/bitcoin.py:0
571581
#, python-format
572582
msgid "bitcoin:%(address)s$$amount=%(bt_amt)s*$message=%(msg)s"
573583
msgstr ""
@@ -581,4 +591,4 @@ msgstr ""
581591
#. module: payment_bitcoin
582592
#: model:ir.model.fields,field_description:payment_bitcoin.field_payment_transaction__duration
583593
msgid "Time remaining"
584-
msgstr ""
594+
msgstr "Time bitcoining"

0 commit comments

Comments
 (0)