diff options
| author | uco (OpenERP) <uco@tinyerp.com> | 2010-12-06 18:41:02 +0530 |
|---|---|---|
| committer | uco (OpenERP) <uco@tinyerp.com> | 2010-12-06 18:41:02 +0530 |
| commit | b1cf433ecc01a58c8abe27fdf9dbaba2deedf7f5 (patch) | |
| tree | 7d4b2df75b76c3529854cf98c401ad59370ce00a /addons/account_sequence/account_sequence.py | |
| parent | eb04af83f31615e220a1b5e9639e799eb88242d6 (diff) | |
| parent | 5350ab0c1930e6573ee52bd430bb1d0f5adea2a3 (diff) | |
[MERGE]: Merged with trunk-addons.
bzr revid: uco@tinyerp.com-20101206131102-z2xzz8eshkswo00q
Diffstat (limited to 'addons/account_sequence/account_sequence.py')
| -rw-r--r-- | addons/account_sequence/account_sequence.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/addons/account_sequence/account_sequence.py b/addons/account_sequence/account_sequence.py index e658e61c4af..3c45604b726 100644 --- a/addons/account_sequence/account_sequence.py +++ b/addons/account_sequence/account_sequence.py @@ -34,11 +34,11 @@ class account_move(osv.osv): obj_sequence = self.pool.get('ir.sequence') res = super(account_move, self).post(cr, uid, ids, context=context) seq_no = False - for line in self.browse(cr, uid, ids, context=context): - if line.journal_id.internal_sequence: - seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=context) + for move in self.browse(cr, uid, ids, context): + if move.journal_id.internal_sequence_id: + seq_no = obj_sequence.get_id(cr, uid, move.journal_id.internal_sequence_id.id, context=context) if seq_no: - self.write(cr, uid, [line.id], {'internal_sequence_number': seq_no}) + self.write(cr, uid, [move.id], {'internal_sequence_number': seq_no}) return res account_move() @@ -47,7 +47,7 @@ class account_journal(osv.osv): _inherit = "account.journal" _columns = { - 'internal_sequence': fields.many2one('ir.sequence', 'Internal Sequence'), + 'internal_sequence_id': fields.many2one('ir.sequence', 'Internal Sequence', help="This sequence will be used to maintain the internal number for the journal entries related to this journal."), } account_journal() @@ -58,5 +58,7 @@ class account_move_line(osv.osv): _columns = { 'internal_sequence_number': fields.related('move_id','internal_sequence_number', type='char', relation='account.move', help='Internal Sequence Number', string='Internal Number'), } + account_move_line() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
