From 6347da93113b4561d0a6bcbf725e5ce30c01c85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Pardo=20Salar?= Date: Tue, 12 Jul 2022 13:55:54 +0200 Subject: [PATCH] Migrate to 6.0 --- payment.py | 1 - template/n68.txt | 4 ++-- tests/sample.txt | 14 +++++++------- tests/scenario_account_payment_confirming_n68.rst | 6 ++++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/payment.py b/payment.py index 3ad7c04..5772289 100644 --- a/payment.py +++ b/payment.py @@ -2,7 +2,6 @@ # copyright notices and license terms. from trytond.pool import PoolMeta import os -__all__ = ['Journal', 'Group'] class Journal(metaclass=PoolMeta): diff --git a/template/n68.txt b/template/n68.txt index df13a9a..4b64eca 100644 --- a/template/n68.txt +++ b/template/n68.txt @@ -35,13 +35,13 @@ ${fillblank(24)} {% end %}\ {% if i == 2 %}\ ${fill('012', 3)}\ -${fill(address.zip or u'', 5)}\ +${fill(address.postal_code or u'', 5)}\ ${fill(address.city or u'', 40)}\ ${fillblank(24)} {% end %}\ {% if i == 3 %}\ ${fill('013', 3)}\ -${fill(address.country and address.country.code != 'ES' and address.zip or u'', 9)}\ +${fill(address.country and address.country.code != 'ES' and address.postal_code or u'', 9)}\ ${fill(address.subdivision and address.subdivision.name or u'', 30)}\ ${fill(address.country and address.country.name or u'', 20)}\ ${fillblank(10)} diff --git a/tests/sample.txt b/tests/sample.txt index 3b6c8cb..8587101 100644 --- a/tests/sample.txt +++ b/tests/sample.txt @@ -1,14 +1,14 @@ 03591 000 001%(today)s BE82068896274468 +06591 0004 010John Smith Jackson +06591 0004 011 +06591 0004 012 +06591 0004 013 +06591 0004 01400000023120720220000000180000 +06591 0004 01500000023 12072022000000018000H 06591 0003 010Party 1 06591 0003 011 06591 0003 012 06591 0003 013 06591 0003 01400000012280620180000000100000 -06591 0003 01500000012N17 18062018000000010000H1 [N17] -06591 0004 010John Smith Jackson -06591 0004 011 -06591 0004 012 -06591 0004 013 -06591 0004 01400000023040620180000000180000 -06591 0004 01500000023R-5 25052018000000018000H2 [R-5] +06591 0003 01500000012 12072022000000010000H 08591 000 0000000280000000000014 diff --git a/tests/scenario_account_payment_confirming_n68.rst b/tests/scenario_account_payment_confirming_n68.rst index 788adf1..f368bf3 100644 --- a/tests/scenario_account_payment_confirming_n68.rst +++ b/tests/scenario_account_payment_confirming_n68.rst @@ -133,8 +133,10 @@ Pay invoices:: >>> Payment = Model.get('account.payment') >>> pay_line = Wizard('account.move.line.pay', [line_to_pay, line_to_pay2]) + >>> pay_line.form.date = today + >>> pay_line.execute('next_') >>> pay_line.form.journal = payment_journal - >>> pay_line.execute('start') + >>> pay_line.execute('next_') >>> payments = Payment.find() >>> for payment in payments: ... payment.click('approve') @@ -152,5 +154,5 @@ Process the payment:: >>> message, = group.confirming_messages >>> file = os.path.join(os.path.dirname(__file__), 'sample.txt') >>> sample = io.open(file, 'rb').read().decode('ascii') - >>> (sample % {'today': today.strftime('%d%m%y')})== message.message + >>> (sample % {'today': today.strftime('%d%m%y')}) == message.message True \ No newline at end of file