diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 5ed057536a8..b9cdf7df09b 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -184,8 +184,8 @@ class account_cash_statement(osv.osv): return res _columns = { - 'company_id':fields.many2one('res.company', 'Company', required=False), - 'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'confirm': [('readonly', True)]}, domain=[('type', '=', 'cash')]), + 'company_id':fields.many2one('res.company', 'Company', required=True, states={'draft': [('readonly', False)]}, readonly=True,), + 'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True, domain=[('type', '=', 'cash')]), 'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"), 'state': fields.selection( [('draft', 'Draft'), @@ -197,7 +197,7 @@ class account_cash_statement(osv.osv): 'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"), 'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'), 'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'), - 'name': fields.char('Name', size=64, required=True, readonly=False, help='if you give the Name other then / , its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), + 'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then / , its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), 'user_id':fields.many2one('res.users', 'Responsible', required=False), } _defaults = {