remove project create option from timesheet for all views

This commit is contained in:
pawan.sharma 2022-08-01 12:14:39 +05:30
parent b8ed434e47
commit 51bfc960c3
2 changed files with 11 additions and 11 deletions

View File

@ -163,7 +163,7 @@
</group>
<group>
<group>
<field name="project_id" required="1"
<field name="project_id" required="1" options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"
context="{'form_view_ref': 'project.project_project_view_form_simplified',}"/>
<field name="sub_project"
options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>
@ -229,7 +229,7 @@
<calendar string="Timesheet" date_start="start_datetime" date_stop="end_datetime" date_delay="unit_amount"
color="project_id"
form_view_id="%(hr_timesheet.hr_timesheet_line_form)d" event_open_popup="true" quick_add="False">
<field name="project_id"/>
<field name="project_id" options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>
<field name="name"/>
<field name="start_datetime" string="Start date"/>
<field name="end_datetime" string="End date"/>

View File

@ -6,12 +6,12 @@
<field name="model">project.project</field>
<field name="inherit_id" ref="sale_timesheet.project_project_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='options_active']/div" position="after">
<div name="creation_div" attrs="{'invisible': [('id', '=', False)]}">
<label for="create_date" class="oe_inline" string="Created On"/>
<field name="create_date" readonly="1" class="oe_inline"/>
</div>
</xpath>
<xpath expr="//div[@name='options_active']/div" position="after">
<div name="creation_div" attrs="{'invisible': [('id', '=', False)]}">
<label for="create_date" class="oe_inline" string="Created On"/>
<field name="create_date" readonly="1" class="oe_inline"/>
</div>
</xpath>
<xpath expr="//button[@name='action_view_timesheet']" position="replace">
<button string="Project Overview" class="oe_stat_button" type="object" name="action_view_timesheet"
icon="fa-puzzle-piece" attrs="{'invisible': [('allow_billable', '=', False)]}" invisible="1"/>
@ -263,9 +263,9 @@
<field name="binding_model_id" ref="project.model_project_task"/>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_done_task()
</field>
if records:
action = records.action_done_task()
</field>
</record>
<!-- Tags -->