[MERGE] forward port branch 8.0 up to ff30928786
This commit is contained in:
-10
@@ -1121,13 +1121,3 @@ source_lang = en
|
||||
file_filter = addons/website_twitter/i18n/<lang>.po
|
||||
source_file = addons/website_twitter/i18n/website_twitter.pot
|
||||
source_lang = en
|
||||
|
||||
[odoo-9.web_tests]
|
||||
file_filter = addons/web_tests/i18n/<lang>.po
|
||||
source_file = addons/web_tests/i18n/web_tests.pot
|
||||
source_lang = en
|
||||
|
||||
[odoo-9.web_tests_demo]
|
||||
file_filter = addons/web_tests_demo/i18n/<lang>.po
|
||||
source_file = addons/web_tests_demo/i18n/web_tests_demo.pot
|
||||
source_lang = en
|
||||
|
||||
@@ -78,11 +78,16 @@ class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
'perc':0.00,
|
||||
'date_from': budget_name[0].date_from,
|
||||
'date_to': budget_name[0].date_to,
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids), ('crossovered_budget_id','=',budget_ids[i][0])])
|
||||
domain_lines = [('id', 'in', b_line_ids),
|
||||
('crossovered_budget_id', '=', budget_ids[i][0]),
|
||||
('date_from', '<=', d_to),
|
||||
('date_to', '>=', d_from)]
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, domain_lines)
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0
|
||||
|
||||
|
||||
@@ -84,8 +84,11 @@ class budget_report(report_sxw.rml_parse):
|
||||
'perc': 0.00
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0])])
|
||||
domain_lines = [('id', 'in', budget_ids),
|
||||
('analytic_account_id','=',an_ids[i][0]),
|
||||
('date_from', '<=', d_to),
|
||||
('date_to', '>=', d_from)]
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, domain_lines)
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0.00
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
<th class="text-right">Planned Amt</th>
|
||||
<th class="text-right">Practical Amt</th>
|
||||
<th class="text-right">Perc(%)</th>
|
||||
<th class="text-right">Start date</th>
|
||||
<th class="text-right">End Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -42,6 +44,8 @@
|
||||
<td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['perc'], digits=2)"/> %</td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line.get('date_from') or '', date=True)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line.get('date_to') or '', date=True)"/></td>
|
||||
</tr>
|
||||
<tr t-if="line['status'] != 1">
|
||||
<td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
|
||||
|
||||
+8
-8
@@ -3215,9 +3215,6 @@ class BaseModel(object):
|
||||
# fetch the records of this model without field_name in their cache
|
||||
records = self._in_cache_without(field)
|
||||
|
||||
if len(records) > PREFETCH_MAX:
|
||||
records = records[:PREFETCH_MAX] | self
|
||||
|
||||
# determine which fields can be prefetched
|
||||
if not self.env.in_onchange and \
|
||||
self._context.get('prefetch_fields', True) and \
|
||||
@@ -5677,16 +5674,19 @@ class BaseModel(object):
|
||||
return RecordCache(self)
|
||||
|
||||
@api.model
|
||||
def _in_cache_without(self, field):
|
||||
""" Make sure ``self`` is present in cache (for prefetching), and return
|
||||
the records of model ``self`` in cache that have no value for ``field``
|
||||
(:class:`Field` instance).
|
||||
def _in_cache_without(self, field, limit=PREFETCH_MAX):
|
||||
""" Return records to prefetch that have no value in cache for ``field``
|
||||
(:class:`Field` instance), including ``self``.
|
||||
Return at most ``limit`` records.
|
||||
"""
|
||||
env = self.env
|
||||
prefetch_ids = env.prefetch[self._name]
|
||||
prefetch_ids.update(self._ids)
|
||||
ids = filter(None, prefetch_ids - set(env.cache[field]))
|
||||
return self.browse(ids)
|
||||
recs = self.browse(ids)
|
||||
if limit and len(recs) > limit:
|
||||
recs = self + (recs - self)[:(limit - len(self))]
|
||||
return recs
|
||||
|
||||
@api.model
|
||||
def refresh(self):
|
||||
|
||||
Reference in New Issue
Block a user