[FIX] Name of user in employees timesheet
bzr revid: nel@tinyerp.com-20090401142911-n0f6pil2r71dr973
This commit is contained in:
parent
61106b0fff
commit
7856ace733
|
@ -1298,7 +1298,7 @@ class account_tax(osv.osv):
|
||||||
res.append(tax)
|
res.append(tax)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _unit_compute(self, cr, uid, taxes, price_unit, address_id=None, product=None, partner=None):
|
def _unit_compute(self, cr, uid, taxes, price_unit, address_id=None, product=None, partner=None, quantity=0):
|
||||||
taxes = self._applicable(cr, uid, taxes, price_unit, address_id, product, partner)
|
taxes = self._applicable(cr, uid, taxes, price_unit, address_id, product, partner)
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
|
@ -1327,7 +1327,12 @@ class account_tax(osv.osv):
|
||||||
data['amount'] = amount
|
data['amount'] = amount
|
||||||
|
|
||||||
elif tax.type=='fixed':
|
elif tax.type=='fixed':
|
||||||
|
print "her", quantity
|
||||||
|
print "data", data
|
||||||
data['amount'] = tax.amount
|
data['amount'] = tax.amount
|
||||||
|
data['tax_amount']=quantity
|
||||||
|
print "DATA 2", data
|
||||||
|
# data['amount'] = quantity
|
||||||
elif tax.type=='code':
|
elif tax.type=='code':
|
||||||
address = address_id and self.pool.get('res.partner.address').browse(cr, uid, address_id) or None
|
address = address_id and self.pool.get('res.partner.address').browse(cr, uid, address_id) or None
|
||||||
localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
|
localdict = {'price_unit':cur_price_unit, 'address':address, 'product':product, 'partner':partner}
|
||||||
|
@ -1343,7 +1348,7 @@ class account_tax(osv.osv):
|
||||||
if tax.child_depend:
|
if tax.child_depend:
|
||||||
latest = res.pop()
|
latest = res.pop()
|
||||||
amount = amount2
|
amount = amount2
|
||||||
child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, address_id, product, partner)
|
child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, address_id, product, partner, quantity)
|
||||||
res.extend(child_tax)
|
res.extend(child_tax)
|
||||||
if tax.child_depend:
|
if tax.child_depend:
|
||||||
for r in res:
|
for r in res:
|
||||||
|
@ -1361,6 +1366,7 @@ class account_tax(osv.osv):
|
||||||
latest[name+'_code_id'] = False
|
latest[name+'_code_id'] = False
|
||||||
if tax.include_base_amount:
|
if tax.include_base_amount:
|
||||||
cur_price_unit+=amount2
|
cur_price_unit+=amount2
|
||||||
|
print "rress final", res
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
|
def compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
|
||||||
|
@ -1373,7 +1379,8 @@ class account_tax(osv.osv):
|
||||||
tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2}
|
tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2}
|
||||||
one tax for each tax id in IDS and their childs
|
one tax for each tax id in IDS and their childs
|
||||||
"""
|
"""
|
||||||
res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner)
|
res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner, quantity)
|
||||||
|
print "res",res
|
||||||
total = 0.0
|
total = 0.0
|
||||||
for r in res:
|
for r in res:
|
||||||
if r.get('balance',False):
|
if r.get('balance',False):
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<xsl:for-each select="report/employee">
|
<xsl:for-each select="report/employee">
|
||||||
<xsl:variable name="id" select="attribute::id"/>
|
<xsl:variable name="id" select="attribute::id"/>
|
||||||
<tr>
|
<tr>
|
||||||
<td t="1"><xsl:value-of select="attribute::name"/></td>
|
<td><xsl:value-of select="attribute::name"/></td>
|
||||||
<xsl:for-each select="//report/days/day">
|
<xsl:for-each select="//report/days/day">
|
||||||
<xsl:variable name="today" select="attribute::number" />
|
<xsl:variable name="today" select="attribute::number" />
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue