openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #06131
[Merge] lp:~camptocamp/account-budgeting/7.0-fix-store-fields-mdh into lp:account-budgeting
Matthieu Dietrich @ camptocamp has proposed merging lp:~camptocamp/account-budgeting/7.0-fix-store-fields-mdh into lp:account-budgeting.
Commit message:
[FIX] fixed store condition on fields 'analytic_amount', 'analytic_real_amount' and 'analytic_diff_amount' + fixed function called by the store condition
Requested reviews:
Leonardo Pistone - camptocamp (lpistone): code review
Account Core Editors (account-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/account-budgeting/7.0-fix-store-fields-mdh/+merge/216849
The object in the store condition was the wrong one. I fixed it for the correct one + fixed the now-called function.
--
https://code.launchpad.net/~camptocamp/account-budgeting/7.0-fix-store-fields-mdh/+merge/216849
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-budgeting/7.0-fix-store-fields-mdh into lp:account-budgeting.
=== modified file 'budget/budget_line.py'
--- budget/budget_line.py 2013-12-19 09:04:42 +0000
+++ budget/budget_line.py 2014-04-23 10:09:10 +0000
@@ -120,14 +120,14 @@
# if the budget currency is already set
return context.get('currency_id', False)
- def _fetch_budget_line_from_aal(self, cr, uid, ids, name, context=None):
+ def _fetch_budget_line_from_aal(self, cr, uid, ids, context=None):
"""
return the list of budget line to which belong the analytic.account.line `ids´
"""
result = set()
budget_line_obj = self.pool.get('budget.line')
for aal in self.browse(cr, uid, ids, context=context):
- line_ids = budget_line_obj.search(cr, uid, [('analytic_account_id', '=', aal.account_id)], context=context)
+ line_ids = budget_line_obj.search(cr, uid, [('analytic_account_id', '=', aal.account_id.id], context=context)
result |= set(line_ids)
return list(result)
@@ -184,7 +184,7 @@
'date_stop',
'analytic_account_id',
'currency_id'], 10),
- 'analytic.account.line': (_fetch_budget_line_from_aal,
+ 'account.analytic.line': (_fetch_budget_line_from_aal,
['amount',
'unit_amount',
'date'], 10),
@@ -202,7 +202,7 @@
'date_stop',
'analytic_account_id',
'currency_id'], 10),
- 'analytic.account.line': (_fetch_budget_line_from_aal,
+ 'account.analytic.line': (_fetch_budget_line_from_aal,
['amount',
'unit_amount',
'date'], 10),
@@ -220,7 +220,7 @@
'date_stop',
'analytic_account_id',
'currency_id'], 10),
- 'analytic.account.line': (_fetch_budget_line_from_aal,
+ 'account.analytic.line': (_fetch_budget_line_from_aal,
['amount',
'unit_amount',
'date'], 10),
References