~vauxoo/addons-vauxoo/7.0-pylint-luist

« back to all changes in this revision

Viewing changes to hr_expense_replenishment/model/hr_expense.py

  • Committer: Moises Lopez
  • Date: 2014-09-30 16:10:27 UTC
  • mfrom: (1138.1.1 70-addons-vauxoo)
  • Revision ID: moylop260@vauxoo.com-20140930161027-dzvea4rbefm0ko7g
[MERGE] [FIX] Fix unused variable with autoflake and pylint

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    _inherit = "hr.expense.expense"
33
33
    
34
34
    def expense_canceled(self, cr, uid, ids, context=None):
35
 
        obj_move_line = self.pool.get('account.move.line')
36
35
        obj_move = self.pool.get('account.move')
37
36
        obj_move_rec = self.pool.get('account.move.reconcile')
38
37
        
312
311
    def order_payments(self, cr, uid, ids, aml_ids, context=None):
313
312
        """ orders the payments lines by partner id. Recive only one id"""
314
313
        context = context or {}
315
 
        aml_obj = self.pool.get('account.move.line')
316
314
        exp = self.browse(cr, uid, ids, context=context)
317
315
        order_partner = list(set(
318
316
            [(payment.partner_id.name, payment.partner_id.id, payment.id)
353
351
                 for brw in exp.account_move_id.line_id
354
352
                 if brw.credit > 0.0]
355
353
            if not exp_credit:
356
 
                empty_aml_ids = [brw.id for brw in exp.account_move_id.line_id]
 
354
                [brw.id for brw in exp.account_move_id.line_id]
357
355
                # Really!!!
358
356
                #aml_obj.unlink(cr, uid, empty_aml_ids, context=context)
359
357
 
466
464
        invoice can be really __nasty__ 
467
465
        """
468
466
        context = context or {}
469
 
        res = {}
470
 
        aml_obj = self.pool.get('account.move.line')
471
467
        ids = isinstance(ids, (int, long)) and [ids] or ids
472
468
        exp = self.browse(cr, uid, ids[0], context=context)
473
469
 
475
471
        exp_ids = d['exp']
476
472
 
477
473
        sum_adv = d['debit']
478
 
        sum_exp = d['exp_sum']
 
474
        d['exp_sum']
479
475
        sum_inv = d['inv_sum']
480
 
        partial_rec = []
481
 
        full_rec = []
482
476
 
483
477
        ld = sum_adv - d['credit'] # Remaining Advance
484
478
        ld and self.expense_debit_lines(cr, uid, exp.id,exp.account_move_id.id,
498
492
        invoice can be really __nasty__ 
499
493
        """
500
494
        context = context or {}
501
 
        res = {}
502
 
        aml_obj = self.pool.get('account.move.line')
503
495
        ids = isinstance(ids, (int, long)) and [ids] or ids
504
496
        exp = self.browse(cr, uid, ids[0], context=context)
505
497
 
673
665
        @param adjust_balance_to: indicates who is greater credit or debit.
674
666
        """
675
667
        context = context or {}
676
 
        aml_obj = self.pool.get('account.move.line')
677
668
 
678
669
        ids = isinstance(ids, (int, long)) and [ids] or ids
679
670
        for exp in self.browse(cr, uid, ids, context=context):