diff --git a/dunning.py b/dunning.py index 606b2d1a13..3673f4fa00 100644 --- a/dunning.py +++ b/dunning.py @@ -2,7 +2,7 @@ # this repository contains the full copyright notices and license terms. from collections import defaultdict -from trytond.model import ModelView, ModelSQL, fields, Unique +from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields, Unique from trytond.pool import PoolMeta, Pool from trytond.pyson import Eval from trytond.transaction import Transaction @@ -10,11 +10,10 @@ from trytond.transaction import Transaction __all__ = ['Fee', 'Level', 'Dunning', 'FeeDunningLevel', 'Letter'] -class Fee(ModelSQL, ModelView): +class Fee(DeactivableMixin, ModelSQL, ModelView): 'Account Dunning Fee' __name__ = 'account.dunning.fee' name = fields.Char('Name', required=True, translate=True) - active = fields.Boolean('Active', select=True) product = fields.Many2One('product.product', 'Product', required=True, domain=[ ('type', '=', 'service'), @@ -33,10 +32,6 @@ class Fee(ModelSQL, ModelView): }, depends=['compute_method']) - @classmethod - def default_active(cls): - return True - def get_amount(self, dunning): 'Return fee amount and currency' amount, currency = None, None diff --git a/view/dunning_fee_list.xml b/view/dunning_fee_list.xml index 91adf68798..a51d29d639 100644 --- a/view/dunning_fee_list.xml +++ b/view/dunning_fee_list.xml @@ -6,5 +6,4 @@ this repository contains the full copyright notices and license terms. --> -