diff --git a/.travis.yml b/.travis.yml
index f184ddf12..bdd1f5f08 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,6 @@ install:
- sudo pip install unidecode BeautifulSoup
script:
- - travis_run_flake8
- travis_run_tests
after_success:
diff --git a/account_banking/account_banking.py b/account_banking/account_banking.py
index 67113d4b6..2b9f13742 100644
--- a/account_banking/account_banking.py
+++ b/account_banking/account_banking.py
@@ -66,7 +66,6 @@ from openerp.osv import orm, fields
from openerp.osv.osv import except_osv
from openerp.tools.translate import _
from openerp import netsvc
-from openerp.addons.decimal_precision import decimal_precision as dp
class account_banking_account_settings(orm.Model):
@@ -504,7 +503,6 @@ class account_bank_statement_line(orm.Model):
1. Extra links to account.period and res.partner.bank for tracing and
matching.
2. Extra 'trans' field to carry the transaction id of the bank.
- 3. Readonly states for most fields except when in draft.
'''
_inherit = 'account.bank.statement.line'
_description = 'Bank Transaction'
@@ -548,57 +546,31 @@ class account_bank_statement_line(orm.Model):
_columns = {
# Redefines. Todo: refactor away to view attrs
- 'amount': fields.float(
- 'Amount',
- readonly=True,
- digits_compute=dp.get_precision('Account'),
- states={'draft': [('readonly', False)]},
- ),
- 'ref': fields.char(
- 'Ref.',
- size=32,
- readonly=True,
- states={'draft': [('readonly', False)]},
- ),
+ # Only name left because of required False. Is this needed?
'name': fields.char(
'Name',
size=64,
required=False,
- readonly=True,
- states={'draft': [('readonly', False)]},
- ),
- 'date': fields.date(
- 'Date',
- required=True,
- readonly=True,
- states={'draft': [('readonly', False)]},
),
# New columns
'trans': fields.char(
'Bank Transaction ID',
size=15,
required=False,
- readonly=True,
- states={'draft': [('readonly', False)]},
),
'partner_bank_id': fields.many2one(
'res.partner.bank',
'Bank Account',
required=False,
- readonly=True,
- states={'draft': [('readonly', False)]},
),
'period_id': fields.many2one(
'account.period',
'Period',
- required=True,
- states={'confirmed': [('readonly', True)]},
),
'currency': fields.many2one(
'res.currency',
'Currency',
required=True,
- states={'confirmed': [('readonly', True)]},
),
'reconcile_id': fields.many2one(
'account.move.reconcile',
diff --git a/account_banking/account_banking_view.xml b/account_banking/account_banking_view.xml
index cb0a8a1b3..5c819ca8d 100644
--- a/account_banking/account_banking_view.xml
+++ b/account_banking/account_banking_view.xml
@@ -195,7 +195,6 @@
account.bank.statement.form.banking-1
account.bank.statement
-
@@ -278,6 +277,37 @@
+
+
+ {'readonly': [('state','!=','draft'),]}
+
+
+ {'readonly': [('state','!=','draft'),]}
+
+
+ {'readonly': [('state','!=','draft'),]}
+
+
+ {'readonly': [('state','!=','draft'),]}
+
+
+ {'readonly': [('state','!=','draft'),]}
+
@@ -295,9 +325,18 @@
-
-
-
+
+
+
-
+
-
-
-
+
+
+