[IMP]hr dashboard and fix problem of creating timesheet lines (user is employee + partner manager + sales manager)

bzr revid: pja@tinyerp.com-20121009115928-t7cnt9pox8hy2cs6
This commit is contained in:
Jalpesh Patel (OpenERP) 2012-10-09 17:29:28 +05:30
parent 602dc1c38d
commit 4b88980282
2 changed files with 12 additions and 8 deletions

View File

@ -6,12 +6,13 @@
<field name="name">applicants.status.tree</field>
<field name="model">hr.applicant</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('open','pending','done','cancel');" string="Applicants Status">
<tree string="Applicants Status">
<field name="create_date"/>
<field name="job_id"/>
<field name="partner_name"/>
<field name="stage_id"/>
<field name="state" groups="base.group_no_one"/>
<field name="partner_phone"/>
<field name="user_id"/>
</tree>
</field>
</record>
@ -32,7 +33,7 @@
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="arch" type="xml">
<xpath expr="/form/board/column[1]" position="inside">
<action name="%(action_applicants_status)d" string="Applicants To be Processed"/>
<action name="%(action_applicants_status)d" string="Applications to be Processed"/>
</xpath>
</field>
</record>

View File

@ -129,15 +129,18 @@ class account_analytic_line(osv.osv):
def _default_journal(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
employee = proxy.browse(cr, uid, record_ids[0], context=context)
return employee.journal_id and employee.journal_id.id or False
if record_ids:
employee = proxy.browse(cr, uid, record_ids[0], context=context)
return employee.journal_id and employee.journal_id.id or False
return False
def _default_general_account(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
employee = proxy.browse(cr, uid, record_ids[0], context=context)
if employee.product_id and employee.product_id.property_account_income:
return employee.product_id.property_account_income.id
if record_ids:
employee = proxy.browse(cr, uid, record_ids[0], context=context)
if employee.product_id and employee.product_id.property_account_income:
return employee.product_id.property_account_income.id
return False
_defaults = {