trytond_account_dunning_letter-5.0.2/ 0000755 0001750 0001750 00000000000 13450736537 017363 5 ustar ced ced 0000000 0000000 trytond_account_dunning_letter-5.0.2/CHANGELOG 0000644 0001750 0001750 00000001745 13450736536 020603 0 ustar ced ced 0000000 0000000 Version 5.0.2 - 2019-04-02
* Bug fixes (see mercurial logs for details)
Version 5.0.1 - 2019-02-19
* Bug fixes (see mercurial logs for details)
Version 5.0.0 - 2018-10-01
* Bug fixes (see mercurial logs for details)
* Remove support for Python 2.7
Version 4.8.0 - 2018-04-23
* Bug fixes (see mercurial logs for details)
Version 4.6.0 - 2017-10-30
* Bug fixes (see mercurial logs for details)
Version 4.4.0 - 2017-05-01
* Bug fixes (see mercurial logs for details)
Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Add Python3 support
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
* Add support for PyPy
Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
Version 3.0.0 - 2013-10-21
* Initial release
trytond_account_dunning_letter-5.0.2/dunning.py 0000644 0001750 0001750 00000012326 13443272073 021373 0 ustar ced ced 0000000 0000000 # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from operator import attrgetter
from itertools import groupby, chain
from trytond.model import fields
from trytond.pool import PoolMeta
from trytond.wizard import StateReport
from trytond.modules.company import CompanyReport
from trytond.pool import Pool
from trytond.transaction import Transaction
from trytond.tools import grouped_slice
__all__ = ['Level', 'ProcessDunning', 'Letter']
class Level(metaclass=PoolMeta):
__name__ = 'account.dunning.level'
print_on_letter = fields.Boolean('Print on Letter')
class ProcessDunning(metaclass=PoolMeta):
__name__ = 'account.dunning.process'
print_letter = StateReport('account.dunning.letter')
@classmethod
def __setup__(cls):
super(ProcessDunning, cls).__setup__()
cls._actions.append('print_letter')
def do_print_letter(self, action):
pool = Pool()
Dunning = pool.get('account.dunning')
dunnings = Dunning.browse(Transaction().context['active_ids'])
ids = [d.id for d in dunnings
if d.state == 'waiting'
and not d.blocked
and d.party
and d.level.print_on_letter]
if ids:
return action, {
'id': ids[0],
'ids': ids,
}
def transition_print_letter(self):
return self.next_state('print_letter')
class Letter(CompanyReport, metaclass=PoolMeta):
__name__ = 'account.dunning.letter'
@classmethod
def execute(cls, ids, data):
with Transaction().set_context(address_with_party=True):
return super(Letter, cls).execute(ids, data)
@classmethod
def get_context(cls, records, data):
report_context = super(Letter, cls).get_context(records, data)
pool = Pool()
Date = pool.get('ir.date')
dunnings = [d for d in records
if d.state == 'waiting'
and not d.blocked
and d.party]
parties = list(set((d.party for d in dunnings)))
payments = cls.get_pending_payments(parties)
key = attrgetter('party')
dunnings.sort(key=key)
dunnings = groupby(dunnings, key)
PartyLetter = cls.get_party_letter()
letters = {}
for party, current_dunnings in dunnings:
current_dunnings = list(current_dunnings)
dunning_amount = sum((d.amount for d in current_dunnings))
current_payments = list(payments.get(party, []))
payment_amount = sum((l.credit - l.debit
for l in current_payments))
if dunning_amount <= payment_amount:
continue
letters[party] = PartyLetter(dunnings=current_dunnings,
payments=current_payments)
report_context['letters'] = letters
report_context['today'] = Date.today()
report_context['get_payment_amount'] = cls.get_payment_amount
report_context['get_payment_currency'] = cls.get_payment_currency
return report_context
@staticmethod
def get_party_letter():
class PartyLetter(object, metaclass=PoolMeta):
def __init__(self, dunnings, payments):
self.dunnings = dunnings
self.payments = payments
@property
def fees(self):
return {}
def highest_levels(self):
'Yield each procedure and the highest level'
key = attrgetter('procedure')
dunnings = sorted(self.dunnings, key=key)
for procedure, dunnings in groupby(dunnings, key):
i = 0
for dunning in dunnings:
i = max(i, procedure.levels.index(dunning.level))
yield procedure, procedure.levels[i]
return PartyLetter
@staticmethod
def get_pending_payments(parties):
"""
Return a dictionary with party as key and the list of pending payments
as value.
"""
pool = Pool()
Line = pool.get('account.move.line')
payments = []
for sub_parties in grouped_slice(parties):
payments.append(Line.search([
('account.kind', '=', 'receivable'),
['OR',
('debit', '<', 0),
('credit', '>', 0),
],
('party', 'in', [p.id for p in sub_parties]),
('reconciliation', '=', None),
],
order=[('party', 'ASC'), ('id', 'ASC')]))
payments = list(chain(*payments))
return dict((party, list(payments))
for party, payments in groupby(payments, attrgetter('party')))
@staticmethod
def get_payment_amount(payment):
if payment.amount_second_currency:
return -payment.amount_second_currency
else:
return payment.credit - payment.debit
@staticmethod
def get_payment_currency(payment):
if payment.second_currency:
return payment.second_currency
else:
return payment.account.company.currency
trytond_account_dunning_letter-5.0.2/COPYRIGHT 0000644 0001750 0001750 00000001257 13450736536 020662 0 ustar ced ced 0000000 0000000 Copyright (C) 2013-2019 Cédric Krier.
Copyright (C) 2013-2019 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
trytond_account_dunning_letter-5.0.2/setup.cfg 0000644 0001750 0001750 00000000046 13450736537 021204 0 ustar ced ced 0000000 0000000 [egg_info]
tag_build =
tag_date = 0
trytond_account_dunning_letter-5.0.2/PKG-INFO 0000644 0001750 0001750 00000005316 13450736537 020465 0 ustar ced ced 0000000 0000000 Metadata-Version: 1.2
Name: trytond_account_dunning_letter
Version: 5.0.2
Summary: Tryton module for account dunning letter
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker@tryton.org
License: GPL-3
Download-URL: http://downloads.tryton.org/5.0/
Description: trytond_account_dunning_letter
==============================
The account_dunning_letter module of the Tryton application platform.
Installing
----------
See INSTALL
Support
-------
If you encounter any problems with Tryton, please don't hesitate to ask
questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
http://bugs.tryton.org/
http://groups.tryton.org/
http://wiki.tryton.org/
irc://irc.freenode.net/tryton
License
-------
See LICENSE
Copyright
---------
See COPYRIGHT
For more information please visit the Tryton web site:
http://www.tryton.org/
Keywords: tryton account dunning letter
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Italian
Classifier: Natural Language :: Persian
Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.4
trytond_account_dunning_letter-5.0.2/README 0000644 0001750 0001750 00000001121 13354423124 020222 0 ustar ced ced 0000000 0000000 trytond_account_dunning_letter
==============================
The account_dunning_letter module of the Tryton application platform.
Installing
----------
See INSTALL
Support
-------
If you encounter any problems with Tryton, please don't hesitate to ask
questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
http://bugs.tryton.org/
http://groups.tryton.org/
http://wiki.tryton.org/
irc://irc.freenode.net/tryton
License
-------
See LICENSE
Copyright
---------
See COPYRIGHT
For more information please visit the Tryton web site:
http://www.tryton.org/
trytond_account_dunning_letter-5.0.2/locale/ 0000755 0001750 0001750 00000000000 13450736537 020622 5 ustar ced ced 0000000 0000000 trytond_account_dunning_letter-5.0.2/locale/es.po 0000644 0001750 0001750 00000002071 13354423124 021555 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Imprimir en una carta"
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Carta de reclamación"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Importe"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Fecha"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Fecha:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Descripción"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Fecha vencimiento"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Gastos:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Pagos pendientes recibidos"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Referencia"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Aviso recordatorio"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/cs.po 0000644 0001750 0001750 00000001562 13354423124 021557 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/de.po 0000644 0001750 0001750 00000002047 13354423124 021541 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Auf Mahnschreiben drucken"
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Mahnschreiben"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Betrag"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Datum"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Datum:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Beschreibung"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Fälligkeitsdatum"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Gebühren:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Erhaltene Zahlungen"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Beleg-Nr."
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Erinnerung"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/sl.po 0000644 0001750 0001750 00000001722 13354423124 021566 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Na izpisu"
#, fuzzy
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Znesek"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Datum"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Datum:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Opis"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Zapadlost"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Stroški izterjave:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Dosedanja plačila"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Sklic"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Opomin"
trytond_account_dunning_letter-5.0.2/locale/lt.po 0000644 0001750 0001750 00000001562 13354423124 021571 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/it_IT.po 0000644 0001750 0001750 00000001754 13354423124 022165 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Stampare su lettera"
#, fuzzy
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Importo"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Data"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Data"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Descrizione"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Scadenza"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Spese"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Pagamenti parziali ricevuti"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Riferimento"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Avviso promemoria"
trytond_account_dunning_letter-5.0.2/locale/ja_JP.po 0000644 0001750 0001750 00000001562 13354423124 022135 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/fa.po 0000644 0001750 0001750 00000002051 13354423124 021532 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "چاپ نامه"
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "نامه دانینگ"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "مقدار"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "تاریخ"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "تاریخ :"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "شرح"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "تاریخ تحویل"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "هزینه ها:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "پرداخت های دریافت شده در انتظار"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "مرجع"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "متن یادآوری"
trytond_account_dunning_letter-5.0.2/locale/bg.po 0000644 0001750 0001750 00000002115 13354423124 021535 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Сума"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Дата"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Дата:"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Описание"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Дата на изпълнение"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Препратка"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/hu_HU.po 0000644 0001750 0001750 00000001752 13354423124 022163 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Dátum"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Dátum:"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Leírás"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/es_419.po 0000644 0001750 0001750 00000001570 13354423124 022155 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Fecha de vencimiento"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/nl.po 0000644 0001750 0001750 00000001714 13354423124 021562 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Bedrag"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Vervaldatum"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Datum:"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Specificatie"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Referentie"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/pt_BR.po 0000644 0001750 0001750 00000002057 13354423124 022160 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Imprimir na Carta"
#, fuzzy
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Montante"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Data"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Data:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Descrição"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Data de vencimento"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Taxas"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Pagamentos pendentes recebidos"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Referência"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Lembrete"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/zh_CN.po 0000644 0001750 0001750 00000001653 13354423124 022154 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "日期格式"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "日期格式"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "描述"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/fr.po 0000644 0001750 0001750 00000002055 13354423124 021557 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Imprimer lettre"
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Lettre de relance"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Montant"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Date"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Date :"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Description"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Date d'échéance"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Frais :"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Paiements en attente reçus"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Référence"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Avis de rappel"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/pl.po 0000644 0001750 0001750 00000001577 13354423124 021573 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Data"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Data:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Opis"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
trytond_account_dunning_letter-5.0.2/locale/lo.po 0000644 0001750 0001750 00000002454 13354423124 021565 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "ພິມໃສ່ຈົດໝາຍ"
#, fuzzy
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "ມູນຄ່າ"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "ວັນທີ"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "ວັນທີ:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "ເນື້ອໃນລາຍການ"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "ວັນທີຕ້ອງຈ່າຍ"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "ຄ່າທຳນຽມ:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "ຈຳນວນເງິນຄ້າງຊໍາລະທີ່ໄດ້ຮັບ"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "ເອກະສານອ້າງອີງ"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "ໜັງສືແຈ້ງເຕືອນ"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "ວິນາທີ"
trytond_account_dunning_letter-5.0.2/locale/ca.po 0000644 0001750 0001750 00000002063 13354423124 021532 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr "Imprimeix en una carta"
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Carta de reclamació"
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Import"
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Data"
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Data:"
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Descripció"
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Data venciment"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr "Despeses:"
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr "Pagaments pendents rebuts"
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Referència"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr "Avís recordatori"
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "s"
trytond_account_dunning_letter-5.0.2/locale/ru.po 0000644 0001750 0001750 00000002073 13354423124 021576 0 ustar ced ced 0000000 0000000 #
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.dunning.level,print_on_letter:"
msgid "Print on Letter"
msgstr ""
msgctxt "model:ir.action,name:report_letter"
msgid "Dunning Letter"
msgstr "Dunning Letter"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Amount"
msgstr "Сумма"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date"
msgstr "Дата"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Date:"
msgstr "Дата:"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Description"
msgstr "Описание"
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Due Date"
msgstr "Срок сдачи"
msgctxt "report:account.dunning.letter:"
msgid "Fees:"
msgstr ""
msgctxt "report:account.dunning.letter:"
msgid "Pending Payments Received"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "Reference"
msgstr "Ссылка"
msgctxt "report:account.dunning.letter:"
msgid "Reminder Notice"
msgstr ""
#, fuzzy
msgctxt "report:account.dunning.letter:"
msgid "s"
msgstr "с"
trytond_account_dunning_letter-5.0.2/view/ 0000755 0001750 0001750 00000000000 13450736537 020335 5 ustar ced ced 0000000 0000000 trytond_account_dunning_letter-5.0.2/view/dunning_level_list.xml 0000644 0001750 0001750 00000000460 13354423124 024727 0 ustar ced ced 0000000 0000000
trytond_account_dunning_letter-5.0.2/view/dunning_level_form.xml 0000644 0001750 0001750 00000000530 13354423124 024715 0 ustar ced ced 0000000 0000000
trytond_account_dunning_letter-5.0.2/tests/ 0000755 0001750 0001750 00000000000 13450736537 020525 5 ustar ced ced 0000000 0000000 trytond_account_dunning_letter-5.0.2/tests/scenario_account_dunning_letter.rst 0000644 0001750 0001750 00000013042 13443272073 027667 0 ustar ced ced 0000000 0000000 ========================
Account Dunning Scenario
========================
Imports::
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
>>> from proteus import config, Model, Wizard
>>> from trytond.tests.tools import activate_modules, set_user
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts
>>> today = datetime.date.today()
Install account_dunning_letter::
>>> config = activate_modules('account_dunning_letter')
Create company::
>>> _ = create_company()
>>> company = get_company()
Reload the context::
>>> User = Model.get('res.user')
>>> Group = Model.get('res.group')
>>> config._context = User.get_preferences(True, config.context)
Create account admin user::
>>> account_admin_user = User()
>>> account_admin_user.name = 'Account Admin'
>>> account_admin_user.login = 'account_admin'
>>> account_admin_group, = Group.find([
... ('name', '=', 'Account Administration'),
... ])
>>> account_admin_user.groups.append(account_admin_group)
>>> account_admin_user.save()
Create account user::
>>> account_user = User()
>>> account_user.name = 'Account'
>>> account_user.login = 'account'
>>> account_group, = Group.find([
... ('name', '=', 'Account'),
... ])
>>> account_user.groups.append(account_group)
>>> account_user.save()
Create dunning user::
>>> dunning_user = User()
>>> dunning_user.name = 'Dunning'
>>> dunning_user.login = 'dunning'
>>> dunning_group, = Group.find([('name', '=', 'Dunning')])
>>> dunning_user.groups.append(dunning_group)
>>> dunning_user.save()
Create fiscal year::
>>> fiscalyear = create_fiscalyear(company)
>>> fiscalyear.click('create_period')
>>> period = fiscalyear.periods[0]
Create chart of accounts::
>>> _ = create_chart(company)
>>> accounts = get_accounts(company)
>>> receivable = accounts['receivable']
>>> revenue = accounts['revenue']
>>> cash = accounts['cash']
Create dunning procedure::
>>> set_user(account_admin_user)
>>> Procedure = Model.get('account.dunning.procedure')
>>> procedure = Procedure(name='Procedure')
>>> level = procedure.levels.new()
>>> level.sequence = 1
>>> level.overdue = datetime.timedelta(5)
>>> level.print_on_letter = True
>>> procedure.save()
Create parties::
>>> Party = Model.get('party.party')
>>> customer = Party(name='Customer')
>>> customer.dunning_procedure = procedure
>>> customer.save()
Create some moves::
>>> set_user(account_user)
>>> Journal = Model.get('account.journal')
>>> Move = Model.get('account.move')
>>> journal_revenue, = Journal.find([
... ('code', '=', 'REV'),
... ])
>>> journal_cash, = Journal.find([
... ('code', '=', 'CASH'),
... ])
Create reconciled moves::
>>> move = Move()
>>> move.period = period
>>> move.journal = journal_revenue
>>> move.date = period.start_date
>>> line = move.lines.new()
>>> line.account = revenue
>>> line.credit = Decimal(100)
>>> line = move.lines.new()
>>> line.account = receivable
>>> line.debit = Decimal(100)
>>> line.party = customer
>>> line.maturity_date = period.start_date
>>> move.save()
>>> reconcile1, = [l for l in move.lines if l.account == receivable]
>>> move = Move()
>>> move.period = period
>>> move.journal = journal_cash
>>> move.date = period.start_date
>>> line = move.lines.new()
>>> line.account = cash
>>> line.debit = Decimal(100)
>>> line = move.lines.new()
>>> line.account = receivable
>>> line.credit = Decimal(100)
>>> line.party = customer
>>> move.save()
>>> reconcile2, = [l for l in move.lines if l.account == receivable]
>>> reconcile_lines = Wizard('account.move.reconcile_lines',
... [reconcile1, reconcile2])
Create due move of 100::
>>> move = Move()
>>> move.period = period
>>> move.journal = journal_revenue
>>> move.date = period.start_date
>>> line = move.lines.new()
>>> line.account = revenue
>>> line.credit = Decimal(100)
>>> line = move.lines.new()
>>> line.account = receivable
>>> line.debit = Decimal(100)
>>> line.party = customer
>>> line.maturity_date = period.start_date
>>> move.save()
>>> dunning_line, = [l for l in move.lines if l.account == receivable]
Add partial payment of 50::
>>> move = Move()
>>> move.period = period
>>> move.journal = journal_cash
>>> move.date = period.start_date
>>> line = move.lines.new()
>>> line.account = cash
>>> line.debit = Decimal(50)
>>> line = move.lines.new()
>>> line.account = receivable
>>> line.credit = Decimal(50)
>>> line.party = customer
>>> move.save()
Create dunnings::
>>> set_user(dunning_user)
>>> Dunning = Model.get('account.dunning')
>>> create_dunning = Wizard('account.dunning.create')
>>> create_dunning.form.date = period.start_date + relativedelta(days=5)
>>> create_dunning.execute('create_')
>>> dunning, = Dunning.find([])
Process dunning::
>>> process_dunning = Wizard('account.dunning.process',
... [dunning])
>>> process_dunning.execute('process')
>>> dunning.reload()
>>> dunning.state
'waiting'
>>> (_, _, _, _), = process_dunning.actions
trytond_account_dunning_letter-5.0.2/tests/__init__.py 0000644 0001750 0001750 00000000521 13354423124 022620 0 ustar ced ced 0000000 0000000 # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
try:
from trytond.modules.account_dunning_letter.tests.test_account_dunning_letter import suite
except ImportError:
from .test_account_dunning_letter import suite
__all__ = ['suite']
trytond_account_dunning_letter-5.0.2/tests/test_account_dunning_letter.py 0000644 0001750 0001750 00000001556 13354423124 026666 0 ustar ced ced 0000000 0000000 # This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import unittest
import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_teardown, doctest_checker
class AccountDunningLetterTestCase(ModuleTestCase):
'Test AccountDunningLetter module'
module = 'account_dunning_letter'
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountDunningLetterTestCase))
suite.addTests(doctest.DocFileSuite('scenario_account_dunning_letter.rst',
tearDown=doctest_teardown, encoding='utf-8',
checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
trytond_account_dunning_letter-5.0.2/tox.ini 0000644 0001750 0001750 00000001141 13422706540 020661 0 ustar ced ced 0000000 0000000 [tox]
envlist = {py34,py35,py36,py37}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
{py34,py35,py36,py37}-postgresql: psycopg2 >= 2.5
pypy3-postgresql: psycopg2cffi >= 2.5
{py34,py35,py36}-sqlite: sqlitebck
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
trytond_account_dunning_letter-5.0.2/letter.fodt 0000644 0001750 0001750 00000160065 13354423124 021534 0 ustar ced ced 0000000 0000000
2013-07-18T15:37:14LibreOffice/5.4.5.1$Linux_X86_64 LibreOffice_project/40m0$Build-1P0D1
0
0
54700
27571
true
false
view2
40880
5313
0
0
54698
27570
0
0
false
100
false
false
false
true
true
true
0
true
true
false
false
false
false
false
false
false
false
false
false
false
false
true
true
false
false
true
false
true
false
false
false
false
false
true
false
false
false
false
false
false
true
4108509
false
true
false
false
true
true
false
true
0
false
true
high-resolution
false
false
false
true
true
true
true
false
false
true
false
false
false
false
false
1085211
false
1
true
false
false
0
false
false
false
<if test="company.header">
<for each="line in company.header.split('\n')">
<line>
</for>
</if>
<company.rec_name>
<if test="company.footer">
<for each="line in company.footer.split('\n')">
<line>
</for>
</if>
<for each="party, letter in letters.items()">
<replace text:p="set_lang(party.lang)">
<if test="party.addresses">
<for each="line in party.address_get().full_address.splitlines()">
<line>
</for>
</if>
Reminder Notice
Date: <format_date(today, party.lang)>
<if test="letter.fees">
Fees: <', '.join(format_currency(amount, party.lang, cur) for cur, amount in letter.fees.iteritems())>
</if>
Description
Reference
Date
Amount
Due Date
<for each="dunning in letter.dunnings">
<dunning.line.description if dunning.line else ''>
<dunning.line.origin.rec_name if dunning.line and dunning.line.origin else ''>
<format_date(dunning.line.date, party.lang) if dunning.line else ''>
<format_currency(dunning.amount_second_currency, party.lang, dunning.second_currency) if dunning.amount_second_currency else ''>
<format_date(dunning.maturity_date, party.lang) if dunning.maturity_date else ''>
</for>
<if test="letter.payments">
Pending Payments Received
Date
Amount
<for each="payment in letter.payments">
<format_date(payment.date, party.lang)>
<format_currency(get_payment_amount(payment), party.lang, get_payment_currency(payment))>
</for>
</if>
</for>