diff --git a/addons/account/account.py b/addons/account/account.py
index 210ae5b3157..14e5bb26e34 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1199,6 +1199,7 @@ class account_move(osv.osv):
#
# Validate a balanced move. If it is a centralised journal, create a move.
#
+
def validate(self, cr, uid, ids, context={}):
if context and ('__last_update' in context):
del context['__last_update']
@@ -1283,11 +1284,11 @@ class account_move(osv.osv):
'state': 'draft'
}, context, check=False)
ok = False
- if ok:
- list_ids = []
- for tmp in move.line_id:
- list_ids.append(tmp.id)
- self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
+ if ok:
+ list_ids = []
+ for tmp in move.line_id:
+ list_ids.append(tmp.id)
+ self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
return ok
account_move()
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index fc10c58cc8f..7394fc54b7e 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -205,7 +205,7 @@
-
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 261ec4c3c0d..13569987560 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -767,6 +767,8 @@ class account_invoice(osv.osv):
cur_obj = self.pool.get('res.currency')
context = {}
for inv in self.browse(cr, uid, ids):
+ if not inv.journal_id.invoice_sequence_id:
+ raise osv.except_osv(_('Error !'), _('Please define invoice sequence on invoice journal'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
if inv.move_id:
@@ -790,7 +792,7 @@ class account_invoice(osv.osv):
# one move line per tax line
iml += ait_obj.move_line_get(cr, uid, inv.id)
-
+
entry_type=''
if inv.type in ('in_invoice', 'in_refund'):
ref = inv.reference
@@ -922,7 +924,7 @@ class account_invoice(osv.osv):
if not number:
if obj_inv.journal_id.invoice_sequence_id:
sid = obj_inv.journal_id.invoice_sequence_id.id
- number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id=%s', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
+ number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
else:
number = self.pool.get('ir.sequence').get(cr, uid,
'account.invoice.' + invtype)
@@ -1028,7 +1030,7 @@ class account_invoice(osv.osv):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
-
+
new_ids = []
for invoice in invoices:
del invoice['id']
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
index 371963c67b6..de5c4435156 100644
--- a/addons/hr_payroll/hr_payroll_view.xml
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -486,23 +486,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -512,12 +497,6 @@
-
-
-
-
-
-