Migrate to 6.0
This commit is contained in:
parent
24047f2c5c
commit
6347da9311
|
@ -2,7 +2,6 @@
|
||||||
# copyright notices and license terms.
|
# copyright notices and license terms.
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
import os
|
import os
|
||||||
__all__ = ['Journal', 'Group']
|
|
||||||
|
|
||||||
|
|
||||||
class Journal(metaclass=PoolMeta):
|
class Journal(metaclass=PoolMeta):
|
||||||
|
|
|
@ -35,13 +35,13 @@ ${fillblank(24)}
|
||||||
{% end %}\
|
{% end %}\
|
||||||
{% if i == 2 %}\
|
{% if i == 2 %}\
|
||||||
${fill('012', 3)}\
|
${fill('012', 3)}\
|
||||||
${fill(address.zip or u'', 5)}\
|
${fill(address.postal_code or u'', 5)}\
|
||||||
${fill(address.city or u'', 40)}\
|
${fill(address.city or u'', 40)}\
|
||||||
${fillblank(24)}
|
${fillblank(24)}
|
||||||
{% end %}\
|
{% end %}\
|
||||||
{% if i == 3 %}\
|
{% if i == 3 %}\
|
||||||
${fill('013', 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.subdivision and address.subdivision.name or u'', 30)}\
|
||||||
${fill(address.country and address.country.name or u'', 20)}\
|
${fill(address.country and address.country.name or u'', 20)}\
|
||||||
${fillblank(10)}
|
${fillblank(10)}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
03591 000 001%(today)s BE82068896274468
|
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 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 01500000012N17 18062018000000010000H1 [N17]
|
06591 0003 01500000012 12072022000000010000H
|
||||||
06591 0004 010John Smith Jackson
|
|
||||||
06591 0004 011
|
|
||||||
06591 0004 012
|
|
||||||
06591 0004 013
|
|
||||||
06591 0004 01400000023040620180000000180000
|
|
||||||
06591 0004 01500000023R-5 25052018000000018000H2 [R-5]
|
|
||||||
08591 000 0000000280000000000014
|
08591 000 0000000280000000000014
|
||||||
|
|
|
@ -133,8 +133,10 @@ Pay invoices::
|
||||||
|
|
||||||
>>> Payment = Model.get('account.payment')
|
>>> Payment = Model.get('account.payment')
|
||||||
>>> pay_line = Wizard('account.move.line.pay', [line_to_pay, line_to_pay2])
|
>>> 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.form.journal = payment_journal
|
||||||
>>> pay_line.execute('start')
|
>>> pay_line.execute('next_')
|
||||||
>>> payments = Payment.find()
|
>>> payments = Payment.find()
|
||||||
>>> for payment in payments:
|
>>> for payment in payments:
|
||||||
... payment.click('approve')
|
... payment.click('approve')
|
||||||
|
@ -152,5 +154,5 @@ 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 % {'today': today.strftime('%d%m%y')}) == message.message
|
||||||
True
|
True
|
Loading…
Reference in New Issue