Skip to content

Commit

Permalink
[ADD] helpdesk_product: add products menu to Helpdesk app
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaBForgeFlow committed Mar 13, 2024
1 parent 860f77c commit 357bfa3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helpdesk_product/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"category": "After-Sales",
"website": "https://github.com/OCA/helpdesk",
"depends": ["helpdesk_mgmt", "product"],
"data": ["views/helpdesk_ticket_view.xml", "views/product_view.xml"],
"data": ["views/product_view.xml", "views/helpdesk_ticket_view.xml"],
"demo": ["demo/helpdesk_product_demo.xml"],
"development_status": "Beta",
"auto_install": True,
Expand Down
12 changes: 12 additions & 0 deletions helpdesk_product/views/helpdesk_ticket_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@
</field>
</record>

<!-- PRODUCT MENU -->
<menuitem
action="product_template_action_helpdesk"
id="action_menu_view_products"
parent="helpdesk_mgmt.helpdesk_ticket_main_menu"
name="Products"
sequence="12"
/>




</odoo>
41 changes: 41 additions & 0 deletions helpdesk_product/views/product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,45 @@
</field>
</record>

<record id="product_template_search_view_helpdesk" model="ir.ui.view">
<field name="name">product.template.search</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view" />
<field name="arch" type="xml">
<search>
<filter
string="Available for Helpdesk"
name="helpdesk_active"
domain="[('ticket_active', '=', True )]"
/>

</search>
</field>
</record>




<!-- ACTION WINDOW FOR PRODUCT IN HELPDESK -->
<record id="product_template_action_helpdesk" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.template</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="search_view_id" ref="product_template_search_view_helpdesk" />
<field name="context">{'search_default_helpdesk_active': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product
</p><p>
You currently have no products available for Helpdesk Tickets.
<br />
A product can be either a physical product or a service that you sell to your customers.
</p>
</field>
</record>




</odoo>

0 comments on commit 357bfa3

Please sign in to comment.