bzr revid: fp@tinyerp.com-20080819214926-jhjchub2iow3h30b
This commit is contained in:
Fabien Pinckaers 2008-08-19 23:49:26 +02:00
parent df8de89042
commit ba082a347d
2 changed files with 25 additions and 14 deletions

View File

@ -177,20 +177,21 @@ class account_account(osv.osv):
}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
query = self.pool.get('account.move.line')._query_get(cr, uid,
context=context)
cr.execute(("SELECT l.account_id, " +\
' , '.join(map(lambda x: mapping[x], field_names)) +
"FROM " \
"account_move_line l " \
"WHERE " \
"l.account_id IN (%s) " \
"AND " + query + " " \
"GROUP BY l.account_id") % (acc_set, ))
accounts = {}
for res in cr.fetchall():
accounts[res[0]] = res[1:]
if ids2:
query = self.pool.get('account.move.line')._query_get(cr, uid,
context=context)
cr.execute(("SELECT l.account_id, " +\
' , '.join(map(lambda x: mapping[x], field_names)) +
"FROM " \
"account_move_line l " \
"WHERE " \
"l.account_id IN (%s) " \
"AND " + query + " " \
"GROUP BY l.account_id") % (acc_set, ))
for res in cr.fetchall():
accounts[res[0]] = res[1:]
res = {}
for id in ids:

View File

@ -60,9 +60,19 @@
</record>
<menuitem action="act_hr_timesheet_line_me_all_form" id="menu_act_hr_timesheet_line_me_all_form" parent="hr_timesheet.menu_act_hr_timesheet_line_today_form"/>
<record id="act_hr_timesheet_line_evry1_today_form_my" model="ir.actions.act_window">
<field name="name">My Working Hours of The Day</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.analytic.timesheet</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('date', '=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem action="act_hr_timesheet_line_evry1_today_form_my" id="menu_act_hr_timesheet_line_evry1_today_form_my" parent="menu_act_hr_timesheet_line_me_all_form"/>
<record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
<field name="name">Workin Hours</field>
<field name="name">Working Hours</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.analytic.timesheet</field>
<field name="view_type">form</field>