~camptocamp/banking-addons/bank-statement-reconcile-7.0-add-cancel-line-lep

« back to all changes in this revision

Viewing changes to account_statement_ext/statement.py

  • Committer: Guewen Baconnier @ Camptocamp
  • Date: 2012-06-27 07:58:32 UTC
  • Revision ID: guewen.baconnier@camptocamp.com-20120627075832-38gisr263gtobqd0
Bunch of fixes and small improvements on modules: account_statement_base_completion, account_statement_completion_voucher, account_statement_ext, account_advanced_reconcile, account_statement_base_import
  [IMP] Set a default account on a new bank statement line when manual entry
  [ADD] basic security rules on profile and completion rules
  [ADD] account_statement_completion_voucher to better adapt the views of bank statement
  [FIX] Call to the completion button
  [FIX] Auto-launch completion after import
  [FIX] inherit view
  [merge] [FIX] account_advanced_reconcile: improved view readability with less larger column
  [FIX] account_advanced_reconcile: improved view readability with less larger column
  [FIX] count of reconciliations was incorrect for partial reconciliations
(lp:c2c-financial-addons/6.1 rev 70)

Show diffs side-by-side

added added

removed removed

Lines of Context:
515
515
        periods = self.pool.get('account.period').find(cursor, user, dt=date)
516
516
        return periods and periods[0] or False
517
517
 
 
518
    def _get_default_account(self, cursor, user, context=None):
 
519
        return self.get_values_for_line(cursor, user, context = context)['account_id']
 
520
        
518
521
    _columns = {
519
522
        # Set them as required + 64 char instead of 32
520
523
        'ref': fields.char('Reference', size=64, required=True),
522
525
    }
523
526
    _defaults = {
524
527
        'period_id': _get_period,
 
528
        'account_id': _get_default_account,
525
529
    }
526
530
    
527
531
    def get_values_for_line(self, cr, uid, profile_id = False, partner_id = False, line_type = False, amount = False, context = None):