Browse Source

[IMP] mis_builder: code cosmetics

pull/86/head
Stéphane Bidoul 10 years ago
parent
commit
44499e620d
  1. 8
      mis_builder/models/aep.py
  2. 2
      mis_builder/report/mis_builder_xls.py
  3. 2
      mis_builder/static/src/css/custom.css
  4. 2
      mis_builder/static/src/js/mis_builder.js
  5. 2
      mis_builder/static/src/xml/mis_widget.xml
  6. 2
      mis_builder/tests/__init__.py
  7. 2
      mis_builder/wizard/mis_builder_dashboard.py

8
mis_builder/models/aep.py

@ -101,7 +101,7 @@ class AccountingExpressionProcessor(object):
else:
self._account_ids_by_code[like_code].add(account.id)
def _parse_mo(self, mo):
def _parse_match_object(self, mo):
"""Split a match object corresponding to an accounting variable
Returns field, mode, [account codes], [domain expression].
@ -130,7 +130,7 @@ class AccountingExpressionProcessor(object):
so when all expressions have been parsed, we know what to query.
"""
for mo in self.ACC_RE.finditer(expr):
_, mode, account_codes, domain = self._parse_mo(mo)
_, mode, account_codes, domain = self._parse_match_object(mo)
key = (domain, mode)
if account_codes:
self._map_account_ids[key].update(account_codes)
@ -157,7 +157,7 @@ class AccountingExpressionProcessor(object):
"""
aml_domains = []
for mo in self.ACC_RE.finditer(expr):
field, mode, account_codes, domain = self._parse_mo(mo)
field, mode, account_codes, domain = self._parse_match_object(mo)
if mode == MODE_INITIAL:
continue
aml_domain = list(domain)
@ -269,7 +269,7 @@ class AccountingExpressionProcessor(object):
This method must be executed after do_queries().
"""
def f(mo):
field, mode, account_codes, domain = self._parse_mo(mo)
field, mode, account_codes, domain = self._parse_match_object(mo)
key = (domain, mode)
account_ids_data = self._data[key]
v = 0.0

2
mis_builder/report/mis_builder_xls.py

@ -137,5 +137,3 @@ class mis_builder_xls(report_xls):
mis_builder_xls('report.mis.report.instance.xls',
'mis.report.instance',
parser=mis_builder_xls_parser)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

2
mis_builder/static/src/css/custom.css

@ -10,4 +10,4 @@
.openerp .mis_builder a:hover {
/* underline links on hover to give a visual cue */
text-decoration: underline;
}
}

2
mis_builder/static/src/js/mis_builder.js

@ -45,4 +45,4 @@ openerp.mis_builder = function(instance) {
});
instance.web.form.custom_widgets.add('mis_report', 'instance.mis_builder.MisReport');
}
}

2
mis_builder/static/src/xml/mis_widget.xml

@ -55,4 +55,4 @@
</tfoot>
</table>
</t>
</template>
</template>

2
mis_builder/tests/__init__.py

@ -30,5 +30,3 @@ fast_suite = [
checks = [
test_mis_builder,
]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

2
mis_builder/wizard/mis_builder_dashboard.py

@ -85,5 +85,3 @@ class add_mis_report_instance_dashboard(orm.TransientModel):
'arch': etree.tostring(new_arch, pretty_print=True)})
return {'type': 'ir.actions.act_window_close', }
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Loading…
Cancel
Save