odoo-addon-account-payment-order 17.0.1.2.0.2__py3-none-any.whl → 17.0.1.4.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.
- odoo/addons/account_payment_order/README.rst +1 -1
- odoo/addons/account_payment_order/__manifest__.py +1 -1
- odoo/addons/account_payment_order/i18n/es.po +0 -247
- odoo/addons/account_payment_order/models/account_move.py +9 -0
- odoo/addons/account_payment_order/models/account_payment.py +16 -0
- odoo/addons/account_payment_order/models/account_payment_line.py +3 -6
- odoo/addons/account_payment_order/static/description/index.html +1 -1
- odoo/addons/account_payment_order/tests/test_payment_order_inbound.py +27 -8
- odoo/addons/account_payment_order/tests/test_payment_order_outbound.py +1 -2
- odoo/addons/account_payment_order/views/account_payment_line.xml +1 -1
- {odoo_addon_account_payment_order-17.0.1.2.0.2.dist-info → odoo_addon_account_payment_order-17.0.1.4.0.dist-info}/METADATA +2 -2
- {odoo_addon_account_payment_order-17.0.1.2.0.2.dist-info → odoo_addon_account_payment_order-17.0.1.4.0.dist-info}/RECORD +14 -14
- {odoo_addon_account_payment_order-17.0.1.2.0.2.dist-info → odoo_addon_account_payment_order-17.0.1.4.0.dist-info}/WHEEL +0 -0
- {odoo_addon_account_payment_order-17.0.1.2.0.2.dist-info → odoo_addon_account_payment_order-17.0.1.4.0.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Account Payment Order
|
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
8
|
!! changes will be overwritten. !!
|
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
10
|
+
!! source digest: sha256:0178290e954d4664d03a5c9a002404e0410bba7eb6909bbd09aa5bffb345dc91
|
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
12
|
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
|
@@ -1338,250 +1338,3 @@ msgstr "el"
|
|
|
1338
1338
|
msgid "otherwise, new payment orders will be created (one per payment mode)."
|
|
1339
1339
|
msgstr ""
|
|
1340
1340
|
"En caso contrario, se crearán nuevas órdenes (una por cada modo de pago)."
|
|
1341
|
-
|
|
1342
|
-
#~ msgid "Last Modified on"
|
|
1343
|
-
#~ msgstr "Última modificación en"
|
|
1344
|
-
|
|
1345
|
-
#~ msgid "Main Attachment"
|
|
1346
|
-
#~ msgstr "Adjunto Principal"
|
|
1347
|
-
|
|
1348
|
-
#~ msgid "Number of messages which requires an action"
|
|
1349
|
-
#~ msgstr "Número de mensajes que requieren una acción"
|
|
1350
|
-
|
|
1351
|
-
#, python-format
|
|
1352
|
-
#~ msgid ""
|
|
1353
|
-
#~ "No Payment Line created for invoice %s because it already exists or "
|
|
1354
|
-
#~ "because this invoice is already paid."
|
|
1355
|
-
#~ msgstr ""
|
|
1356
|
-
#~ "No se ha creado línea de pago para la factura %s porque ya existe o "
|
|
1357
|
-
#~ "porque la factura ya está pagada."
|
|
1358
|
-
|
|
1359
|
-
#~ msgid "Accounting Entries Options"
|
|
1360
|
-
#~ msgstr "Opciones de asientos contables"
|
|
1361
|
-
|
|
1362
|
-
#~ msgid "Bank Payment Line"
|
|
1363
|
-
#~ msgstr "Línea de pago bancario"
|
|
1364
|
-
|
|
1365
|
-
#~ msgid "Bank Payment Line Ref"
|
|
1366
|
-
#~ msgstr "Ref. de la línea de pago bancario"
|
|
1367
|
-
|
|
1368
|
-
#~ msgid "Bank Payment Lines"
|
|
1369
|
-
#~ msgstr "Líneas de pago bancario"
|
|
1370
|
-
|
|
1371
|
-
#, python-format
|
|
1372
|
-
#~ msgid "Debit bank line %s"
|
|
1373
|
-
#~ msgstr "Línea de adeudo de banco %s"
|
|
1374
|
-
|
|
1375
|
-
#, python-format
|
|
1376
|
-
#~ msgid "Debit order %s"
|
|
1377
|
-
#~ msgstr "Orden de cobro %s"
|
|
1378
|
-
|
|
1379
|
-
#~ msgid "Generate Accounting Entries On File Upload"
|
|
1380
|
-
#~ msgstr "Generar asientos contables al subir el archivo"
|
|
1381
|
-
|
|
1382
|
-
#~ msgid "Move Option"
|
|
1383
|
-
#~ msgstr "Opciones de asiento"
|
|
1384
|
-
|
|
1385
|
-
#~ msgid "Number of unread messages"
|
|
1386
|
-
#~ msgstr "Número de mensajes sin leer"
|
|
1387
|
-
|
|
1388
|
-
#, python-format
|
|
1389
|
-
#~ msgid ""
|
|
1390
|
-
#~ "On the payment mode '%s', you must choose an option for the 'Move Option' "
|
|
1391
|
-
#~ "parameter."
|
|
1392
|
-
#~ msgstr ""
|
|
1393
|
-
#~ "En el modo de pago '%s', debe escoger una opción para las 'Opciones de "
|
|
1394
|
-
#~ "asiento'."
|
|
1395
|
-
|
|
1396
|
-
#~ msgid "One move per payment date"
|
|
1397
|
-
#~ msgstr "Un asiento por fecha de pago"
|
|
1398
|
-
|
|
1399
|
-
#~ msgid "One move per payment line"
|
|
1400
|
-
#~ msgstr "Un asiento por línea de pago"
|
|
1401
|
-
|
|
1402
|
-
#~ msgid "Order"
|
|
1403
|
-
#~ msgstr "Orden"
|
|
1404
|
-
|
|
1405
|
-
#, python-format
|
|
1406
|
-
#~ msgid "Payment bank line %s"
|
|
1407
|
-
#~ msgstr "Línea de pago bancario %s"
|
|
1408
|
-
|
|
1409
|
-
#, python-format
|
|
1410
|
-
#~ msgid "Payment order %s"
|
|
1411
|
-
#~ msgstr "Orden %s"
|
|
1412
|
-
|
|
1413
|
-
#~ msgid "Post Move"
|
|
1414
|
-
#~ msgstr "Publicar movimiento"
|
|
1415
|
-
|
|
1416
|
-
#~ msgid "Related Payment Lines"
|
|
1417
|
-
#~ msgstr "Líneas de pago relacionadas"
|
|
1418
|
-
|
|
1419
|
-
#~ msgid "Search Bank Payment Lines"
|
|
1420
|
-
#~ msgstr "Buscar líneas de pago bancario"
|
|
1421
|
-
|
|
1422
|
-
#~ msgid ""
|
|
1423
|
-
#~ "The bank payment lines are used to generate the payment file. They are "
|
|
1424
|
-
#~ "automatically created from transaction lines upon confirmation of the "
|
|
1425
|
-
#~ "payment order: one bank payment line can group several transaction lines "
|
|
1426
|
-
#~ "if the option 'Group Transactions in Payment Orders' is active on the "
|
|
1427
|
-
#~ "payment mode."
|
|
1428
|
-
#~ msgstr ""
|
|
1429
|
-
#~ "Las líneas de pago bancarias se usan para generar el archivo de pago. Se "
|
|
1430
|
-
#~ "crean automáticamente de las líneas de transacciones en la confirmación "
|
|
1431
|
-
#~ "de la orden: una línea de pago bancario puede agrupar varias líneas de "
|
|
1432
|
-
#~ "transacción si la opción 'Agrupar transacciones en las órdenes' está "
|
|
1433
|
-
#~ "activada en el modo de pago."
|
|
1434
|
-
|
|
1435
|
-
#~ msgid "Total Amount"
|
|
1436
|
-
#~ msgstr "Importe total"
|
|
1437
|
-
|
|
1438
|
-
#~ msgid "Unread Messages"
|
|
1439
|
-
#~ msgstr "Mensajes sin leer"
|
|
1440
|
-
|
|
1441
|
-
#~ msgid "Unread Messages Counter"
|
|
1442
|
-
#~ msgstr "Contador de mensajes sin leer"
|
|
1443
|
-
|
|
1444
|
-
#~ msgid "%d payment lines added to the existing draft payment order %s."
|
|
1445
|
-
#~ msgstr "%d líneas de pago añadidas a la orden de pago en borrador %s."
|
|
1446
|
-
|
|
1447
|
-
#~ msgid ""
|
|
1448
|
-
#~ "%d payment lines added to the new draft payment order %s which has been "
|
|
1449
|
-
#~ "automatically created."
|
|
1450
|
-
#~ msgstr ""
|
|
1451
|
-
#~ "%d líneas de pago añadidas a una nueva orden de pago en borrador %s que "
|
|
1452
|
-
#~ "ha sido creada automáticamente."
|
|
1453
|
-
|
|
1454
|
-
#~ msgid ""
|
|
1455
|
-
#~ "A valid BIC contains 8 or 11 characters. The BIC '%s' contains %d "
|
|
1456
|
-
#~ "characters, so it is not valid."
|
|
1457
|
-
#~ msgstr ""
|
|
1458
|
-
#~ "Un BIC válido contiene 8 u 11 caracteres. El BIC '%s' contiene %d "
|
|
1459
|
-
#~ "caracteres, por lo que no es válido."
|
|
1460
|
-
|
|
1461
|
-
#~ msgid "Can not reconcile: no move line for payment line %s of partner '%s'."
|
|
1462
|
-
#~ msgstr ""
|
|
1463
|
-
#~ "No se puede conciliar: no hay apunte para la línea de pago %s de la "
|
|
1464
|
-
#~ "empresa '%s'."
|
|
1465
|
-
|
|
1466
|
-
#~ msgid ""
|
|
1467
|
-
#~ "Cannot delete a payment order line whose payment order is in state '%s'. "
|
|
1468
|
-
#~ "You need to cancel it first."
|
|
1469
|
-
#~ msgstr ""
|
|
1470
|
-
#~ "No se puede eliminar una línea de una orden de pago cuyo estado es '%s'. "
|
|
1471
|
-
#~ "Primero debes cancelarla."
|
|
1472
|
-
|
|
1473
|
-
#~ msgid "Followers (Channels)"
|
|
1474
|
-
#~ msgstr "Seguidores (Canales)"
|
|
1475
|
-
|
|
1476
|
-
#~ msgid ""
|
|
1477
|
-
#~ "For partner '%s', the account of the account move line to pay (%s) is "
|
|
1478
|
-
#~ "different from the account of of the transit move line (%s)."
|
|
1479
|
-
#~ msgstr ""
|
|
1480
|
-
#~ "Para la empresa '%s', la cuenta del apunte a pagar (%s) es diferente de "
|
|
1481
|
-
#~ "la cuenta del apunte de tránsito (%s)."
|
|
1482
|
-
|
|
1483
|
-
#~ msgid "Move line '%s' of partner '%s' has already been reconciled"
|
|
1484
|
-
#~ msgstr "El apunte '%s' de la empresa '%s' ya ha sido conciliado"
|
|
1485
|
-
|
|
1486
|
-
#~ msgid "On payment order %s, the Payment Execution Date is in the past (%s)."
|
|
1487
|
-
#~ msgstr "En la orden %s, la fecha de ejecución es anterior a la actual (%s)."
|
|
1488
|
-
|
|
1489
|
-
#~ msgid "The amount for Partner '%s' is negative or null (%.2f) !"
|
|
1490
|
-
#~ msgstr "El importe para el empresa '%s' es negativo o nulo (%.2f) !"
|
|
1491
|
-
|
|
1492
|
-
#~ msgid ""
|
|
1493
|
-
#~ "The payment mode '%s' has the option 'Disallow Debit Before Maturity "
|
|
1494
|
-
#~ "Date'. The payment line %s has a maturity date %s which is after the "
|
|
1495
|
-
#~ "computed payment date %s."
|
|
1496
|
-
#~ msgstr ""
|
|
1497
|
-
#~ "El modo de pago '%s' tiene la opción 'No permitir adeudo antes de la "
|
|
1498
|
-
#~ "fecha de vencimiento'. La línea de pago %s tiene una fecha de vencimiento "
|
|
1499
|
-
#~ "%s que es después de la fecha de pago calculada %s."
|
|
1500
|
-
|
|
1501
|
-
#~ msgid ""
|
|
1502
|
-
#~ "The payment type (%s) is not the same as the payment type of the payment "
|
|
1503
|
-
#~ "mode (%s)"
|
|
1504
|
-
#~ msgstr ""
|
|
1505
|
-
#~ "El tipo de pago (%s) no es el mismo que el tipo de pago del modo de pago "
|
|
1506
|
-
#~ "(%s)"
|
|
1507
|
-
|
|
1508
|
-
#~ msgid "Done"
|
|
1509
|
-
#~ msgstr "Realizado"
|
|
1510
|
-
|
|
1511
|
-
#~ msgid "Done Date"
|
|
1512
|
-
#~ msgstr "Fecha de realización"
|
|
1513
|
-
|
|
1514
|
-
#~ msgid ""
|
|
1515
|
-
#~ "Journal to write payment entries when confirming payment/debit orders of "
|
|
1516
|
-
#~ "this mode"
|
|
1517
|
-
#~ msgstr ""
|
|
1518
|
-
#~ "Diario al que escribir los asientos contables cuando se confirme la orden "
|
|
1519
|
-
#~ "de cobro/pago de este modo"
|
|
1520
|
-
|
|
1521
|
-
#~ msgid "Number of Bank Lines"
|
|
1522
|
-
#~ msgstr "Número de líneas bancarias"
|
|
1523
|
-
|
|
1524
|
-
#~ msgid "Offsetting Account"
|
|
1525
|
-
#~ msgstr "Cuenta de compensación"
|
|
1526
|
-
|
|
1527
|
-
#~ msgid ""
|
|
1528
|
-
#~ "On the payment mode '%s', you must select a value for the 'Transfer "
|
|
1529
|
-
#~ "Account'."
|
|
1530
|
-
#~ msgstr ""
|
|
1531
|
-
#~ "En el modo de pago '%s', debe seleccionar un valor para la 'Cuenta de "
|
|
1532
|
-
#~ "transferencia'."
|
|
1533
|
-
|
|
1534
|
-
#~ msgid ""
|
|
1535
|
-
#~ "On the payment mode '%s', you must select a value for the 'Transfer "
|
|
1536
|
-
#~ "Journal'."
|
|
1537
|
-
#~ msgstr ""
|
|
1538
|
-
#~ "En el modo de pago '%s', debe seleccionar un valor para el 'Diario de "
|
|
1539
|
-
#~ "transferencia'."
|
|
1540
|
-
|
|
1541
|
-
#~ msgid ""
|
|
1542
|
-
#~ "On the payment mode '%s', you must select an option for the 'Offsetting "
|
|
1543
|
-
#~ "Account' parameter"
|
|
1544
|
-
#~ msgstr ""
|
|
1545
|
-
#~ "En el modo de pago '%s', debe seleccionar una opción para el parámetro "
|
|
1546
|
-
#~ "'Cuenta de compensación'"
|
|
1547
|
-
|
|
1548
|
-
#~ msgid ""
|
|
1549
|
-
#~ "Pay off lines in 'file uploaded' payment orders with a move on this "
|
|
1550
|
-
#~ "account. You can only select accounts that are marked for reconciliation"
|
|
1551
|
-
#~ msgstr ""
|
|
1552
|
-
#~ "Las líneas de pago de la orden se conciliarán en la 'subida de archivo' "
|
|
1553
|
-
#~ "con un apunte a esta cuenta. Sólo puede seleccionar las cuentas que están "
|
|
1554
|
-
#~ "marcadas para conciliación"
|
|
1555
|
-
|
|
1556
|
-
#~ msgid "Transaction Lines"
|
|
1557
|
-
#~ msgstr "Líneas de transacción"
|
|
1558
|
-
|
|
1559
|
-
#~ msgid "Transfer Account"
|
|
1560
|
-
#~ msgstr "Cuenta de transferencia"
|
|
1561
|
-
|
|
1562
|
-
#~ msgid "Transfer Journal"
|
|
1563
|
-
#~ msgstr "Diario de transferencia"
|
|
1564
|
-
|
|
1565
|
-
#~ msgid "Transfer Journal Entries"
|
|
1566
|
-
#~ msgstr "Asientos de transferencia"
|
|
1567
|
-
|
|
1568
|
-
#~ msgid "Due date"
|
|
1569
|
-
#~ msgstr "Fecha de vencimiento"
|
|
1570
|
-
|
|
1571
|
-
#~ msgid "ISO"
|
|
1572
|
-
#~ msgstr "ISO"
|
|
1573
|
-
|
|
1574
|
-
#~ msgid "Invoice"
|
|
1575
|
-
#~ msgstr "Factura"
|
|
1576
|
-
|
|
1577
|
-
#~ msgid "No Journal Entry on invoice %s"
|
|
1578
|
-
#~ msgstr "No se ha encontrado asiento en la factura %s"
|
|
1579
|
-
|
|
1580
|
-
#~ msgid "Payment Order / Payment"
|
|
1581
|
-
#~ msgstr "Orden de Pago / Pago"
|
|
1582
|
-
|
|
1583
|
-
#~ msgid "Account Entry"
|
|
1584
|
-
#~ msgstr "Asiento contable"
|
|
1585
|
-
|
|
1586
|
-
#~ msgid "report.account_payment_order.print_account_payment_order_main"
|
|
1587
|
-
#~ msgstr "report.account_payment_order.print_account_payment_order_main"
|
|
@@ -234,3 +234,12 @@ class AccountMove(models.Model):
|
|
|
234
234
|
}
|
|
235
235
|
)
|
|
236
236
|
return action
|
|
237
|
+
|
|
238
|
+
@api.model
|
|
239
|
+
def _get_invoice_in_payment_state(self):
|
|
240
|
+
"""Called from _compute_payment_state method.
|
|
241
|
+
Consider in_payment all the moves that are included in a payment order.
|
|
242
|
+
"""
|
|
243
|
+
if self.line_ids.payment_line_ids:
|
|
244
|
+
return "in_payment"
|
|
245
|
+
return super()._get_invoice_in_payment_state()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Copyright 2019 ACSONE SA/NV
|
|
2
2
|
# Copyright 2022 Tecnativa - Pedro M. Baeza
|
|
3
3
|
# Copyright 2023 Noviat
|
|
4
|
+
# Copyright 2024 Tecnativa - Víctor Martínez
|
|
4
5
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
5
6
|
|
|
6
7
|
from odoo import _, api, fields, models
|
|
@@ -52,3 +53,18 @@ class AccountPayment(models.Model):
|
|
|
52
53
|
self.env.context, default_payment_reference=self.payment_reference
|
|
53
54
|
),
|
|
54
55
|
}
|
|
56
|
+
|
|
57
|
+
def _prepare_move_line_default_vals(
|
|
58
|
+
self, write_off_line_vals=None, force_balance=None
|
|
59
|
+
):
|
|
60
|
+
"""Overwrite date_maturity of the move_lines that are generated when related
|
|
61
|
+
to a payment order.
|
|
62
|
+
"""
|
|
63
|
+
vals_list = super()._prepare_move_line_default_vals(
|
|
64
|
+
write_off_line_vals=write_off_line_vals, force_balance=force_balance
|
|
65
|
+
)
|
|
66
|
+
if not self.payment_order_id:
|
|
67
|
+
return vals_list
|
|
68
|
+
for vals in vals_list:
|
|
69
|
+
vals["date_maturity"] = self.payment_line_ids[0].date
|
|
70
|
+
return vals_list
|
|
@@ -186,13 +186,14 @@ class AccountPaymentLine(models.Model):
|
|
|
186
186
|
payment lines.
|
|
187
187
|
"""
|
|
188
188
|
journal = self.order_id.journal_id
|
|
189
|
+
payment_mode = self.order_id.payment_mode_id
|
|
189
190
|
vals = {
|
|
190
191
|
"payment_type": self.order_id.payment_type,
|
|
191
192
|
"partner_id": self.partner_id.id,
|
|
192
193
|
"destination_account_id": self.move_line_id.account_id.id,
|
|
193
194
|
"company_id": self.order_id.company_id.id,
|
|
194
195
|
"amount": sum(self.mapped("amount_currency")),
|
|
195
|
-
"date":
|
|
196
|
+
"date": fields.Date.today(),
|
|
196
197
|
"currency_id": self.currency_id.id,
|
|
197
198
|
"ref": self.order_id.name,
|
|
198
199
|
# Put the name as the wildcard for forcing a unique name. If not, Odoo gets
|
|
@@ -207,11 +208,7 @@ class AccountPaymentLine(models.Model):
|
|
|
207
208
|
# Determine payment method line according payment method and journal
|
|
208
209
|
line = self.env["account.payment.method.line"].search(
|
|
209
210
|
[
|
|
210
|
-
(
|
|
211
|
-
"payment_method_id",
|
|
212
|
-
"=",
|
|
213
|
-
self.order_id.payment_mode_id.payment_method_id.id,
|
|
214
|
-
),
|
|
211
|
+
("payment_method_id", "=", payment_mode.payment_method_id.id),
|
|
215
212
|
("journal_id", "=", journal.id),
|
|
216
213
|
],
|
|
217
214
|
limit=1,
|
|
@@ -366,7 +366,7 @@ ul.auto-toc {
|
|
|
366
366
|
!! This file is generated by oca-gen-addon-readme !!
|
|
367
367
|
!! changes will be overwritten. !!
|
|
368
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
369
|
-
!! source digest: sha256:
|
|
369
|
+
!! source digest: sha256:0178290e954d4664d03a5c9a002404e0410bba7eb6909bbd09aa5bffb345dc91
|
|
370
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
371
371
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/bank-payment/tree/17.0/account_payment_order"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-payment-17-0/bank-payment-17-0-account_payment_order"><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/bank-payment&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
372
372
|
<p>This module adds support for payment orders and debit orders.</p>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Copyright 2017 Camptocamp SA
|
|
2
2
|
# Copyright 2017 Creu Blanca
|
|
3
3
|
# Copyright 2019-2022 Tecnativa - Pedro M. Baeza
|
|
4
|
+
# Copyright 2024 Tecnativa - Víctor Martínez
|
|
4
5
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
5
|
-
|
|
6
6
|
from datetime import date, timedelta
|
|
7
7
|
|
|
8
|
+
from freezegun import freeze_time
|
|
9
|
+
|
|
8
10
|
from odoo.exceptions import UserError, ValidationError
|
|
9
11
|
from odoo.tests import tagged
|
|
10
12
|
from odoo.tests.common import Form
|
|
@@ -112,27 +114,44 @@ class TestPaymentOrderInbound(TestPaymentOrderInboundBase):
|
|
|
112
114
|
def test_creation(self):
|
|
113
115
|
payment_order = self.inbound_order
|
|
114
116
|
self.assertEqual(len(payment_order.ids), 1)
|
|
115
|
-
|
|
116
117
|
payment_order.write({"journal_id": self.journal.id})
|
|
117
|
-
|
|
118
118
|
self.assertEqual(len(payment_order.payment_line_ids), 1)
|
|
119
119
|
self.assertFalse(payment_order.payment_ids)
|
|
120
|
-
|
|
121
120
|
# Open payment order
|
|
122
121
|
payment_order.draft2open()
|
|
123
|
-
|
|
124
122
|
self.assertEqual(payment_order.payment_count, 1)
|
|
125
|
-
|
|
126
123
|
# Generate and upload
|
|
127
124
|
payment_order.open2generated()
|
|
128
125
|
payment_order.generated2uploaded()
|
|
129
|
-
|
|
130
126
|
self.assertEqual(payment_order.state, "uploaded")
|
|
127
|
+
self.assertEqual(self.invoice.payment_state, "in_payment")
|
|
131
128
|
with self.assertRaises(UserError):
|
|
132
129
|
payment_order.unlink()
|
|
133
|
-
|
|
130
|
+
# Cancel order
|
|
134
131
|
payment_order.action_uploaded_cancel()
|
|
135
132
|
self.assertEqual(payment_order.state, "cancel")
|
|
136
133
|
payment_order.cancel2draft()
|
|
137
134
|
payment_order.unlink()
|
|
138
135
|
self.assertEqual(len(self.payment_order_obj.search(self.domain)), 0)
|
|
136
|
+
|
|
137
|
+
@freeze_time("2024-04-01")
|
|
138
|
+
def test_creation_transfer_move_date(self):
|
|
139
|
+
self.inbound_order.date_prefered = "fixed"
|
|
140
|
+
self.inbound_order.date_scheduled = "2024-06-01"
|
|
141
|
+
self.inbound_order.draft2open()
|
|
142
|
+
payment_move = self.inbound_order.payment_ids.move_id
|
|
143
|
+
self.assertEqual(payment_move.date, date(2024, 4, 1)) # now
|
|
144
|
+
self.assertEqual(
|
|
145
|
+
payment_move.line_ids.mapped("date_maturity"),
|
|
146
|
+
[date(2024, 6, 1), date(2024, 6, 1)],
|
|
147
|
+
)
|
|
148
|
+
self.assertEqual(self.inbound_order.payment_count, 1)
|
|
149
|
+
self.inbound_order.open2generated()
|
|
150
|
+
self.inbound_order.generated2uploaded()
|
|
151
|
+
self.assertEqual(self.inbound_order.state, "uploaded")
|
|
152
|
+
payment_move = self.inbound_order.payment_ids.move_id
|
|
153
|
+
self.assertEqual(payment_move.date, date(2024, 4, 1)) # now
|
|
154
|
+
self.assertEqual(
|
|
155
|
+
payment_move.line_ids.mapped("date_maturity"),
|
|
156
|
+
[date(2024, 6, 1), date(2024, 6, 1)],
|
|
157
|
+
)
|
|
@@ -339,8 +339,7 @@ class TestPaymentOrderOutbound(TestPaymentOrderOutboundBase):
|
|
|
339
339
|
outbound_order.draft2open()
|
|
340
340
|
self.assertEqual(outbound_order.payment_count, 2)
|
|
341
341
|
self.assertEqual(
|
|
342
|
-
outbound_order.payment_line_ids[0].date,
|
|
343
|
-
outbound_order.payment_line_ids[0].payment_ids.date,
|
|
342
|
+
outbound_order.payment_line_ids[0].payment_ids.date, fields.Date.today()
|
|
344
343
|
)
|
|
345
344
|
self.assertEqual(outbound_order.payment_line_ids[1].date, date.today())
|
|
346
345
|
self.assertEqual(
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
domain="[('reconciled','=', False), ('account_id.reconcile', '=', True)] "
|
|
20
20
|
/>
|
|
21
21
|
<!-- we removed the filter on amount_to_pay, because we want to be able to select refunds -->
|
|
22
|
-
<field name="date" />
|
|
22
|
+
<field name="date" readonly="1" force_save="1" />
|
|
23
23
|
<field name="ml_maturity_date" readonly="1" />
|
|
24
24
|
<field name="amount_currency" />
|
|
25
25
|
<field name="currency_id" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-account_payment_order
|
|
3
|
-
Version: 17.0.1.
|
|
3
|
+
Version: 17.0.1.4.0
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: odoo-addon-account_payment_partner>=17.0dev,<17.1dev
|
|
6
6
|
Requires-Dist: odoo>=17.0a,<17.1dev
|
|
@@ -24,7 +24,7 @@ Account Payment Order
|
|
|
24
24
|
!! This file is generated by oca-gen-addon-readme !!
|
|
25
25
|
!! changes will be overwritten. !!
|
|
26
26
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
|
-
!! source digest: sha256:
|
|
27
|
+
!! source digest: sha256:0178290e954d4664d03a5c9a002404e0410bba7eb6909bbd09aa5bffb345dc91
|
|
28
28
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
29
|
|
|
30
30
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
odoo/addons/account_payment_order/README.rst,sha256=
|
|
1
|
+
odoo/addons/account_payment_order/README.rst,sha256=FYGC6KZj36HpfWOGzhHWa8XYEBE0pURz1Hnu43WpCMU,4680
|
|
2
2
|
odoo/addons/account_payment_order/__init__.py,sha256=HVXFv0Gbl3gl3fcRBZhi3rlZgriQVo_8LiEgUjtkcFs,96
|
|
3
|
-
odoo/addons/account_payment_order/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/account_payment_order/__manifest__.py,sha256=ZziN25dZ_46-cnvzflIGAewfsuHhhztZD_q3AZolM3k,1606
|
|
4
4
|
odoo/addons/account_payment_order/hooks.py,sha256=XQDHFvlq4pQCJoEM6sY01Vh6kOgG6JFP3DPNPliyntA,667
|
|
5
5
|
odoo/addons/account_payment_order/data/payment_seq.xml,sha256=EKeoSUKlM3TH7vljq7tj6XvPJMMQu8IMtwKC_LM4C4A,864
|
|
6
6
|
odoo/addons/account_payment_order/demo/payment_demo.xml,sha256=-qNu7yLwK9I80Ol6YfwoccqpSsCHx2kSumcp2WlgsxU,1412
|
|
@@ -13,7 +13,7 @@ odoo/addons/account_payment_order/i18n/cs.po,sha256=O0E5N2UH-hMi7Fo_6Hf4ovrMK-Sz
|
|
|
13
13
|
odoo/addons/account_payment_order/i18n/da_DK.po,sha256=alE26waZpeSjylRLYB3c1GECuxvS7qoPjvyMrb_f440,50754
|
|
14
14
|
odoo/addons/account_payment_order/i18n/de.po,sha256=V0BgFvd3O4vTZn16BetC_dVr_ieh3ZdVpV_rArC0x9o,55207
|
|
15
15
|
odoo/addons/account_payment_order/i18n/el_GR.po,sha256=Ib1W2OEHs_AzRoyxexOmEgDvpgfuu2QMB_NF4YkTD3Y,50375
|
|
16
|
-
odoo/addons/account_payment_order/i18n/es.po,sha256=
|
|
16
|
+
odoo/addons/account_payment_order/i18n/es.po,sha256=GObENDbnWtW5g-eK8BOlxJeSn1N69S-hkfSaw8VcqBE,58284
|
|
17
17
|
odoo/addons/account_payment_order/i18n/es_AR.po,sha256=59FTeW1ZWm06E81_S3dK1hKif7i7Hiuf-n2gDxjp0s4,63313
|
|
18
18
|
odoo/addons/account_payment_order/i18n/es_CL.po,sha256=deVBpDAeCVDuoDRb7OKqWCy_59kHSlOSTPfbTa-lhBk,63496
|
|
19
19
|
odoo/addons/account_payment_order/i18n/es_CR.po,sha256=sPoR7bTYuc1s2scz4f3Qs9uq_VH3JHCZgRMVCRgDOEo,50136
|
|
@@ -46,10 +46,10 @@ odoo/addons/account_payment_order/i18n/tr.po,sha256=8dyoua7Y0ll6AbaJHc_u_L1TMiPT
|
|
|
46
46
|
odoo/addons/account_payment_order/i18n/vi.po,sha256=HLhT_Xz1mvzo03ehNPLW5SIj7frz2ETPOXQyZiUwjGY,50112
|
|
47
47
|
odoo/addons/account_payment_order/models/__init__.py,sha256=AB9PJLjHR7TmbreS6BTHIEbeQvF0dYuk81dgN8_gbKs,285
|
|
48
48
|
odoo/addons/account_payment_order/models/account_journal.py,sha256=J5PwsFBj61Jn7mnpd2e61hEo-2mYVQycxpV5zUXmTrs,1188
|
|
49
|
-
odoo/addons/account_payment_order/models/account_move.py,sha256=
|
|
49
|
+
odoo/addons/account_payment_order/models/account_move.py,sha256=4CIqwmNGoENLwjTAy96YkJdPfoJI3bHwRqCteIewgTM,10092
|
|
50
50
|
odoo/addons/account_payment_order/models/account_move_line.py,sha256=SLPNyIOWmE40FzkKsMIkhRVXc_UbSwJ9PICKj4AlDco,3783
|
|
51
|
-
odoo/addons/account_payment_order/models/account_payment.py,sha256=
|
|
52
|
-
odoo/addons/account_payment_order/models/account_payment_line.py,sha256=
|
|
51
|
+
odoo/addons/account_payment_order/models/account_payment.py,sha256=WhHo-cB_LmUMjvKsPEpbYvfxy_pUD6rXuBrVjg31v9Y,2740
|
|
52
|
+
odoo/addons/account_payment_order/models/account_payment_line.py,sha256=ixfKLzwIhl-EFfGOPoFhDINuir0-sn5q1xF_rcCqlJk,9396
|
|
53
53
|
odoo/addons/account_payment_order/models/account_payment_method.py,sha256=z1_LzvZY17SPRTwT2XwHFyUfy2YN3m00WA62gznPzcE,431
|
|
54
54
|
odoo/addons/account_payment_order/models/account_payment_mode.py,sha256=uONi4ezJRHHbTeD1cDiUDWorvoGnWnKeqTVGHsohJRM,3589
|
|
55
55
|
odoo/addons/account_payment_order/models/account_payment_order.py,sha256=B-g8WjE5uI5IKS5-HYNEFvbbjjQPRWyyUiDOWm2F5ow,16809
|
|
@@ -66,16 +66,16 @@ odoo/addons/account_payment_order/report/print_account_payment_order.xml,sha256=
|
|
|
66
66
|
odoo/addons/account_payment_order/security/ir.model.access.csv,sha256=DquU4QYd706_JxewPT0eAy4pc37FeGcoynOqUmu45kc,1211
|
|
67
67
|
odoo/addons/account_payment_order/security/payment_security.xml,sha256=kfkYDi4hkrQCm8lRUUIrqQoibzN8h67H2qV_mj390eQ,1248
|
|
68
68
|
odoo/addons/account_payment_order/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
69
|
-
odoo/addons/account_payment_order/static/description/index.html,sha256=
|
|
69
|
+
odoo/addons/account_payment_order/static/description/index.html,sha256=0gwNzi2ol5YY_5RsO_il44L-liD7LAQIigi0RUNwjOM,15948
|
|
70
70
|
odoo/addons/account_payment_order/tests/__init__.py,sha256=lOx5jg7LBTMs0mXira6LpqK_dNDUbPa5nViWWAug7xc,174
|
|
71
71
|
odoo/addons/account_payment_order/tests/test_account_payment.py,sha256=D_gDXDO94gpgANHEJx6cCIHh7em2GOXZqhWqqav4XVw,6787
|
|
72
72
|
odoo/addons/account_payment_order/tests/test_bank.py,sha256=4d1l8o43-Gy_D7d24Na-E7T9o5ALAgtn8xD7JWJJ2UQ,403
|
|
73
73
|
odoo/addons/account_payment_order/tests/test_payment_mode.py,sha256=ek_ypq8ignQPMzFoDT3JR53tZ00Utfc5TY5W3Htx01A,3300
|
|
74
|
-
odoo/addons/account_payment_order/tests/test_payment_order_inbound.py,sha256=
|
|
75
|
-
odoo/addons/account_payment_order/tests/test_payment_order_outbound.py,sha256
|
|
74
|
+
odoo/addons/account_payment_order/tests/test_payment_order_inbound.py,sha256=LX4_-T748xDx8NLw_7tnl0YV7b4pBOetK8oNK6F2vZc,6592
|
|
75
|
+
odoo/addons/account_payment_order/tests/test_payment_order_outbound.py,sha256=JDxT8EvO3IaH2lDzXn7KFtnK8MwqUO_nY40IiTU_x4s,17986
|
|
76
76
|
odoo/addons/account_payment_order/views/account_invoice_view.xml,sha256=JCD_j1AM25g9o12AW9LfmZOrNUrWUJNWY-Nrulj1018,4190
|
|
77
77
|
odoo/addons/account_payment_order/views/account_move_line.xml,sha256=MZDzWzwWVO9HkMT0dmGJHJuLNmYo2gtgga3ls6iBWyk,2373
|
|
78
|
-
odoo/addons/account_payment_order/views/account_payment_line.xml,sha256=
|
|
78
|
+
odoo/addons/account_payment_order/views/account_payment_line.xml,sha256=CiKzHP5Sy7UA1xtpTta5Dq0VZD4Own1K5SxxtYiAZxg,4965
|
|
79
79
|
odoo/addons/account_payment_order/views/account_payment_method.xml,sha256=zBGrZYNAFxgLQOpSE7alPUFJ8vESD4JWd0B3qmE4_vY,717
|
|
80
80
|
odoo/addons/account_payment_order/views/account_payment_mode.xml,sha256=Q3oms35Eqyw3fyxPK7EHvsuP50KYJuvzPnso3Ja5C-w,2876
|
|
81
81
|
odoo/addons/account_payment_order/views/account_payment_order.xml,sha256=K_McyVSrw8zFyjIM9xHAHu8IEWMaPrGEyVX11RXP1yo,12824
|
|
@@ -88,7 +88,7 @@ odoo/addons/account_payment_order/wizard/account_payment_line_create.py,sha256=F
|
|
|
88
88
|
odoo/addons/account_payment_order/wizard/account_payment_line_create_view.xml,sha256=Ln0tzR3xytjZdSuzWSc6X4MQxUG2vPxqfiPSo5JCguc,4532
|
|
89
89
|
odoo/addons/account_payment_order/wizard/account_payment_update.py,sha256=20_tas7P85zDv1A-LyG5UTjKdx9EJy-0vKldt1n3Tt8,547
|
|
90
90
|
odoo/addons/account_payment_order/wizard/account_payment_update_views.xml,sha256=NW4YiMhhmM5xCJ5n86KNPtn5xRnCmvzuwRw-BmRiBMM,979
|
|
91
|
-
odoo_addon_account_payment_order-17.0.1.
|
|
92
|
-
odoo_addon_account_payment_order-17.0.1.
|
|
93
|
-
odoo_addon_account_payment_order-17.0.1.
|
|
94
|
-
odoo_addon_account_payment_order-17.0.1.
|
|
91
|
+
odoo_addon_account_payment_order-17.0.1.4.0.dist-info/METADATA,sha256=FIZAA45LmfOo5jeQl1WfGwzJ3-cn_j6Rj1W5tpyU6VE,5343
|
|
92
|
+
odoo_addon_account_payment_order-17.0.1.4.0.dist-info/WHEEL,sha256=8Rd4enx1PCuyDWP4SABqO5Fv8rpaknqp3VzjoFFLa6c,83
|
|
93
|
+
odoo_addon_account_payment_order-17.0.1.4.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
94
|
+
odoo_addon_account_payment_order-17.0.1.4.0.dist-info/RECORD,,
|
|
File without changes
|