~openerp-dev/openobject-addons/acct_prj_hr_logs

« back to all changes in this revision

Viewing changes to analytic_journal_billing_rate/analytic_journal_billing_rate.py

  • Committer: pap(openerp)
  • Date: 2010-06-21 05:19:03 UTC
  • mfrom: (3638.1.26 trunk-dev-addons3)
  • Revision ID: pap@tinyerp.co.in-20100621051903-lm0gpjuehqakpntg
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    _name="analytic_journal_rate_grid"
28
28
    _description= "Relation table between journals and billing rates"
29
29
    _columns={
30
 
        'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal',required=True,),
31
 
        'account_id': fields.many2one("account.analytic.account", "Analytic Account",required=True,),
 
30
        'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True,),
 
31
        'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
32
32
        'rate_id': fields.many2one("hr_timesheet_invoice.factor", "Invoicing Rate",),
33
33
        }
34
34
 
67
67
            #get the old values from super and add the value from the new relation analytic_journal_rate_grid
68
68
            r = self.pool.get('analytic_journal_rate_grid').browse(cr, uid, temp)[0]
69
69
            res.setdefault('value',{})
70
 
            res['value']= super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids,account_id,user_id, unit_amount)['value']
 
70
            res['value']= super(hr_analytic_timesheet, self).on_change_account_id(cr, uid, ids, account_id, user_id, unit_amount)['value']
71
71
            if r.rate_id.id:
72
72
                res['value']['to_invoice'] = r.rate_id.id
73
73
    
74
74
        return res
75
75
 
76
76
 
77
 
    def on_change_journal_id(self, cr, uid, ids,journal_id, account_id):
 
77
    def on_change_journal_id(self, cr, uid, ids, journal_id, account_id):
78
78
        res = {}
79
79
        if not (journal_id and account_id):
80
80
            return res