[IMP]delivery,hr_timesheet,hr_holidays:Improvement is Done

bzr revid: mma@tinyerp.com-20110606055814-xa0t1idnl6zuyxy0
This commit is contained in:
mayur maheshwari (Open ERP)
2011-06-06 11:28:14 +05:30
parent 85cc4c3922
commit 185a3bf824
4 changed files with 4 additions and 6 deletions
-1
View File
@@ -237,7 +237,6 @@ class delivery_grid_line(osv.osv):
'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
'list_price': fields.float('Sale Price', required=True),
'standard_price': fields.float('Cost Price', required=True),
'country_id': fields.many2one('res.country', 'Country'),
}
_defaults = {
'type': lambda *args: 'weight',
+2 -3
View File
@@ -351,9 +351,8 @@ class hr_employee(osv.osv):
def _get_remaining_days(self, cr, uid, ids, name, args, context=None):
type_obj = self.pool.get('hr.holidays.status')
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
len_s=len(status_ids)
if len_s != 1 :
raise osv.except_osv(('Warning !'),_("You should have only one leave type without allowing override limit. %s Found !") % (len_s))
if len(status_ids) != 1 :
raise osv.except_osv(('Warning !'),_("You should have only one leave type without allowing override limit. %s Found !") % (len(status_ids)))
cr.execute("SELECT sum(h.number_of_days_temp) as days, h.employee_id from hr_holidays h join hr_holidays_status s on (s.id=h.holiday_status_id) where h.type='add' and h.state='validate' and s.limit=False group by h.employee_id")
res = cr.dictfetchall()
remaining = {}
+1 -1
View File
@@ -7,7 +7,7 @@
<field name="standard_price">30.0</field>
<field name="uom_id" ref="product.uom_hour"/>
<field name="uom_po_id" ref="product.uom_hour"/>
<field name="name">consultant</field>
<field name="name">Consultant</field>
<field name="categ_id" ref="product.cat0"/>
<field name="type">service</field>
<field eval="False" name="purchase_ok"/>
@@ -8,7 +8,7 @@
<field name="arch" type="xml">
<form string="Employee Invoice Data">
<field colspan="4" name="emp_ids" nolabel="1" mode="tree,form">
<tree string="Employee Invoice Data" editable="top">
<tree string="Employee Invoice Data" editable="bottom">
<field name="employee_id"/>
<field name="product_id"/>
<field name="journal_id"/>