[CLN] global: apply ruff

This commit is contained in:
Stéphan Sainléger
2025-06-25 15:57:21 +02:00
parent 76db335030
commit 2afa90260f
32 changed files with 194 additions and 159 deletions

View File

@@ -3,8 +3,8 @@ helpdesk_portal_ticket_enriched_description_form
================================================
Add fieds in ticket creation portal form to enrich description content.
Installation
============
# Installation
Use Odoo normal module installation procedure to install
`helpdesk_portal_ticket_enriched_description_form`.
@@ -12,13 +12,13 @@ Use Odoo normal module installation procedure to install
# Known issues / Roadmap
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/helpdesk-tools/issues>`\_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
# Bug Tracker
Bugs are tracked on
`our issues website <https://github.com/elabore-coop/helpdesk-tools/issues>`\_. In case
of trouble, please check there if your issue has already been reported. If you spotted
it first, help us smashing it by providing a detailed and welcomed feedback.
# Credits

View File

@@ -9,7 +9,7 @@
"maintainer": "Stéphan Sainléger",
"license": "AGPL-3",
"category": "Tools",
"summary": "Add fieds in ticket creation portal form to enrich description content.",
"summary": "Add fieds in ticket creation portal form to enrich description data.",
# any module necessary for this one to work correctly
"depends": [
"base",

View File

@@ -1,2 +1 @@
from . import main

View File

@@ -1,4 +1,3 @@
import odoo.http as http
from odoo import _
from odoo.addons.helpdesk_mgmt.controllers.main import HelpdeskTicketController
@@ -9,15 +8,21 @@ class HelpdeskTicketControllerDescription(HelpdeskTicketController):
description = ""
if kw.get("small_description", False):
description = (
description + "<b>%s</b><br/>" % _(u"DESCRIPTION:") + kw["small_description"]
description
+ "<b>%s</b><br/>" % _("DESCRIPTION:")
+ kw["small_description"]
)
del kw["small_description"]
if kw.get("access", False):
description = description + "<br/><br/><b>%s</b><br/>" % _(u"ACCESS:") + kw["access"]
description = (
description + "<br/><br/><b>%s</b><br/>" % _("ACCESS:") + kw["access"]
)
del kw["access"]
if kw.get("bug_report", False):
description = (
description + "<br/><br/><b>%s</b><br/>" % _(u"BUG REPORT:") + kw["bug_report"]
description
+ "<br/><br/><b>%s</b><br/>" % _("BUG REPORT:")
+ kw["bug_report"]
)
del kw["bug_report"]
res.update({"description": description})

View File

@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="helpdesk_create_ticket_description" name="Create Ticket: Description"
inherit_id="helpdesk_mgmt.portal_create_ticket" priority="40">
<template
id="helpdesk_create_ticket_description"
name="Create Ticket: Description"
inherit_id="helpdesk_mgmt.portal_create_ticket"
priority="40"
>
<xpath expr="//textarea[@name='description']/../.." position="replace">
<div class="form-group">
<label
@@ -17,23 +21,20 @@
required="True"
/>
</div>
<span class="col-md-7 col-sm-8">Be precise. If there is a bug/error, please describe
<span
class="col-md-7 col-sm-8"
>Be precise. If there is a bug/error, please describe
how to reproduce it</span>
</div>
<div class="form-group">
<label
class="col-md-3 col-dm-4 control-label"
for="access"
>Access
<label class="col-md-3 col-dm-4 control-label" for="access">Access
</label>
<div class="col-md-7 col-sm-8">
<input
class="form-control"
type="text"
name="access"
/>
<input class="form-control" type="text" name="access" />
</div>
<span class="col-md-7 col-sm-8">Link toward error or additional information</span>
<span
class="col-md-7 col-sm-8"
>Link toward error or additional information</span>
</div>
<div class="form-group">
<label
@@ -48,9 +49,11 @@
style="min-height: 120px"
/>
</div>
<span class="col-md-7 col-sm-8">Paste here the complete error message (ex: error
<span
class="col-md-7 col-sm-8"
>Paste here the complete error message (ex: error
code Odoo)</span>
</div>
</xpath>
</template>
</odoo>
</odoo>