[IMP]hr_timesheet:journal_id
bzr revid: pna@tinyerp.com-20120912123554-08yyv9xnm47qukcd
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user