From 231c5c04c24c461c56da577c53a4c932d3993432 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 8 Feb 2010 18:17:26 +0100 Subject: [PATCH] [FIX] Unable to validate supplier invoice/refund with reference greater than 32 characters. The reference is used as reference for the move lines and the analytic account line but the reference of these objects are limited to 32 characters, raising an sql error. It also broke the workflow of the invoice. lp bug: https://launchpad.net/bugs/518914 fixed bzr revid: chs@tinyerp.com-20100208171726-3nabrcko8q8zo215 --- addons/account/account_analytic_line.py | 2 +- addons/account/account_move_line.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index a6552d490c2..c201e7e7e99 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -42,7 +42,7 @@ class account_analytic_line(osv.osv): 'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True), 'code' : fields.char('Code', size=8), 'user_id' : fields.many2one('res.users', 'User',), - 'ref': fields.char('Ref.', size=32), + 'ref': fields.char('Ref.', size=64), } _defaults = { 'date': lambda *a: time.strftime('%Y-%m-%d'), diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index a57a230f9b2..7d8e159e3d4 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -347,7 +347,7 @@ class account_move_line(osv.osv): 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2), 'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", states={'valid':[('readonly',True)]}, help="The move of this entry line.", select=2), - 'ref': fields.char('Ref.', size=32), + 'ref': fields.char('Ref.', size=64), 'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1), 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2), 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),