~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to account_journal/account_journal.py

UF-359 [MERGE] Merge UF_360_funding_pools branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        
120
120
        # if the journal can be linked to a register, the register is also created
121
121
        if vals['type'] in ('cash','bank','cheque'):
 
122
            # 'from_journal_creation' in context permits to pass register creation that have a
 
123
            #  'prev_reg_id' mandatory field. This is because this register is the first register from this journal.
 
124
            context.update({'from_journal_creation': True})
122
125
            self.pool.get('account.bank.statement') \
123
126
                .create(cr, uid, {'journal_id': journal_obj,
124
127
                                  'name': "REG1" + vals['code'],