remove project create option in timesheet and remove 24 hr validation in timesheet

This commit is contained in:
pawan.sharma 2022-07-28 17:59:32 +05:30
parent f58f272445
commit 314c775c58
2 changed files with 3 additions and 3 deletions

View File

@ -254,8 +254,8 @@ class AccountAnalyticLine(models.Model):
value._onchange_start_end_date_time()
if value.unit_amount == 0.0:
raise ValidationError(_("Your can not fill 0.0 hour entry"))
if value.unit_amount >= 24.0:
raise ValidationError(_("Your can not fill more than 24.0 hour entry"))
# if value.unit_amount >= 24.0:
# raise ValidationError(_("Your can not fill more than 24.0 hour entry"))
return value
def write(self, vals):

View File

@ -66,7 +66,7 @@
<field name="date" readonly="1" invisible="1"/>
<field name="employee_id" invisible="1"/>
<!--<field name="project_ids" widget="many2many_tags"/>-->
<field name="project_id" required="1" options="{'no_create_edit': True}"
<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}"/>