[FIX]hr_timesheet: prevent quick creation and record opening for account fields
The quick creation and account record opening in the sheets are not useful. Besides, restricted users (simple employees) have no read access on account.account. opw:626989
This commit is contained in:
committed by
Goffin Simon
parent
d8eb9dd347
commit
8e5a0ac43c
@@ -78,8 +78,10 @@
|
||||
<field name="priority" eval="19"/>
|
||||
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='timesheet_ids']/form/field[@name='account_id']" position="replace">
|
||||
<field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" context="{'default_use_timesheets': 1}"/>
|
||||
<xpath expr="//field[@name='timesheet_ids']/form/field[@name='account_id']" position="attributes">
|
||||
<attribute name="domain">[('type','=','normal'),('state', '<>', 'close')]</attribute>
|
||||
<attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
|
||||
<attribute name="context">{'default_use_timesheets': 1}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -90,8 +92,9 @@
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='account_id']" position="replace">
|
||||
<field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" />
|
||||
<xpath expr="//field[@name='account_id']" position="attributes">
|
||||
<attribute name="domain">[('type','=','normal'),('state', '<>', 'close')]</attribute>
|
||||
<attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -112,8 +115,9 @@
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/tree/field[@name='account_id']" position="replace">
|
||||
<field name="account_id" domain="[('type','=','normal'),('state', '<>', 'close')]" on_change="on_change_account_id(account_id, user_id, unit_amount)" />
|
||||
<xpath expr="/tree/field[@name='account_id']" position="attributes">
|
||||
<attribute name="domain">[('type','=','normal'),('state', '<>', 'close')]</attribute>
|
||||
<attribute name="on_change">on_change_account_id(account_id, user_id, unit_amount)</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user