From 5ddacf00b4665cf008fed85ed286c22562c826cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Nov 2018 09:57:17 +0100 Subject: [PATCH] Add history on payment term line delta And use correct file names per class. issue7866 review58421002 --- CHANGELOG | 2 ++ __init__.py | 17 +++++++++-------- invoice.py => account.py | 0 payment_term.py => account_invoice.py | 7 +++++-- 4 files changed, 16 insertions(+), 10 deletions(-) rename invoice.py => account.py (100%) rename payment_term.py => account_invoice.py (75%) diff --git a/CHANGELOG b/CHANGELOG index 844a0d1b0c..5f1284a71c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Add history on payment term line delta + Version 5.0.0 - 2018-10-01 * Bug fixes (see mercurial logs for details) * Remove support for Python 2.7 diff --git a/__init__.py b/__init__.py index 5da4c27629..1f54d851e5 100644 --- a/__init__.py +++ b/__init__.py @@ -2,16 +2,17 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from .party import * -from .payment_term import * -from .invoice import * +from . import party +from . import account +from . import account_invoice def register(): Pool.register( - Party, - Address, - PaymentTerm, - PaymentTermLine, - Invoice, + party.Party, + party.Address, + account.Invoice, + account_invoice.PaymentTerm, + account_invoice.PaymentTermLine, + account_invoice.PaymentTermLineRelativeDelta, module='account_invoice_history', type_='model') diff --git a/invoice.py b/account.py similarity index 100% rename from invoice.py rename to account.py diff --git a/payment_term.py b/account_invoice.py similarity index 75% rename from payment_term.py rename to account_invoice.py index b2d3200be2..b028ba2956 100644 --- a/payment_term.py +++ b/account_invoice.py @@ -2,8 +2,6 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import PoolMeta -__all__ = ['PaymentTerm', 'PaymentTermLine'] - class PaymentTerm(metaclass=PoolMeta): __name__ = 'account.invoice.payment_term' @@ -13,3 +11,8 @@ class PaymentTerm(metaclass=PoolMeta): class PaymentTermLine(metaclass=PoolMeta): __name__ = 'account.invoice.payment_term.line' _history = True + + +class PaymentTermLineRelativeDelta(metaclass=PoolMeta): + __name__ = 'account.invoice.payment_term.line.delta' + _history = True