[IMP]Improved code to set use_timesheets default true and added action for menu Timesheets Accounts
bzr revid: cod@tinyerp.com-20131223100035-us5sljbq2iyq9shs
This commit is contained in:
parent
f794a8c7af
commit
03176d176b
|
@ -206,6 +206,9 @@ class account_analytic_account(osv.osv):
|
|||
_columns = {
|
||||
'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"),
|
||||
}
|
||||
_defaults = {
|
||||
'use_timesheets': True
|
||||
}
|
||||
|
||||
def on_change_template(self, cr, uid, ids, template_id, context=None):
|
||||
res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context)
|
||||
|
|
|
@ -125,8 +125,17 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_hr_timesheet_accounts_form" model="ir.actions.act_window">
|
||||
<field name="name">Timesheet Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('use_timesheets','=', True)]</field>
|
||||
</record>
|
||||
|
||||
<menuitem parent="hr.menu_hr_configuration" id="menu_timesheet_accounts" name="Timesheets Accounts" action="account.action_account_analytic_account_form" sequence="7"/>
|
||||
<menuitem parent="hr.menu_hr_configuration" id="menu_timesheet_accounts" name="Timesheets Accounts" action="act_hr_timesheet_accounts_form" sequence="7" groups="base.group_hr_manager"/>
|
||||
|
||||
<record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
|
||||
<field name="name">Timesheet Activities</field>
|
||||
|
|
Loading…
Reference in New Issue