Start and end time removed in xml file

This commit is contained in:
projectsodoo 2021-03-08 19:45:15 +05:30
parent a4813e9e31
commit ae75220b88
2 changed files with 2 additions and 9 deletions

View File

@ -16,6 +16,8 @@ class AccountAnalyticLine(models.Model):
#start_time = fields.Float(string='Start Time', digits=(16, 2))
#end_time = fields.Float(string='End Time', digits=(16, 2))
start_datetime = fields.Datetime("Start Time", required=True)
end_datetime = fields.Datetime("End Time", required=True)
unit_amount = fields.Float('Duration', default=0.0)
parent_project = fields.Many2one('project.project', related='project_id.parent_project', string='Parent Project')
@ -26,9 +28,6 @@ class AccountAnalyticLine(models.Model):
def _default_end_datetime(self):
return fields.Datetime.to_string(datetime.combine(fields.Datetime.now(), datetime.max.time()))
start_datetime = fields.Datetime("Start Time", required=True)
end_datetime = fields.Datetime("End Time", required=True)
# @api.onchange('project_id')
# def _onchange_parent_project_id(self):

View File

@ -21,8 +21,6 @@
<field name="inherit_id" ref="hr_timesheet.view_task_form2_inherited"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='timesheet_ids']//tree//field[@name='name']" position="after">
<field name="start_time" widget="float_time" invisible="1"/>
<field name="end_time" widget="float_time" invisible="1"/>
<field name="start_datetime" string="Start date"/>
<field name="end_datetime" string="End date"/>
</xpath>
@ -73,8 +71,6 @@
widget="task_with_hours" context="{'default_project_id': project_id}"
domain="[('project_id', '=', project_id)]"/>
<field name="name" optional="show" required="0"/>
<field name="start_time" widget="float_time" invisible="1"/><!--custom-->
<field name="end_time" widget="float_time" invisible="1"/><!--custom-->
<field name="start_datetime" string="Start Time"/><!--custom-->
<field name="end_datetime" string="End Time"/><!--custom-->
<field name="unit_amount" optional="show" widget="timesheet_uom" sum="Total"
@ -171,8 +167,6 @@
<group>
<!--<field name="amount"/>-->
<field name="amount" invisible="1"/>
<field name="start_time" widget="float_time" invisible="1"/><!--custom-->
<field name="end_time" widget="float_time" invisible="1"/><!--custom-->
<field name="start_datetime" string="Start Time"/><!--custom-->
<field name="end_datetime" string="End Time"/><!--custom-->
<field name="unit_amount" widget="timesheet_uom" decoration-danger="unit_amount &gt; 24"/>