first push message

This commit is contained in:
2026-07-01 14:41:49 +07:00
parent 6667dec2bf
commit 58b5f46cc4
2951 changed files with 316619 additions and 0 deletions
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ks_gantt_view_import_wizard" model="ir.ui.view">
<field name="name">ks.gantt.view.import</field>
<field name="model">ks.gantt.import.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<group>
<field name="ks_file_type"/>
<field name="ks_file"/>
</group>
<footer>
<button name="ks_action_import" string="Confirm" type="object" class="oe_highlight"/>
<button string="Cancel" class="btn btn-default" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_gantt_view_import_id" model="ir.actions.act_window">
<field name="name">Import Project</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ks.gantt.import.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="ks_gantt_view_import_menuitem" name="Import Project" parent="project.menu_main_pm"
sequence="100" action="action_gantt_view_import_id"/>
</odoo>
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Project Gantt View -->
<record id="ks_project_view_gantt" model="ir.ui.view">
<field name="name">Project Gantt View</field>
<field name="model">project.project</field>
<field name="arch" type="xml">
<ks_gantt
ks_task_start_date="ks_project_start"
ks_task_end_date="ks_project_end"
ks_task_id="id"
ks_task_name="name"
ks_project_row="ks_project_row"
ks_task_data="ks_project_task_json"
/>
</field>
</record>
<!--
Inherit the project form view to add a Gantt Settings tab.
Odoo 19: the core form view id is still 'project.edit_project'.
If this xpath fails, inspect the view via:
Settings > Technical > User Interface > Views > search 'project.project' form.
-->
<record id="ks_view_project_form" model="ir.ui.view">
<field name="name">Ks Project Form View</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//notebook//page[@name='settings']" position="after">
<page name="ks_gantt_setting" string="Gantt Settings">
<group>
<group string="Auto mode tasks">
<field name="ks_project_start"/>
<field name="ks_project_end"/>
</group>
<group string="Gantt Chart Settings">
<field name="ks_enable_task_dynamic_text" widget="boolean_toggle"/>
<field name="ks_enable_task_dynamic_progress" widget="boolean_toggle"/>
<field name="ks_days_off" widget="boolean_toggle"/>
<field name="ks_hide_date" invisible="ks_days_off == False"/>
<field name="ks_days_off_selection" widget="many2many_tags"
invisible="ks_days_off == False"
options="{'no_create': True, 'no_create_edit': True}"/>
<field name="ks_enable_quickinfo_extension" widget="boolean_toggle"/>
</group>
<group string="Tooltip Settings">
<field name="ks_tooltip_task_name" widget="boolean_toggle"/>
<field name="ks_tooltip_task_duration" widget="boolean_toggle"/>
<field name="ks_tooltip_task_start_date" widget="boolean_toggle"/>
<field name="ks_tooltip_task_end_date" widget="boolean_toggle"/>
<field name="ks_tooltip_task_progress" widget="boolean_toggle"/>
<field name="ks_tooltip_task_deadline" widget="boolean_toggle"/>
<field name="ks_tooltip_task_stage" widget="boolean_toggle"/>
<field name="ks_tooltip_task_constraint_type" widget="boolean_toggle"/>
<field name="ks_tooltip_task_constraint_date" widget="boolean_toggle"/>
</group>
<group string="Mail Timesheet User">
<field name="ks_mail_timesheet_user"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
<!-- Stage color — form view -->
<record id="ks_task_stage_form_color" model="ir.ui.view">
<field name="name">Stage color</field>
<field name="model">project.task.type</field>
<field name="inherit_id" ref="project.task_type_edit"/>
<field name="priority">32</field>
<field name="arch" type="xml">
<field name="sequence" position="after">
<field name="ks_stage_color" widget="ks_gantt_color_picker"/>
</field>
</field>
</record>
<!-- Stage color — list view -->
<record id="ks_task_stage_tree_color" model="ir.ui.view">
<field name="name">Stage color</field>
<field name="model">project.task.type</field>
<field name="inherit_id" ref="project.task_type_tree"/>
<field name="priority">32</field>
<field name="arch" type="xml">
<field name="fold" position="after">
<field name="ks_stage_color" widget="ks_gantt_color_picker"/>
</field>
</field>
</record>
<!--
Add ks_gantt to the project Kanban action view_mode.
Odoo 19: verify these action record ids still exist by checking
Project > Settings > Technical > Actions.
If 'open_view_project_all_group_stage' was removed in your build,
delete that record block below.
-->
<record id="project.open_view_project_all" model="ir.actions.act_window">
<field name="view_mode">kanban,ks_gantt,form,list</field>
</record>
<record id="project.open_view_project_all_group_stage" model="ir.actions.act_window">
<field name="view_mode">kanban,ks_gantt,form,list</field>
</record>
</odoo>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Project Task Gantt View -->
<record id="ks_task_view_gantt" model="ir.ui.view">
<field name="name">Project Task Gantt View</field>
<field name="model">project.task</field>
<field name="arch" type="xml">
<ks_gantt
ks_task_start_date="ks_start_datetime"
ks_task_end_date="ks_end_datetime"
ks_task_id="id"
ks_task_name="name"
ks_task_color="ks_color"
ks_task_link="ks_task_link_json"
ks_task_link_info='{"ks_link_source": "ks_source_task_id", "ks_link_target": "ks_target_task_id"}'
ks_task_parent="parent_id"
ks_mark_as_important="priority"
ks_work_duration="ks_work_duration"
ks_task_deadline="date_deadline"
ks_task_progress="progress"
ks_parent_task="parent_id"
ks_allow_subtask="ks_allow_subtask"
ks_schedule_mode="ks_schedule_mode"
ks_task_stage_id="stage_id"
ks_unschedule="ks_task_unschedule"
ks_constraint_task_type="ks_constraint_task_type"
ks_constraint_task_date="ks_constraint_task_date"
ks_owner_task="user_ids"
ks_resource_hours_per_day="ks_resource_hours_per_day"
ks_resource_hours_available="ks_resource_hours_available"
ks_task_type="ks_task_type"
sequence="sequence"
project_id="project_id"
partner_id="partner_id"
company_id="company_id"
ks_enable_task_duration="ks_enable_task_duration"
ks_user_id="ks_user_ids"
planned_hours="planned_hours"
>
<field name="planned_hours"/>
</ks_gantt>
</field>
</record>
<!--
Add ks_gantt view to the "All Tasks" action.
Odoo 19: 'tree' was renamed to 'list' in view_mode strings.
Verify act_project_project_2_project_task_all still exists in your build.
-->
<record id="project.act_project_project_2_project_task_all" model="ir.actions.act_window">
<field name="view_mode">kanban,list,form,calendar,pivot,graph,activity,ks_gantt</field>
</record>
</data>
</odoo>
@@ -0,0 +1,9 @@
<!--<?xml version="1.0" encoding="utf-8"?>-->
<odoo>
<!-- <template id="assets_backend" name="ks GanttView assets" inherit_id="web.assets_backend">-->
<!-- <xpath expr="." position="inside">-->
<!-- <script type="text/javascript" src="/ks_gantt_view_project/static/src/js/ks_gantt_renderer_inherit.js"/>-->
<!-- <script type="text/javascript" src="/ks_gantt_view_project/static/src/js/ks_gantt_controller.js"/>-->
<!-- </xpath>-->
<!-- </template>-->
</odoo>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!--
Odoo 19: 'tree' renamed to 'list' in view_mode strings.
Verify these action record ids still exist in your build.
If 'action_view_my_task' was removed, delete that block.
-->
<record id="project.action_view_all_task" model="ir.actions.act_window">
<field name="view_mode">list,kanban,form,calendar,pivot,graph,activity,ks_gantt</field>
</record>
<record id="project.action_view_my_task" model="ir.actions.act_window">
<field name="view_mode">list,kanban,form,calendar,pivot,graph,activity,ks_gantt</field>
</record>
</data>
</odoo>
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!--
Inherit the core project task form view to add a Gantt Detail tab.
Odoo 19: 'project.view_task_form2' is still the standard task form view id.
-->
<record id="ks_view_task_form" model="ir.ui.view">
<field name="name">Ks Task Form View</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<!-- Show "Send Email" button when task progress > 90% and user is a timesheet user -->
<button name="ks_action_send_email_tasks" type="object"
class="btn btn-secondary"
invisible="progress &lt;= 90"
string="Send Email"
groups="hr_timesheet.group_hr_timesheet_user"/>
</xpath>
<xpath expr="//notebook//page[@name='description_page']" position="after">
<page name="ks_gantt_task_setting" string="Gantt Detail">
<group>
<group>
<field name="ks_task_unschedule"/>
<field name="ks_task_type"/>
<field name="ks_enable_task_duration"
widget="boolean_toggle"
invisible="ks_task_type == 'milestone'"/>
<field name="ks_start_datetime"
readonly="ks_schedule_mode == 'auto'"
force_save="1"/>
<field name="ks_task_duration"
invisible="(ks_enable_task_duration == False) or (ks_task_type == 'milestone')"/>
<field name="ks_end_datetime"
readonly="(ks_schedule_mode == 'auto') or (ks_enable_task_duration == True)"
invisible="ks_task_type == 'milestone'"
force_save="1"/>
<field name="ks_work_duration"
invisible="ks_enable_task_duration == True"/>
<field name="ks_resource_hours_per_day"/>
</group>
<group>
<field name="ks_schedule_mode" widget="radio"/>
<field name="ks_constraint_task_type"/>
<field name="ks_constraint_task_date"
invisible="ks_constraint_task_type in ('asap', 'alap', False)"
required="ks_constraint_task_type not in ('asap', 'alap', False)"/>
</group>
</group>
</page>
</xpath>
<xpath expr="//notebook//page[@name='extra_info']" position="before">
<page name="ks_gantt_task_link" string="Link Task">
<field name="ks_task_link_ids">
<list editable="bottom">
<field name="ks_target_task_id"/>
<field name="ks_task_link_type"/>
<field name="ks_lag_days"/>
</list>
</field>
</page>
</xpath>
</field>
</record>
</data>
</odoo>