[IMP]hr_timesheet:journal_id

bzr revid: pna@tinyerp.com-20120912123554-08yyv9xnm47qukcd
This commit is contained in:
Pinakin Nayi (OpenERP)
2012-09-12 18:05:54 +05:30
parent e0d09060e5
commit 651b5c2cdc
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -141,7 +141,10 @@ class hr_analytic_timesheet(osv.osv):
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.journal_id:
return emp.journal_id.id
return False
else :
raise osv.except_osv(_('Warning!'), _('No \'Analytic Journal\' is defined for this employee. \nDefine an employee for the selected user and assign an \'Analytic Journal\'!'))
if not emp_id :
raise osv.except_osv(_('Warning!'), _('Please create an employee for this user, using the menu: Human Resources > Employees.'))
_defaults = {
+1 -1
View File
@@ -9,7 +9,7 @@
<tree editable="bottom" string="Timesheet Lines">
<field name="date" on_change="on_change_date(date)"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
<field name="journal_id"/>
<field name="journal_id" invisible="1"/>
<field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
@@ -108,7 +108,7 @@
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
<field name="to_invoice" widget="selection"/>
<field name="journal_id"/>
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field invisible="1" name="amount"/>