summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@openerp.com>2012-10-10 21:29:27 +0200
committerFabien Pinckaers <fp@openerp.com>2012-10-10 21:29:27 +0200
commit5c4348f7fe97c14bf45f2ad120d4b6fbfdf720ce (patch)
tree161a1eeda7c6ad871de9648d4fbbf61a2bee71b3
parent98adf3f87ad10e8630686141dc7f20b20d7ea68e (diff)
parentf147dfe7cc82b7c39235916cce83cc19fb27381a (diff)
[FIX] HR useability improvements
bzr revid: fp@openerp.com-20121010192927-6ud5e3zvhp5gabip
-rw-r--r--addons/hr/hr_view.xml13
-rw-r--r--addons/hr_expense/security/ir.model.access.csv1
-rw-r--r--addons/hr_holidays/hr_holidays_view.xml26
-rw-r--r--addons/hr_recruitment/hr_recruitment_view.xml4
-rw-r--r--addons/hr_timesheet_invoice/hr_timesheet_invoice.py2
-rw-r--r--addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py2
6 files changed, 37 insertions, 11 deletions
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index b8020d0b2df..361bb581b14 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -334,13 +334,10 @@
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header>
<sheet>
- <label for="name" class="oe_edit_only"/>
- <h1>
- <field name="name" class="oe_inline"/>
- <label class="oe_inline" string="(" attrs="{'invisible': [('department_id', '=', False)]}"/>
- <field name="department_id" class="oe_inline"/>
- <label class="oe_inline" string=")" attrs="{'invisible': [('department_id', '=', False)]}"/>
- </h1>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
+ <h1><field name="name" class="oe_inline"/></h1>
+ </div>
<group>
<group>
<field name="no_of_employee" groups="base.group_user"/>
@@ -349,7 +346,7 @@
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
- </group>
+ <field name="department_id"/> </group>
</group>
<div>
<label for="description"/>
diff --git a/addons/hr_expense/security/ir.model.access.csv b/addons/hr_expense/security/ir.model.access.csv
index 0455302319e..092424ef7e6 100644
--- a/addons/hr_expense/security/ir.model.access.csv
+++ b/addons/hr_expense/security/ir.model.access.csv
@@ -9,6 +9,7 @@ access_product_template_hr_expense_user,product.template.hr.expense.user,product
access_product_uom_hr_expense_user,product.uom.hr.expense.user,product.model_product_uom,base.group_hr_user,1,1,1,1
access_product_price_type_user,product.price.type.user,product.model_product_price_type,base.group_hr_user,1,1,1,1
access_account_journal_user,account.journal.user,account.model_account_journal,base.group_hr_user,1,1,1,1
+access_account_journal_employee,account.journal.employee,account.model_account_journal,base.group_user,1,0,0,0
access_account_invoice_user,account.invoice.user,account.model_account_invoice,base.group_hr_user,1,1,1,1
access_account_invoice_line_user,account.invoice.line.user,account.model_account_invoice_line,base.group_hr_user,1,1,1,1
access_account_analytic_journal_user,account.ianalytic.journal.user,account.model_account_analytic_journal,base.group_hr_user,1,1,1,1
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index ae85b03fcaf..6e3c9b2d083 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -353,6 +353,32 @@
<menuitem name="My Allocation Requests" parent="menu_open_ask_holidays" id="menu_open_allocation_holidays" action="open_allocation_holidays"/>
+ <record model="ir.actions.act_window" id="request_approve_allocation">
+ <field name="name">Allocation Requests to Approve</field>
+ <field name="res_model">hr.holidays</field>
+ <field name="view_type">form</field>
+ <field name="context">{'default_type': 'add', 'search_default_approve':1}</field>
+ <field name="domain">[('type','=','add')]</field>
+ <field name="view_id" ref="allocation_leave_new"/>
+ <field name="search_view_id" ref="view_hr_holidays_filter"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_request_approve_allocation_tree">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_holiday_allocation_tree"/>
+ <field name="act_window_id" ref="request_approve_allocation"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="action_request_approve_allocation_form">
+ <field name="sequence" eval="2"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="allocation_leave_new"/>
+ <field name="act_window_id" ref="request_approve_allocation"/>
+ </record>
+
+ <menuitem parent="menu_open_ask_holidays" id="menu_request_approve_allocation" action="request_approve_allocation" groups="base.group_hr_manager"/>
+
<record model="ir.actions.act_window" id="open_company_allocation">
<field name="name">Leaves Summary</field>
<field name="res_model">hr.holidays</field>
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index d48086f5663..11143201895 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -342,8 +342,8 @@
attrs="{'invisible':[('survey_id','=',False)]}"/>
</div>
</field>
- <xpath expr="/form/sheet/h1" version="7.0" position="after">
- <div colspan="4" attrs="{'invisible': [('alias_domain', '=', False)]}">
+ <xpath expr="//div[@class='oe_title']" version="7.0" position="after">
+ <div attrs="{'invisible': [('alias_domain', '=', False)]}">
<field name="alias_id" invisible="1" required="0"/>
<label for="alias_name" class="oe_edit_only"/>
<field name="alias_name" nolabel="1" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" nolabel="1" class="oe_inline"/>
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index b9574b553d1..ab76f2b0f64 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -135,6 +135,8 @@ class account_analytic_line(osv.osv):
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.'))
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
diff --git a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
index 3bd495036d5..2af8792472e 100644
--- a/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
+++ b/addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py
@@ -35,7 +35,7 @@ class hr_timesheet_current_open(osv.osv_memory):
user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
if not len(user_ids):
- raise osv.except_osv(_('Error!'), _('Please define employee for your user!'))
+ raise osv.except_osv(_('Error!'), _('Please create an employee and associate it with this user.'))
ids = ts.search(cr, uid, [('user_id','=',uid),('state','=','draft'),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context)
if len(ids) > 1: