[MERGE] merge from trunk addons
bzr revid: mra@mra-laptop-20101007095626-ucoa0c2bh64lg1yy
This commit is contained in:
commit
f99dc7b6f2
|
@ -1603,6 +1603,7 @@ class account_invoice_tax(osv.osv):
|
|||
tax_grouped[key]['tax_amount'] += val['tax_amount']
|
||||
|
||||
for t in tax_grouped.values():
|
||||
t['base'] = cur_obj.round(cr, uid, cur, t['base'])
|
||||
t['amount'] = cur_obj.round(cr, uid, cur, t['amount'])
|
||||
t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount'])
|
||||
t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount'])
|
||||
|
|
|
@ -111,8 +111,9 @@ class sale_order_line(osv.osv):
|
|||
sale_line = self.browse(cr, uid, ids[0], context)
|
||||
inv_line_obj = self.pool.get('account.invoice.line')
|
||||
anal_def_obj = self.pool.get('account.analytic.default')
|
||||
|
||||
for line in inv_line_obj.browse(cr, uid, create_ids, context):
|
||||
rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, sale_line.order_id.user_id.id, time.strftime('%Y-%m-%d'), context)
|
||||
|
||||
if rec:
|
||||
inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context)
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_analytic_default_form" model="ir.actions.act_window">
|
||||
<record id="action_analytic_default_list" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Defaults</field>
|
||||
<field name="res_model">account.analytic.default</field>
|
||||
<field name="view_type">form</field>
|
||||
|
@ -69,6 +69,11 @@
|
|||
context="{'search_default_account_id': [active_id]}"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
action="action_analytic_default_list"
|
||||
id="menu_analytic_default_list"
|
||||
parent="account.menu_analytic_accounting"/>
|
||||
|
||||
|
||||
<act_window
|
||||
name="Analytic Rules"
|
||||
|
|
|
@ -82,7 +82,7 @@ class report_custom(report_rml):
|
|||
for att in attendances:
|
||||
dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
|
||||
if att['action'] == 'sign_out':
|
||||
week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + (dt - ldt).hours
|
||||
week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + ((dt - ldt).seconds/3600)
|
||||
ldt = dt
|
||||
|
||||
# Week xml representation
|
||||
|
|
Loading…
Reference in New Issue