Skip to content

Commit

Permalink
electronic_store: worksheet template
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Feb 19, 2024
1 parent e9908b8 commit ce028c5
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 26 deletions.
1 change: 1 addition & 0 deletions electronic_store/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'data/helpdesk_config.xml',
'data/res_config_settings.xml',
'data/ir_attachment_pre.xml',
'data/ir_model.xml',
'data/ir_model_fields.xml',
'data/ir_ui_view.xml',
'data/ir_actions_act_window.xml',
Expand Down
4 changes: 2 additions & 2 deletions electronic_store/data/ir_actions_act_window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<odoo>
<record id="x_project_task_worksheet_template_1_ir_actions_act_window_1" model="ir.actions.act_window">
<field name="name">Worksheets</field>
<field name="res_model">x_project_task_worksheet_template_1</field>
<field name="search_view_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_ui_view_3"/>
<field name="res_model">x_project_task_worksheet_template_1_studio</field>
<field name="search_view_id" ref="x_project_task_worksheet_template_1_ir_ui_view_3"/>
</record>
</odoo>
7 changes: 7 additions & 0 deletions electronic_store/data/ir_model.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="x_project_task_worksheet_template_1_ir_model_1" model="ir.model">
<field name="name">Default Worksheet</field>
<field name="model">x_project_task_worksheet_template_1_studio</field>
</record>
</odoo>
2 changes: 1 addition & 1 deletion electronic_store/data/ir_model_access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<odoo>
<record id="ir_model_access_1320" model="ir.model.access">
<field name="name">x_project_task_worksheet_template_1_user_access</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="group_id" ref="project.group_project_user"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="True"/>
Expand Down
34 changes: 28 additions & 6 deletions electronic_store/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,49 @@
<record id="field_installation_date" model="ir.model.fields">
<field name="name">x_installation_date</field>
<field name="field_description">Installation Date</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">datetime</field>
</record>
<record id="field_service_engineeres" model="ir.model.fields">
<field name="name">x_service_engineers</field>
<field name="field_description">Service Engineers</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">char</field>
<field name="readonly" eval="True"/>
</record>
<record id="x_comments_remarks_record" model="ir.model.fields">
<field name="name">x_comments</field>
<field name="field_description">Remarks</field>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">html</field>
</record>
<record id="x_project_task_record" model="ir.model.fields">
<field name="name">x_project_task_id</field>
<field name="field_description">Task</field>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="on_delete">cascade</field>
<field name="relation">project.task</field>
<field name="required" eval="True"/>
<field name="ttype">many2one</field>
</record>
<record id="x_name_record" model="ir.model.fields">
<field name="name">x_name</field>
<field name="field_description">Name</field>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="related">x_project_task_id.name</field>
<field name="ttype">char</field>
</record>
<record id="field_product_id_worksheet_template" model="ir.model.fields">
<field name="name">x_product</field>
<field name="field_description">Product</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">boolean</field>
<field name="related">x_project_task_id.allow_material</field>
</record>
<record id="field_products_id_worksheet_template" model="ir.model.fields">
<field name="name">x_products</field>
<field name="field_description">Products</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">boolean</field>
<field name="related">x_project_task_id.allow_material</field>
</record>
Expand All @@ -44,14 +66,14 @@
<record id="field_type_of_installation" model="ir.model.fields">
<field name="name">x_type_of_installation</field>
<field name="field_description">Type of Installation</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">selection</field>
<field name="selection">[('air_conditioner', 'Air Conditioner'), ('refrigerator', 'Refrigerator')]</field>
</record>
<record id="field_makemodel" model="ir.model.fields">
<field name="name">x_makemodel</field>
<field name="field_description">Make/Model</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="ttype">char</field>
</record>
<record id="field_warranty_date_stock_move_line" model="ir.model.fields">
Expand Down
4 changes: 2 additions & 2 deletions electronic_store/data/ir_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<odoo noupdate="1">
<record id="ir_rule_350" model="ir.rule">
<field name="name">x_project_task_worksheet_template_1_own</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="domain_force">[('create_uid', '=', user.id)]</field>
<field name="groups" eval="[(6, 0, [ref('project.group_project_user')])]"/>
</record>
<record id="ir_rule_351" model="ir.rule">
<field name="name">x_project_task_worksheet_template_1_all</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(6, 0, [ref('project.group_project_manager'), ref('industry_fsm.group_fsm_user')])]"/>
</record>
Expand Down
10 changes: 5 additions & 5 deletions electronic_store/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="report_custom_x_project_task_worksheet_template_1" model="ir.ui.view">
<field name="name">x_project_task_worksheet_template_1</field>
<field name="name">x_project_task_worksheet_template_1_studio</field>
<field name="type">qweb</field>
<field name="key">gen_key.295a43</field>
<field name="arch" type="xml">
Expand Down Expand Up @@ -72,10 +72,10 @@
</data>
</field>
</record>
<record id="industry_fsm_report.x_project_task_worksheet_template_1_ir_ui_view_1" model="ir.ui.view">
<record id="x_project_task_worksheet_template_1_ir_ui_view_1" model="ir.ui.view">
<field name="name">template_view_Default_Worksheet</field>
<field name="type">form</field>
<field name="model">x_project_task_worksheet_template_1</field>
<field name="model">x_project_task_worksheet_template_1_studio</field>
<field name="arch" type="xml">
<form create="false" duplicate="false">
<sheet>
Expand All @@ -97,7 +97,7 @@
<record id="x_project_task_worksheet_template_1_ir_ui_view_2" model="ir.ui.view">
<field name="name">tree_view_Default_Worksheet</field>
<field name="type">tree</field>
<field name="model">x_project_task_worksheet_template_1</field>
<field name="model">x_project_task_worksheet_template_1_studio</field>
<field name="arch" type="xml">
<tree>
<field name="create_date" widget="date"/>
Expand All @@ -108,7 +108,7 @@
<record id="x_project_task_worksheet_template_1_ir_ui_view_3" model="ir.ui.view">
<field name="name">search_view_Default_Worksheet</field>
<field name="type">search</field>
<field name="model">x_project_task_worksheet_template_1</field>
<field name="model">x_project_task_worksheet_template_1_studio</field>
<field name="arch" type="xml">
<search>
<field name="x_name"/>
Expand Down
2 changes: 1 addition & 1 deletion electronic_store/data/product_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
<field name="public_categ_ids" eval="[(6, 0, [ref('product_public_category_12')])]"/>
<field name="service_tracking">task_global_project</field>
<field name="project_id" ref="project_project_5"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
<field name="image_1920" type="base64" file="electronic_store/static/src/binary/product_template/1051-image_1920"/>
</record>
<record id="product_product_1051" model="product.product">
Expand Down
2 changes: 1 addition & 1 deletion electronic_store/data/product_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<field name="is_published" eval="True"/>
<field name="service_tracking">task_global_project</field>
<field name="project_id" ref="industry_fsm.fsm_project"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
<field name="image_1920" type="base64" file="electronic_store/static/src/binary/product_template/2-image_1920"/>
</record>
</odoo>
8 changes: 4 additions & 4 deletions electronic_store/data/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<field name="name">Air Conditioner Installation</field>
<field name="stage_id" ref="project.project_project_stage_0"/>
<field name="documents_folder_id" ref="documents_folder_7"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
</record>
<record id="project_project_1" model="project.project">
<field name="name">Internal</field>
Expand All @@ -18,17 +18,17 @@
<field name="documents_tag_ids" eval="[(6, 0, [ref('documents_project.documents_project_status_validated')])]"/>
<field name="stage_id" ref="project.project_project_stage_0"/>
<field name="documents_folder_id" ref="documents_folder_10"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
</record>
<record id="project_project_5" model="project.project">
<field name="name">Washing Machines Installation</field>
<field name="stage_id" ref="project.project_project_stage_0"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
</record>
<record id="industry_fsm.fsm_project" model="project.project">
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="stage_id" ref="project.project_project_stage_0"/>
<field name="worksheet_template_id" ref="industry_fsm_report.fsm_worksheet_template"/>
<field name="worksheet_template_id" ref="fsm_worksheet_template"/>
<field name="analytic_account_id" ref="account_analytic_account_2"/>
</record>

Expand Down
4 changes: 2 additions & 2 deletions electronic_store/data/worksheet_template.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="industry_fsm_report.fsm_worksheet_template" model="worksheet.template" context="{'worksheet_no_generation': True}">
<record id="fsm_worksheet_template" model="worksheet.template" context="{'worksheet_no_generation': True}">
<field name="name">Default Worksheet</field>
<field name="res_model">project.task</field>
<field name="model_id" ref="industry_fsm_report.x_project_task_worksheet_template_1_ir_model_1"/>
<field name="model_id" ref="x_project_task_worksheet_template_1_ir_model_1"/>
<field name="action_id" ref="x_project_task_worksheet_template_1_ir_actions_act_window_1"/>
<field name="report_view_id" ref="report_custom_x_project_task_worksheet_template_1"/>
</record>
Expand Down
4 changes: 2 additions & 2 deletions electronic_store/demo/x_worksheet_template.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="x_project_task_worksheet_template_1_1" model="x_project_task_worksheet_template_1">
<record id="x_project_task_worksheet_template_1_1" model="x_project_task_worksheet_template_1_studio">
<field name="x_name">Air Conditioner Installation</field>
<field name="x_project_task_id" ref="project_task_3"/>
</record>
<record id="x_project_task_worksheet_template_1_2" model="x_project_task_worksheet_template_1">
<record id="x_project_task_worksheet_template_1_2" model="x_project_task_worksheet_template_1_studio">
<field name="x_name">Air Conditioner Installation</field>
<field name="x_project_task_id" ref="project_task_7"/>
<field name="x_type_of_installation">air_conditioner</field>
Expand Down

0 comments on commit ce028c5

Please sign in to comment.