{'reconcile_id': rec.id }
)
return True
+
def name_get(self, cr, uid, ids, context=None):
- result = {}
+ if not len(ids):
+ return []
+ result = []
for r in self.browse(cr, uid, ids, context):
total = reduce(lambda y,t: (t.debit or 0.0) - (t.credit or 0.0) + y, r.line_partial_ids, 0.0)
if total:
- result[r.id] = '%s (%.2f)' % (r.name, total)
+ name = '%s (%.2f)' % (r.name, total)
+ result.append((r.id,name))
else:
- result[r.id] = r.name
+ result.append((r.id,r.name))
return result
+
+
account_move_reconcile()
#----------------------------------------------------------
}
def install_account_chart(self, cr, uid,ids, context=None):
- for res in self.read(cr,uid,ids):
+ for res in self.read(cr,uid,ids):
id = res['charts']
def install(id):
mod_obj = self.pool.get('ir.module.module')
'target':'new',
}
-
+
account_config_wizard()
'res_model': 'ir.module.module.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
- }
-
+ }
+
wizard_multi_charts_accounts()
if raise_ex:
raise osv.except_osv(_('Wrong Accounting Entry!'), _('Both Credit and Debit cannot be zero!'))
-
+ account_obj = self.pool.get('account.account')
if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!'))
if update_check: