[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="name">applicants.status.tree</field>
|
||||||
<field name="model">hr.applicant</field>
|
<field name="model">hr.applicant</field>
|
||||||
<field name="arch" type="xml">
|
<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="create_date"/>
|
||||||
<field name="job_id"/>
|
<field name="job_id"/>
|
||||||
<field name="partner_name"/>
|
<field name="partner_name"/>
|
||||||
<field name="stage_id"/>
|
<field name="stage_id"/>
|
||||||
<field name="state" groups="base.group_no_one"/>
|
<field name="user_id"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
<field name="inherit_id" ref="hr.board_hr_form"/>
|
<field name="inherit_id" ref="hr.board_hr_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="/form/board/column[1]" position="inside">
|
<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>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -129,14 +129,15 @@ class account_analytic_line(osv.osv):
|
||||||
def _default_journal(self, cr, uid, context=None):
|
def _default_journal(self, cr, uid, context=None):
|
||||||
proxy = self.pool.get('hr.employee')
|
proxy = self.pool.get('hr.employee')
|
||||||
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
|
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||||
|
if record_ids:
|
||||||
employee = proxy.browse(cr, uid, record_ids[0], context=context)
|
employee = proxy.browse(cr, uid, record_ids[0], context=context)
|
||||||
return employee.journal_id and employee.journal_id.id or False
|
return employee.journal_id and employee.journal_id.id or False
|
||||||
|
return False
|
||||||
|
|
||||||
def _default_general_account(self, cr, uid, context=None):
|
def _default_general_account(self, cr, uid, context=None):
|
||||||
proxy = self.pool.get('hr.employee')
|
proxy = self.pool.get('hr.employee')
|
||||||
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
|
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||||
if not record_ids:
|
if record_ids:
|
||||||
raise osv.except_osv(_('Error!'), _('Please create an employee associated to this user.'))
|
|
||||||
employee = proxy.browse(cr, uid, record_ids[0], context=context)
|
employee = proxy.browse(cr, uid, record_ids[0], context=context)
|
||||||
if employee.product_id and employee.product_id.property_account_income:
|
if employee.product_id and employee.product_id.property_account_income:
|
||||||
return employee.product_id.property_account_income.id
|
return employee.product_id.property_account_income.id
|
||||||
|
|
Loading…
Reference in New Issue