[MERGE] merge from dev3
bzr revid: ara@tinyerp.com-20110131093421-sl5ywmsnn6a5sihr
This commit is contained in:
@@ -301,10 +301,11 @@ class account_account(osv.osv):
|
||||
for fn in field_names:
|
||||
sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0)
|
||||
for child in current.child_id:
|
||||
if child.company_id.currency_id.id == current.company_id.currency_id.id:
|
||||
sums[current.id][fn] += sums[child.id][fn]
|
||||
else:
|
||||
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
|
||||
if sums.get(child.id, False):
|
||||
if child.company_id.currency_id.id == current.company_id.currency_id.id:
|
||||
sums[current.id][fn] += sums[child.id][fn]
|
||||
else:
|
||||
sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context)
|
||||
res = {}
|
||||
null_result = dict((fn, 0.0) for fn in field_names)
|
||||
for id in ids:
|
||||
|
||||
@@ -24,6 +24,7 @@ import time
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import decimal_precision as dp
|
||||
|
||||
def _employee_get(obj, cr, uid, context=None):
|
||||
if context is None:
|
||||
@@ -225,8 +226,8 @@ class hr_expense_line(osv.osv):
|
||||
'name': fields.char('Expense Note', size=128, required=True),
|
||||
'date_value': fields.date('Date', required=True),
|
||||
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
|
||||
'total_amount': fields.function(_amount, method=True, string='Total'),
|
||||
'unit_amount': fields.float('Unit Price'),
|
||||
'total_amount': fields.function(_amount, method=True, string='Total', digits_compute=dp.get_precision('Account')),
|
||||
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Account')),
|
||||
'unit_quantity': fields.float('Quantities' ),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
|
||||
'uom_id': fields.many2one('product.uom', 'UoM' ),
|
||||
|
||||
@@ -111,7 +111,7 @@ class hr_holidays(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Description', required=True, size=64),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
|
||||
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
|
||||
'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
|
||||
If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'),
|
||||
@@ -290,7 +290,7 @@ class hr_holidays(osv.osv):
|
||||
for record in self.browse(cr, uid, ids):
|
||||
# Delete the meeting
|
||||
if record.case_id:
|
||||
obj_crm_meeting.unlink(cr, uid, [record.case_id])
|
||||
obj_crm_meeting.unlink(cr, uid, [int(record.case_id)])
|
||||
|
||||
# If a category that created several holidays, cancel all related
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
|
||||
Reference in New Issue
Block a user