[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
This commit is contained in:
Christophe Simonis 2010-02-08 18:17:26 +01:00
parent d81dcdc8cf
commit 231c5c04c2
2 changed files with 2 additions and 2 deletions

View File

@ -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'),

View File

@ -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),