Migrate to 6.4

This commit is contained in:
jm.pardo 2023-06-01 10:53:38 +02:00
parent 6e0c260102
commit 76d3dbb647
8 changed files with 33 additions and 39 deletions

View File

@ -8,7 +8,7 @@ ${'credit_note' if payment.line.origin.total_amount < 0 else 'invoice'}\
${fill('03', 2)}\ ${fill('03', 2)}\
${fill('59', 2)}\ ${fill('59', 2)}\
${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\ ${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\
${fill(group.journal.suffix, 3)} ${fill(group.journal.suffix, 3)}\
${fillblank(12)}\ ${fillblank(12)}\
${fill('001', 3)}\ ${fill('001', 3)}\
${datetime.datetime.now().strftime('%d%m%y') or fillblank(6)}\ ${datetime.datetime.now().strftime('%d%m%y') or fillblank(6)}\
@ -21,7 +21,7 @@ ${fillblank(30)}
${fill('06', 2)}\ ${fill('06', 2)}\
${fill('59', 2)}\ ${fill('59', 2)}\
${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\ ${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\
${fill(group.journal.suffix, 3)} ${fill(group.journal.suffix, 3)}\
${fill(payment.party.tax_identifier and payment.party.tax_identifier.code[2:] or payment.party.code, 12)}\ ${fill(payment.party.tax_identifier and payment.party.tax_identifier.code[2:] or payment.party.code, 12)}\
{% if i == 0 %}\ {% if i == 0 %}\
${fill('010', 3)}\ ${fill('010', 3)}\
@ -72,7 +72,7 @@ ${fillblank(2)}
${fill('08', 2)}\ ${fill('08', 2)}\
${fill('59', 2)}\ ${fill('59', 2)}\
${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\ ${fill(group.company.party.tax_identifier and group.company.party.tax_identifier.code[2:] or group.company.party.code, 9, norm=True)}\
${fill(group.journal.suffix, 3)} ${fill(group.journal.suffix, 3)}\
${fillblank(12)}\ ${fillblank(12)}\
${fillblank(3)}\ ${fillblank(3)}\
${format_number(sum(p.amount for p in group.payments if p.amount), 10, 2)}\ ${format_number(sum(p.amount for p in group.payments if p.amount), 10, 2)}\

View File

@ -1,5 +1,2 @@
# The COPYRIGHT file at the top level of this repository contains # The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms. # the full copyright notices and license terms.
from .test_account_payment_confirming_n68 import suite
__all__ = ['suite']

View File

@ -3,12 +3,12 @@
06591 0004 011 06591 0004 011
06591 0004 012 06591 0004 012
06591 0004 013 06591 0004 013
06591 0004 01400000023120720220000000180000 06591 0004 014000000%(date_year)s0000000180000
06591 0004 01500000023 12072022000000018000H 06591 0004 01500000023 %(date)s000000018000H
06591 0003 010Party 1 06591 0003 010Party 1
06591 0003 011 06591 0003 011
06591 0003 012 06591 0003 012
06591 0003 013 06591 0003 013
06591 0003 01400000012280620180000000100000 06591 0003 01400000012280620180000000100000
06591 0003 01500000012 12072022000000010000H 06591 0003 01500000012 %(date)s000000010000H
08591 000 0000000280000000000014 08591 000 0000000280000000000014

View File

@ -139,6 +139,7 @@ Pay invoices::
>>> pay_line.execute('next_') >>> pay_line.execute('next_')
>>> payments = Payment.find() >>> payments = Payment.find()
>>> for payment in payments: >>> for payment in payments:
... payment.click('submit')
... payment.click('approve') ... payment.click('approve')
>>> len(payments) >>> len(payments)
2 2
@ -154,5 +155,10 @@ Process the payment::
>>> message, = group.confirming_messages >>> message, = group.confirming_messages
>>> file = os.path.join(os.path.dirname(__file__), 'sample.txt') >>> file = os.path.join(os.path.dirname(__file__), 'sample.txt')
>>> sample = io.open(file, 'rb').read().decode('ascii') >>> sample = io.open(file, 'rb').read().decode('ascii')
>>> (sample % {'today': today.strftime('%d%m%y')}) == message.message >>> sample = (sample % {
True ... 'today': today.strftime('%d%m%y'),
... 'date_year': today.strftime('%y%d%m%Y'),
... 'date': today.strftime('%d%m%Y')
... })
>>> sample == message.message
True

View File

@ -1,27 +0,0 @@
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
import unittest
import doctest
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import suite as test_suite
from trytond.tests.test_tryton import doctest_teardown
from trytond.tests.test_tryton import doctest_checker
class AccountPaymentConfirmingN68TestCase(ModuleTestCase):
"""Test Account Payment Confirming N68 module"""
module = 'account_payment_confirming_n68'
def suite():
suite = test_suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountPaymentConfirmingN68TestCase))
suite.addTests(doctest.DocFileSuite(
'scenario_account_payment_confirming_n68.rst',
tearDown=doctest_teardown, encoding='utf-8',
checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite

11
tests/test_module.py Normal file
View File

@ -0,0 +1,11 @@
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase
class AccountPaymentConfirmingN68TestCase(ModuleTestCase):
"""Test Account Payment Confirming N68 module"""
module = 'account_payment_confirming_n68'
del ModuleTestCase

7
tests/test_scenario.py Normal file
View File

@ -0,0 +1,7 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.tests.test_tryton import load_doc_tests
def load_tests(*args, **kwargs):
return load_doc_tests(__name__, __file__, *args, **kwargs)

View File

@ -1,5 +1,5 @@
[tryton] [tryton]
version=6.0.0 version=6.4.0
depends: depends:
ir ir
res res