diff --git a/addons/account/account.py b/addons/account/account.py
index b52ece53130..357e616da38 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1652,7 +1652,7 @@ class account_move_reconcile(osv.osv):
'create_date': fields.date('Creation date', readonly=True),
}
_defaults = {
- 'name': lambda self,cr,uid,ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile') or '/',
+ 'name': lambda self,cr,uid,ctx=None: self.pool.get('ir.sequence').get(cr, uid, 'account.reconcile', context=ctx) or '/',
}
def reconcile_partial_check(self, cr, uid, ids, type='auto', context=None):
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index c1f787f5d80..5601179e0fc 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -341,11 +341,11 @@ class account_bank_statement(osv.osv):
if not st.name == '/':
st_number = st.name
else:
+ c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
if st.journal_id.sequence_id:
- c = {'fiscalyear_id': st.period_id.fiscalyear_id.id}
st_number = obj_seq.next_by_id(cr, uid, st.journal_id.sequence_id.id, context=c)
else:
- st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement')
+ st_number = obj_seq.next_by_code(cr, uid, 'account.bank.statement', context=c)
for line in st.move_line_ids:
if line.state <> 'valid':
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index 2768fd83019..f19c1e1c639 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -279,11 +279,11 @@ class account_cash_statement(osv.osv):
raise osv.except_osv(_('Error !'), (_('User %s does not have rights to access %s journal !') % (statement.user_id.name, statement.journal_id.name)))
if statement.name and statement.name == '/':
+ c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
if statement.journal_id.sequence_id:
- c = {'fiscalyear_id': statement.period_id.fiscalyear_id.id}
st_number = obj_seq.next_by_id(cr, uid, statement.journal_id.sequence_id.id, context=c)
else:
- st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement')
+ st_number = obj_seq.next_by_code(cr, uid, 'account.cash.statement', context=c)
vals.update({
'name': st_number
})
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 6c651405c92..f86d5f3a359 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -10,27 +10,28 @@
-
+
-
+
-
+
+
-
+
-
+
-
+