[MERGE] hr improvements in board
bzr revid: fp@tinyerp.com-20121022163949-m1yv3b7sysgu3951
This commit is contained in:
commit
bde73ca622
|
@ -6,12 +6,12 @@
|
|||
<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="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -32,7 +32,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>
|
||||
|
|
|
@ -129,14 +129,15 @@ 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)
|
||||
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)
|
||||
if not record_ids:
|
||||
raise osv.except_osv(_('Error!'), _('Please create an employee associated to this user.'))
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue