From 18aa9c545db0935c472f3d31ab64aa4db1b076e6 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 28 Sep 2016 11:53:44 +0200 Subject: [PATCH] Remove code from Fiscalyear and Period issue4241 review29551002 --- CHANGELOG | 1 + fiscalyear.py | 12 ------------ period.py | 12 ------------ view/fiscalyear_form.xml | 4 +--- view/fiscalyear_tree.xml | 1 - view/period_form.xml | 3 --- view/period_tree.xml | 1 - 7 files changed, 2 insertions(+), 32 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6495e2a4e4..03d1e0e948 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Remove code from Fiscalyear and Period * Remove journal option for updating posted moves * Replace Journal-Period name by function field * Manage readonly state on Move Line diff --git a/fiscalyear.py b/fiscalyear.py index 84c7879808..2b4989e87c 100644 --- a/fiscalyear.py +++ b/fiscalyear.py @@ -23,7 +23,6 @@ class FiscalYear(ModelSQL, ModelView): 'Fiscal Year' __name__ = 'account.fiscalyear' name = fields.Char('Name', size=None, required=True, depends=DEPENDS) - code = fields.Char('Code', size=None) start_date = fields.Date('Starting Date', required=True, states=STATES, domain=[('start_date', '<=', Eval('end_date', None))], depends=DEPENDS + ['end_date']) @@ -318,17 +317,6 @@ class FiscalYear(ModelSQL, ModelView): 'state': 'open', }) - @classmethod - def search_rec_name(cls, name, clause): - if clause[1].startswith('!') or clause[1].startswith('not '): - bool_op = 'AND' - else: - bool_op = 'OR' - return [bool_op, - ('code',) + tuple(clause[1:]), - (cls._rec_name,) + tuple(clause[1:]), - ] - class BalanceNonDeferralStart(ModelView): 'Balance Non-Deferral' diff --git a/period.py b/period.py index df5ea707c2..918a473bf0 100644 --- a/period.py +++ b/period.py @@ -20,7 +20,6 @@ class Period(ModelSQL, ModelView): 'Period' __name__ = 'account.period' name = fields.Char('Name', required=True) - code = fields.Char('Code') start_date = fields.Date('Starting Date', required=True, states=_STATES, domain=[('start_date', '<=', Eval('end_date', None))], depends=_DEPENDS + ['end_date'], select=True) @@ -324,17 +323,6 @@ class Period(ModelSQL, ModelView): def post_move_sequence_used(self): return self.post_move_sequence or self.fiscalyear.post_move_sequence - @classmethod - def search_rec_name(cls, name, clause): - if clause[1].startswith('!') or clause[1].startswith('not '): - bool_op = 'AND' - else: - bool_op = 'OR' - return [bool_op, - ('code',) + tuple(clause[1:]), - (cls._rec_name,) + tuple(clause[1:]), - ] - class ClosePeriod(Wizard): 'Close Period' diff --git a/view/fiscalyear_form.xml b/view/fiscalyear_form.xml index 02bd8b21a2..e4839af72e 100644 --- a/view/fiscalyear_form.xml +++ b/view/fiscalyear_form.xml @@ -3,9 +3,7 @@ this repository contains the full copyright notices and license terms. -->