diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 2117f6e49ea..f0a420f7496 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -39,7 +39,6 @@ class account_analytic_line(osv.osv): } _defaults = { - 'date': fields.date.context_today, 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c), } _order = 'date desc' diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 16393f0ea49..b01fc974bef 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -865,8 +865,11 @@ class account_invoice(osv.osv): self.check_tax_lines(cr, uid, inv, compute_taxes, ait_obj) # I disabled the check_total feature - #if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0): - # raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.')) + group_check_total_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'group_supplier_inv_check_total')[1] + group_check_total = self.pool.get('res.groups').browse(cr, uid, group_check_total_id, context=context) + if group_check_total and uid in [x.id for x in group_check_total.users]: + if (inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0)): + raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe encoded total does not match the computed total.')) if inv.payment_term: total_fixed = total_percent = 0 diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 5ed373456f3..2f722d07aeb 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -186,6 +186,7 @@ + @@ -279,8 +280,8 @@
- +
@@ -436,8 +437,8 @@
- +
diff --git a/addons/account/project/wizard/account_analytic_journal_report_view.xml b/addons/account/project/wizard/account_analytic_journal_report_view.xml index b0cb0293270..6d632016ba1 100644 --- a/addons/account/project/wizard/account_analytic_journal_report_view.xml +++ b/addons/account/project/wizard/account_analytic_journal_report_view.xml @@ -10,7 +10,7 @@ - +