[IMP] Improved code.
authorParamjit Singh Sahota <psa@tinyerp.com>
Wed, 18 Sep 2013 11:19:59 +0000 (16:49 +0530)
committerParamjit Singh Sahota <psa@tinyerp.com>
Wed, 18 Sep 2013 11:19:59 +0000 (16:49 +0530)
bzr revid: psa@tinyerp.com-20130918111959-1dzkuxv4acjys8kl

addons/account/account_bank_statement.py
addons/account/account_cash_statement.py
addons/account/static/src/css/account_move_reconciliation.css
addons/point_of_sale/point_of_sale.py

index f0f93db..f60cd2f 100644 (file)
@@ -463,11 +463,9 @@ class account_bank_statement(osv.osv):
             return {}
         res = {}
         balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context)
-        res['balance_start'] = balance_start 
         journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
-        res['company_id'] =  journal.company_id.id
         currency = journal.currency or journal.company_id.currency_id
-        res['currency']  = currency.id
+        res = {'balance_start' : balance_start, 'company_id' : journal.company_id.id, 'currency' : currency.id}
         if journal.type == 'cash':
             res['cash_control'] = journal.cash_control
         return {'value': res}
index e19fd9b..aa7ee11 100644 (file)
@@ -227,6 +227,7 @@ class account_cash_statement(osv.osv):
         journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
         if journal and (journal.type == 'cash'):
             last_pieces = None
+
             if journal.with_last_closing_balance == True:
                 domain = [('journal_id', '=', journal.id),
                           ('state', '=', 'confirm')]
@@ -244,7 +245,6 @@ class account_cash_statement(osv.osv):
                     'pieces' : value.pieces
                 }
                 details_ids.append([0, False, nested_values])
-                
         return details_ids
 
     def create(self, cr, uid, vals, context=None):
@@ -268,6 +268,7 @@ class account_cash_statement(osv.osv):
 
         @return: True on success, False otherwise
         """
+
         cashbox_pool = self.pool.get('account.cashbox.line')
         if vals.get('journal_id', False):
             cashbox_ids = cashbox_pool.search(cr, uid, [('bank_statement_id', 'in', ids)], context=context)
index a69c7a7..2b40722 100644 (file)
@@ -16,4 +16,4 @@
 .openerp .oe_account_reconciliation>div>div {
     display: table-cell;
     width: 50%:
-}
+}
\ No newline at end of file
index f0e4d1a..b176ee5 100644 (file)
@@ -222,7 +222,7 @@ class pos_session(osv.osv):
         'state' : fields.selection(POS_SESSION_STATE, 'Status',
                 required=True, readonly=True,
                 select=1),
-        
+
         'cash_control' : fields.function(_compute_cash_all,
                                          multi='cash',
                                          type='boolean', string='Has Cash Control'),