hunk.code_window:     'name': 'Just In Time Scheduling',
       'version': '1.0',
       'category': 'Warehouse',
       'description': """
   This module will automatically reserve the picking from stock when a sales order is confirmed
   ============================================================================================
   Upon confirmation of a sales order or when quantities are added,
   the picking that reserves from stock will be reserved if the
   necessary quantities are available.
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit: =============================================================================================
  
hunk.file_path: addons/procurement_jit/__manifest__.py
hunk.type: replace
file: <?xml version="1.0" encoding="utf-8"?>
  <odoo>
      <data>
          <record id="act_hr_timesheet_line_by_project" model="ir.actions.act_window">
              <field name="name">Activities</field>
              <field name="res_model">account.analytic.line</field>
              <field name="view_type">form</field>
              <field name="view_mode">tree,form</field>
              <field name="view_id" ref="hr_timesheet_line_tree"/>
              <field name="domain">[('project_id', '!=', False)]</field>
              <field name="context">{"default_project_id": active_id, "search_default_project_id": [active_id]}</field>
              <field name="search_view_id" ref="hr_timesheet_line_search"/>
              <field name="help" type="html">
                <p class="oe_view_nocontent_create">
                  Click to record activities.
                </p><p>
                  You can register and track your workings hours by project every
                  day. Every time spent on a project will become a cost and can be re-invoiced to
                  customers if required.
                </p>
              </field>
          </record>
  
          <record id="project_project_view_form_simplified_inherit_timesheet" model="ir.ui.view">
              <field name="name">project.project.view.form.simplified.inherit.timesheet</field>
              <field name="model">project.project</field>
              <field name="inherit_id" ref="project.project_project_view_form_simplified"/>
              <field name="priority">24</field>
              <field name="arch" type="xml">
                  <group name="options" position="attributes">
                      <attribute name="invisible">0</attribute>
                  </group>
                  <field name="use_tasks" position="after">
                      <field name="allow_timesheets"/>
                  </field>
              </field>
          </record>
  
          <record id="project_invoice_form" model="ir.ui.view">
              <field name="name">Inherit project form : Invoicing Data</field>
              <field name="model">project.project</field>
              <field name="inherit_id" ref="project.edit_project"/>
              <field name="priority">24</field>
              <field name="arch" type="xml">
                  <button name="toggle_active" position="before">
                      <button class="oe_stat_button" name="%(act_hr_timesheet_line_by_project)d" type="action" icon="fa-calendar" string="Timesheets" attrs="{'invisible': [('allow_timesheets', '=', False)]}"/>
                  </button>
                  <xpath expr="//div[@name='options_active']" position="inside">
                      <div>
                          <field name="allow_timesheets" class="oe_inline" string="Allow timesheets"/>
                          <label for="allow_timesheets"/>
                      </div>
                  </xpath>
              </field>
          </record>
  
          <record model="ir.ui.view" id="view_task_form2_inherited">
              <field name="name">project.task.form.inherited</field>
              <field name="model">project.task</field>
              <field name="inherit_id" ref="project.view_task_form2" />
              <field name="groups_id" eval="[(4, ref('base.group_user'))]"/>
              <field name="arch" type="xml">
                  <field name="tag_ids" position="after">
                      <field name="progress" widget="progressbar"/>
                  </field>
                  <field name="user_id" position="after">
                      <field name="planned_hours" widget="float_time"/>
                  </field>
                  <xpath expr="//notebook/page[@name='description_page']" position="after">
                      <page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}"  groups="hr_timesheet.group_hr_timesheet_user">
                      <field name="timesheet_ids" context="{'default_project_id': project_id}">
                          <tree editable="bottom" string="Timesheet Activities" default_order="date">
                              <field name="date"/>
                              <field name="user_id" invisible="1"/>
                              <field name="employee_id" required="1"/>
                              <field name="name"/>
                              <field name="unit_amount" string="Duration" widget="float_time"/>
                              <field name="project_id" invisible="1"/>
                          </tree>
                      </field>
                      <group>
                       <group class="oe_subtotal_footer oe_right" name="project_hours">
                          <field name="effective_hours" widget="float_time" />
                          <field name="children_hours" widget="float_time" attrs="{'invisible' : [('children_hours', '=', 0.0)]}" />
                          <field name="total_hours_spent" widget="float_time" class="oe_subtotal_footer_separator" attrs="{'invisible' : [('children_hours', '=', 0.0)]}" />
                          <field name="remaining_hours" widget="float_time" class="oe_subtotal_footer_separator" readonly="1"/>
                       </group>
                      </group>
                  </page>
                  </xpath>
              </field>
          </record>
  
          <record id="view_task_tree2_inherited" model="ir.ui.view">
              <field name="name">project.task.tree.inherited</field>
              <field name="model">project.task</field>
              <field name="inherit_id" ref="project.view_task_tree2" />
              <field eval="2" name="priority"/>
              <field name="arch" type="xml">
                  <field name="user_id" position="after">
                      <field name="planned_hours"/>
                      <field name="remaining_hours" widget="float_time" sum="Remaining Hours" readonly="1"/>
                      <field name="total_hours" invisible="1"/>
                      <field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
                  </field>
                  <field name="stage_id" position="after">
                      <field name="progress" widget="progressbar"/>
                  </field>
              </field>
          </record>
  
          <record id="view_project_kanban_inherited" model="ir.ui.view">
              <field name="name">project.project.timesheet.kanban.inherited</field>
              <field name="model">project.project</field>
              <field name="inherit_id" ref="project.view_project_kanban"/>
              <field name="priority">24</field>
              <field name="arch" type="xml">
                  <field name="use_tasks" position="after">
                      <field name="allow_timesheets" invisible="1"/>
                  </field>
                  <xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]/div[last()]" position="after">
                      <div attrs="{'invisible': [('allow_timesheets', '=', False)]}">
                          <a name="%(act_hr_timesheet_line_by_project)d" type="action">Timesheets</a>
                      </div>
                  </xpath>
                  <xpath expr="//div[contains(@class, 'o_project_kanban_box')]/div[last()]" position="after">
                      <div attrs="{'invisible': [('allow_timesheets', '=', False)]}" class="o_project_kanban_box">
                          <a t-if="record.allow_timesheets.raw_value" name="%(act_hr_timesheet_line_by_project)d" type="action">
                              <span class="o_label">Timesheets</span>
                          </a>
                      </div>
                  </xpath>
              </field>
          </record>
  
          <record id="view_task_kanban_inherited_progress" model="ir.ui.view">
              <field name="name">project.task.timesheet.kanban.inherited.progress</field>
              <field name="model">project.task</field>
              <field name="inherit_id" ref="project.view_task_kanban"/>
              <field name="arch" type="xml">
                  <templates position="before">
                      <field name="progress" />
                      <field name="remaining_hours" />
                  </templates>
                  <div class="oe_kanban_bottom_left" position="inside">
                     <t t-if="record.progress.raw_value &gt; 80 and record.progress.raw_value &lt; 100">
                         <div t-att-class="'oe_kanban_align label label-' + (record.progress.raw_value &gt;= 99 ? 'danger': 'warning')"
                               groups="project.group_time_work_estimation_tasks" title="Remaining hours">
                                <field name="remaining_hours" widget="float_time" />
                         </div>
                     </t>
                  </div>
               </field>
           </record>
  
           <act_window id="project_task_action_view_timesheet"
              name="Timesheet Entries"
              src_model="project.task"
              res_model="account.analytic.line"
              view_mode="tree"
              view_id="hr_timesheet_line_tree"
              context="{
                  'search_default_task_id': [active_id],
                  'default_task_id': active_id,
              }"
          />
  
      </data>
  </odoo>
  