[FIX] account_budget : Unable to filter Budget Lines
lp bug: https://launchpad.net/bugs/880797 fixed bzr revid: mdi@tinyerp.com-20111102045908-81xz6ugsu3ruf21n
This commit is contained in:
parent
3d22bb8b55
commit
3e00750c88
|
@ -111,7 +111,7 @@ class crossovered_budget_lines(osv.osv):
|
|||
def _prac_amt(self, cr, uid, ids, context=None):
|
||||
res = {}
|
||||
result = 0.0
|
||||
if context is None:
|
||||
if context is None:
|
||||
context = {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
acc_ids = [x.id for x in line.general_budget_id.account_ids]
|
||||
|
@ -141,7 +141,7 @@ class crossovered_budget_lines(osv.osv):
|
|||
|
||||
def _theo_amt(self, cr, uid, ids, context=None):
|
||||
res = {}
|
||||
if context is None:
|
||||
if context is None:
|
||||
context = {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
today = datetime.datetime.today()
|
||||
|
@ -196,7 +196,7 @@ class crossovered_budget_lines(osv.osv):
|
|||
'date_to': fields.date('End Date', required=True),
|
||||
'paid_date': fields.date('Paid Date'),
|
||||
'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
|
||||
'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
|
||||
'practical_amount':fields.function(_prac, string='Practical Amount', type='float', store=True, digits_compute=dp.get_precision('Account')),
|
||||
'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),
|
||||
'percentage':fields.function(_perc, string='Percentage', type='float'),
|
||||
'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
|
||||
|
|
|
@ -205,6 +205,7 @@
|
|||
<tree string="Budget Lines">
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
|
|
Loading…
Reference in New Issue