Skip to content

Commit

Permalink
work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
assi-odoo committed Jan 10, 2024
1 parent 834318f commit 1ea024b
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 387 deletions.
2 changes: 1 addition & 1 deletion electronic_store/data/helpdesk_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<field name="use_product_returns" eval="True"/>
<field name="use_product_repairs" eval="True"/>
</record>
</odoo>
</odoo>
21 changes: 2 additions & 19 deletions electronic_store/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -1,83 +1,66 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="installation_date" model="ir.model.fields">
<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="ttype">datetime</field>
<field name="copied" eval="True" />
<field name="on_delete" eval="False" />
</record>
<record id="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="ttype">many2many</field>
<field name="on_delete" eval="False" />
<field name="related">x_project_task_id.user_ids</field>
<field name="relation_table">x_res_users_x_project_task_worksheet_template_1_rel</field>
<field name="readonly" eval="True" />
<field name="relation">res.users</field>
</record>
<record id="product_record" 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="ttype">boolean</field>
<field name="on_delete" eval="False" />
<field name="related">x_project_task_id.allow_material</field>
<field name="readonly" eval="True" />
</record>
<record id="products_record" 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="ttype">boolean</field>
<field name="on_delete" eval="False" />
<field name="related">x_project_task_id.allow_material</field>
<field name="readonly" eval="True" />
</record>
<record id="warranty_date_record" model="ir.model.fields">
<field name="name">x_warranty_date</field>
<field name="field_description">Warranty Date</field>
<field name="model_id" ref="helpdesk.model_helpdesk_ticket" />
<field name="ttype">datetime</field>
<field name="on_delete" eval="False" />
<field name="related">lot_id.expiration_date</field>
<field name="readonly" eval="True" />
</record>
<record id="new_related_field_he_7lj" model="ir.model.fields">
<field name="name">x_related_field_warranty_date</field>
<field name="field_description">Warranty Date </field>
<field name="model_id" ref="helpdesk.model_helpdesk_ticket" />
<field name="ttype">datetime</field>
<field name="on_delete" eval="False" />
<field name="related">lot_id.expiration_date</field>
<field name="readonly" eval="True" />
</record>
<record id="type_of_installation_record" 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="ttype">selection</field>
<field name="copied" eval="True" />
<field name="on_delete" eval="False" />
<field name="selection">[('AIR CONDITIONER', 'AIR CONDITIONER'), ('REFRIGERATOR', 'REFRIGERATOR')]</field>
<field name="selection">[('air_conditioner', 'AIR CONDITIONER'), ('refrigerator', 'REFRIGERATOR')]</field>
</record>
<record id="makemodel_record" 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="ttype">char</field>
<field name="copied" eval="True" />
<field name="on_delete" eval="False" />
</record>
<record id="ir_model_fields_warranty_date" model="ir.model.fields">
<field name="name">x_warranty_date</field>
<field name="field_description">Warranty Date</field>
<field name="model_id" ref="stock.model_stock_move_line" />
<field name="ttype">datetime</field>
<field name="on_delete" eval="False" />
<field name="related">lot_id.expiration_date</field>
</record>
</odoo>
12 changes: 6 additions & 6 deletions electronic_store/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
</div>
<div class="row mb-3" style="page-break-inside: avoid">
<div t-att-class="('col-5' if report_type == 'pdf' else 'col-lg-5 col-12') + ' font-weight-bold'">Products</div>
<i string="Products" modifiers="{&quot;readonly&quot;: true}" t-att-class="'col-lg-7 col-12 fa ' + ('fa-check-square' if worksheet.x_products else 'fa-square-o')" />
<i string="Products" modifiers="{'readonly': true}" t-att-class="'col-lg-7 col-12 fa ' + ('fa-check-square' if worksheet.x_products else 'fa-square-o')" />
</div>
<div class="row mb-3" style="page-break-inside: avoid">
<div t-att-class="('col-5' if report_type == 'pdf' else 'col-lg-5 col-12') + ' font-weight-bold'">Installation Date</div>
<div string="Installation Date" t-att-class="'col-7' if report_type == 'pdf' else 'col-lg-7 col-12'" t-field="worksheet.x_installation_date" />
</div>
<div class="row mb-3" style="page-break-inside: avoid">
<div t-att-class="('col-5' if report_type == 'pdf' else 'col-lg-5 col-12') + ' font-weight-bold'">Service Engineer</div>
<div string="Service Engineers" modifiers="{&quot;readonly&quot;: true}" t-att-class="'col-7' if report_type == 'pdf' else 'col-lg-7 col-12'" t-field="worksheet.x_service_engineers" />
<div string="Service Engineers" modifiers="{'readonly': true}" t-att-class="'col-7' if report_type == 'pdf' else 'col-lg-7 col-12'" t-field="worksheet.x_service_engineers" />
</div>
<div class="row mb-3" style="page-break-inside: avoid">
<div t-att-class="('col-5' if report_type == 'pdf' else 'col-lg-5 col-12') + ' font-weight-bold'">Comments</div>
Expand All @@ -48,8 +48,8 @@
<field name="inherit_id" ref="helpdesk.helpdesk_ticket_view_form" />
<field name="arch" type="xml">
<data>
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='extra_info']/group[1]/field[@name='suitable_product_ids']" position="after">
<field name="x_related_field_warranty_date" string="Warranty Date" />
<xpath expr="//field[@name='suitable_product_ids']" position="after">
<field name="x_related_field_warranty_date" />
</xpath>
</data>
</field>
Expand All @@ -66,7 +66,7 @@
<xpath expr="//field[@name='default_code']" position="attributes">
<attribute name="string">Model Number</attribute>
</xpath>
<xpath expr="//form[@name='Product Template']/sheet[@name='product_form']/notebook[1]/page[@name='inventory']/group[@name='inventory']/group[@name='expiry_and_lots']/label[1]" position="attributes">
<xpath expr="//page[@name='inventory']//group[@name='expiry_and_lots']/label" position="attributes">
<attribute name="string">Warranty Date</attribute>
</xpath>
</data>
Expand All @@ -79,7 +79,7 @@
<field name="arch" type="xml">
<form create="false" duplicate="false">
<sheet>
<h1 invisible="context.get('studio') or context.get('default_x_project_task_id')">
<h1 invisible="context.get('default_x_project_task_id')">
<field name="x_project_task_id" />
</h1>
<group>
Expand Down

0 comments on commit 1ea024b

Please sign in to comment.