This commit is contained in:
mohammed-alkhazrji 2025-07-14 22:36:09 +03:00
parent cafa12fd58
commit 62acf4e8b8
10 changed files with 29 additions and 1634 deletions

View File

@ -1,27 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<data noupdate="1">
<record id="digest.digest_digest_default" model="digest.digest">
<field name="kpi_odex25_helpdesk_tickets_closed">True</field>
</record>
</data>
<data>
<record id="digest_tip_odex25_helpdesk_0" model="digest.tip">
<field name="name">Tip: Create tickets from incoming emails</field>
<field name="sequence">1800</field>
<field name="group_id" ref="odex25_helpdesk.group_odex25_helpdesk_manager" />
<field name="tip_description" type="html">
<div>
% set record = object.env['odex25_helpdesk.team'].search([('alias_name', '!=', False)],limit=1)
<b class="tip_title">Tip: Create tickets from incoming emails</b>
% if record and record.alias_domain
<p class="tip_content">Emails sent to <a href="mailto:${record.alias_id.display_name}" target="_blank" style="color: #875a7b; text-decoration: none;">${record.alias_id.display_name}</a> generate tickets in your pipeline.</p>
% else
<p class="tip_content">Emails sent to a Helpdesk Team alias generate tickets in your pipeline.</p>
% endif
</div>
</field>
</record>
</data>
</odoo>

View File

@ -11,11 +11,9 @@
'depends': [
'odex25_helpdesk',
'website',
'odex_subscription_service',
],
'data': [
'views/assets.xml',
'views/portal_user_views.xml',
'views/helpdesk_views.xml',
'views/helpdesk_templates.xml',
],

View File

@ -1,16 +1,8 @@
# -*- coding: utf-8 -*-
import logging
import werkzeug
import basehash
from datetime import timedelta
from odoo import http, fields, _
from odoo import http
from odoo.http import request
from odoo.exceptions import UserError, ValidationError,Warning
_logger = logging.getLogger(__name__)
import json
class WebsiteHelpdesk(http.Controller):
@ -29,421 +21,31 @@ class WebsiteHelpdesk(http.Controller):
def odex25_website_helpdesk_teams(self, team=None, **kwargs):
search = kwargs.get('search')
# For breadcrumb index: get all team
# portal_user_id
teams = None
# print(request.env.user.is_customer_support)
# if not request.env.user.has_group('odex25_helpdesk.group_helpdesk_manager'):
# teams = request.env['odex25_helpdesk.team'].search(['|', '|', ('use_website_helpdesk_form', '=', True), ('use_website_helpdesk_forum', '=', True), ('use_website_helpdesk_slides', '=', True)], order="id asc")
# teams = teams.filtered(lambda team: team.website_published)
teams_not_subscribed = None
teams_appended = None
if request.env.user.id: #.is_customer_support
teams = request.env['odex25_helpdesk.team'].search([('portal_user_id', '=', request.env.user.id)], order="id asc")
# print("teams", teams) #website_published
# '|',('fully_paid', '=', False),'&',
teams_not_subscribed = request.env['odex25_helpdesk.team'].search([('portal_user_id', '=', request.env.user.id), ('subscription_id', '=', False)], order="id asc")
teams_appended = request.env['odex25_helpdesk.team'].search([('portal_user_id', '=', request.env.user.id), ('subscription_id', '!=', False)], order="id asc")
teams_appended = teams_appended.filtered(lambda team: not team.fully_paid)
teams = teams.filtered(lambda team: (team.fully_paid and team.sub_status == 'open') or team.is_trial)
teams = request.env['odex25_helpdesk.team'].search(['|', '|', ('use_website_helpdesk_form', '=', True), ('use_website_helpdesk_forum', '=', True), ('use_website_helpdesk_slides', '=', True)], order="id asc")
if not request.env.user.has_group('odex25_helpdesk_security.group_helpdesk_normal_manager'):
teams = teams.filtered(lambda team: team.website_published)
if not teams:
result = {}
result['teams_not_subscribed'] = teams_not_subscribed
result['teams_appended'] = teams_appended
return request.render("odex25_website_helpdesk.not_published_any_team", result)
return request.render("odex25_website_helpdesk.not_published_any_team")
result = self.get_helpdesk_team_data(team or teams[0], search=search)
# For breadcrumb index: get all team
result['teams'] = teams
result['teams_not_subscribed'] = teams_not_subscribed
result['teams_appended'] = teams_appended
result['default_partner_values'] = self._get_partner_data()
# get categories
categories = request.env['service.category'].sudo().search([])
result['categories'] = categories
# get services
services = request.env['helpdesk.service'].sudo().search([])
result['services'] = services
return request.render("odex25_website_helpdesk.team", result)
class CustomerSupportAccount(http.Controller):
@http.route(['/helpdesk/create_support_account'], methods=['POST'], type='http', auth="public", website=True)
def helpdesk_create_support_account(self, **kw):
msg = {}
ref_id = kw.get('ref_id', False)
ref_email = kw.get('ref_email', False)
email = kw.get('username', False)
password1 = kw.get('password1', False)
password2 = kw.get('password2', False)
plan_id = kw.get('recurrency', False)
date_start = kw.get('date_start', False)
date_end = kw.get('date_end', False)
sub_id = kw.get('sub_id', False)
month_num = kw.get('month_num', False)
try:
month_num = int(month_num)
date_start = fields.Date.from_string(date_start)
date_end = date_start + timedelta(days= (month_num * 30))
except Exception as e:
month_num = 0
values = {
'name': kw.get('fullname', False),
'login': email,
'phone': kw.get('phone', False),
'password': password1,
'is_customer_support': True,
'password': password1,
}
if not values:
msg['error'] = _("The form was not properly filled in.")
return request.render('odex25_website_helpdesk.error_support_account', msg)
if ref_email != email:
print('ref_email', ref_email)
print('email', email)
msg['error'] = _("Invalid email")
return request.render('odex25_website_helpdesk.error_support_account', msg)
if password1 != password2:
msg['error'] = _("Passwords do not match; please retype them.")
return request.render('odex25_website_helpdesk.error_support_account', msg)
subscription_id = False
if sub_id:
subscription_id = request.env['subscription.service'].sudo().search([
('id', '=', sub_id),
], limit=1)
# Plan
if not subscription_id:
plan = request.env['helpdesk.price'].sudo().search([('id', '=', plan_id),('is_active', '=', True)])
if not plan:
msg['error'] = _("No plan")
return request.render('odex25_website_helpdesk.error_support_account', msg)
helpdesk_team = request.env['odex25_helpdesk.team'].sudo().search([
('id', '=', ref_id),
], limit=1)
if not helpdesk_team:
msg['error'] = _("No support for this project")
return request.render('odex25_website_helpdesk.error_support_account', msg)
if helpdesk_team.portal_user_id:
msg['error'] = _("Support account already registered for this project")
return request.render('odex25_website_helpdesk.error_support_account', msg)
supported_langs = [
lang["code"]
for lang in request.env["res.lang"].sudo().search_read([], ["code"])
]
if request.lang in supported_langs:
values["lang"] = request.lang
values['partner_id'] = helpdesk_team.partner_id.id
values['groups_id'] = [(6, 0, [request.env.ref('base.group_portal').id])]
try:
user = request.env['res.users'].sudo().with_context(no_reset_password=True).create(values)
if not subscription_id:
# Create a subscription
subscription_id = request.env["subscription.service"].sudo().create({
"type": 'sale',
"date_start": date_start,
"recurring_next_date": date_start,
"date_end": date_end,
"partner_id": user.partner_id.id,
"recurrency": 'monthly',
"recurring_interval": 1,
"currency_id": user.sudo().company_id.currency_id.id or request.env.ref('base.main_company').sudo().currency_id.id,
})
print("subscription_id", subscription_id)
# Create product #template
product_id = request.env["product.product"].sudo().create({
'name': helpdesk_team.name,
"default_code": subscription_id.code,
"list_price": plan.amount,
"type": "service",
"description": subscription_id.display_name,
"so_subscription": True,
})
print("product_id", product_id)
# Create a subscription
subscription_lines = request.env["subscription.service.line"].sudo().create({
'subscription_serv_id': subscription_id.id,
"name": plan.name + ' - ' + helpdesk_team.name,
"product_id": product_id.id,
"qty": 1,
"unit_price": plan.amount,
'sub_line_tax_ids': [(6, 0 , plan.tax_id.ids)],
})
print("subscription_lines", subscription_lines)
except Exception as e:
msg['error'] = str(e)
return request.render('odex25_website_helpdesk.error_support_account', msg)
if helpdesk_team:
helpdesk_team.sudo().write({
'portal_user_id': user.id,
})
if subscription_id:
# Update Helpdesk
helpdesk_team.sudo().write({
'subscription_id': subscription_id.id,
})
print("subscription_id month", subscription_id.sudo().month_num)
subscription_id.sudo()._compute_days_period()
print("subscription_id month", subscription_id.sudo().month_num)
subscription_id.sudo().set_open()
# return http.redirect_with_hash('/web/login')
# return http.redirect_with_hash('/my')
# return http.redirect_with_hash('/odex25_helpdesk')
return request.render('odex25_website_helpdesk.success_support_account')
# For Validate
@http.route(['/support_account/<string:token>'], type='http', auth="public",website=True)
def post_support_account(self, token, **kw):
unhashed_id = False
msg = {}
try:
hash_fn = basehash.base36() # you can initialize a 36, 52, 56, 58, 62 and 94 base fn
# hash_value = hash_fn.hash(6) # returns 'M8YZRZ' PHTYNU
unhashed_id = hash_fn.unhash(token) # returns 1
# return request.not_found()
# return request.render('website.404') in v11
except Exception as e:
return request.render('website.page_404')
if not unhashed_id:
return request.render('website.page_404')
helpdesk = request.env['odex25_helpdesk.team'].sudo().search([('id', '=', unhashed_id),], limit=1)
if not helpdesk:
return request.render('website.page_404')
if helpdesk.portal_user_id:
msg['error'] = _("Support account already registered for this project")
return request.render('odex25_website_helpdesk.error_support_account', msg)
@http.route("/api/get_services", methods=["GET"], type="http", auth="public", website=True)
def get_services(self, **kw):
category = request.params.get('category')
category_id = request.env['service.category'].sudo().search([('name', '=', category)])
services = request.env['helpdesk.service'].search_read([('category_id', '=', category_id.id)])
return json.dumps(services)
helpdesk_prices = request.env['helpdesk.price'].sudo().search([('is_active', '=', True),])
# recurrency_list = [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('yearly', 'Year(s)')]
recurrency_list = []
for price in helpdesk_prices:
recurrency_list.append((price.id, price.name))
subscription = helpdesk.subscription_id
is_sub = False
if subscription:
is_sub = True
print("subscription", subscription)
values = {
'obj_id': helpdesk.id,
'name': helpdesk.name,
'docs': helpdesk_prices,
'is_sub': is_sub,
'subscription': subscription,
'recurrency_list': recurrency_list,
'obj_email': helpdesk.partner_id.email,
'obj_name': helpdesk.partner_id.name,
'description': helpdesk.description,
}
# print("values", values)
# print("token", token)
# print("unhashed_id", unhashed_id)
return request.render("odex25_website_helpdesk.support_account_form",values)
@http.route(['/helpdesk_plan/manipulate'], type='json', auth="public", website=True)
def helpdesk_plan_manipulate(self, **arg):
date_start = arg.get('date_start', False)
month_num = arg.get('month_num', False)
try:
month_num = int(month_num)
except Exception as e:
month_num = 0
plan_id = arg.get('plan_id', False);
msg = ''
plan_scale = ''
plan_duration = ''
plan_info = ''
amount = 0
total = 0
days_period = 0
date_end = None
if plan_id and date_start and month_num >0:
days_period = (month_num * 30)
date_start = fields.Date.from_string(date_start)
date_end = date_start + timedelta(days= days_period)
days_period = days_period
else:
msg = _("Both start date and month number are required")
# if plan_id:
# if date_end <= date_start:
# msg = _("End date should be greater than start date")
# days_period = 0
# else:
# days_period = int(abs((date_end - date_start).days))
# if helpdesk_price.recurrency == "daily" and days_period < 1:
# msg = _("Check the dates, subscription should at least one day.")
# elif helpdesk_price.recurrency == "weekly" and days_period < 7:
# msg = _("Check the dates, subscription should at least one week.")
# elif helpdesk_price.recurrency == "monthly" and days_period < 30:
# msg = _("Check the dates, subscription should at least one month.")
# elif helpdesk_price.recurrency == "yearly" and days_period < 365:
# msg = _("Check the dates, subscription should at least one year.")
if not msg:
helpdesk_price = request.env['helpdesk.price'].sudo().search([('id', '=', plan_id),], limit=1)
# total = helpdesk_price.amount * days_period
amount = helpdesk_price.amount + helpdesk_price.tax_amount
plan_duration = _("Your plan is") + ' {} '.format(int(month_num)) + _("months.")
plan_scale = _("You will pay amount of ") + ' {} '.format(amount) + _("SAR on every month, the total amount will be") + ' {} '.format(month_num * amount) + _("SAR.") + " " +_("Plan end date will be") + ' {} .'.format(date_end.strftime('%d %B %Y'))
plan_info = plan_duration + plan_scale #+ _("Total amount is") + ' {} '.format(total) + _("SAR.")
res = {
'plan_info': plan_info,
'error_msg': msg,
}
return res
# For support subscription
@http.route(['/support_subscription/<int:team_id>'], type='http', auth="public",website=True)
def post_support_subscription(self, team_id, **kw):
msg = {}
try:
team_id = int(team_id)
except Exception as e:
return request.render('website.page_404')
if not team_id:
return request.render('website.page_404')
helpdesk = request.env['odex25_helpdesk.team'].sudo().search([('id', '=', team_id),], limit=1)
if not helpdesk:
return request.render('website.page_404')
if helpdesk.subscription_id:
msg['error'] = _("The project already has a subscription")
return request.render('odex25_website_helpdesk.error_support_account', msg)
helpdesk_prices = request.env['helpdesk.price'].sudo().search([('is_active', '=', True),])
recurrency_list = []
for price in helpdesk_prices:
recurrency_list.append((price.id, price.name))
values = {
'obj_id': helpdesk.id,
'name': helpdesk.name,
'docs': helpdesk_prices,
'recurrency_list': recurrency_list,
'obj_email': helpdesk.partner_id.email,
'obj_name': helpdesk.partner_id.name,
'description': helpdesk.description,
}
print("values", values)
return request.render("odex25_website_helpdesk.support_subscription_form",values)
# Added
@http.route(['/helpdesk/create_support_subscription'], methods=['POST'], type='http', auth="public", website=True)
def helpdesk_create_support_subscription(self, **kw):
msg = {}
ref_id = kw.get('ref_id', False)
plan_id = kw.get('recurrency', False)
date_start = kw.get('date_start', False)
month_num = kw.get('month_num', 0)
month_num = int(month_num)
date_start = fields.Date.from_string(date_start)
date_end = date_start + timedelta(days= (month_num * 30))
# Plan
plan = request.env['helpdesk.price'].sudo().search([('id', '=', plan_id),('is_active', '=', True)])
if not plan:
msg['error'] = _("No plan")
return request.render('odex25_website_helpdesk.error_support_account', msg)
helpdesk_team = request.env['odex25_helpdesk.team'].sudo().search([
('id', '=', ref_id),
], limit=1)
if not helpdesk_team:
msg['error'] = _("No support for this project")
return request.render('odex25_website_helpdesk.error_support_account', msg)
if helpdesk_team.subscription_id:
msg['error'] = _("The project already has a subscription")
return request.render('odex25_website_helpdesk.error_support_account', msg)
if not helpdesk_team.portal_user_id:
msg['error'] = _("No support account registered for this project")
return request.render('odex25_website_helpdesk.error_support_account', msg)
subscription_id = False
user = helpdesk_team.sudo().portal_user_id
try:
# Create a subscription
subscription_id = request.env["subscription.service"].sudo().create({
"type": 'sale',
"date_start": date_start,
"recurring_next_date": date_start,
"date_end": date_end,
"month_num": month_num,
"partner_id": user.partner_id.id,
"recurrency": 'monthly',
"recurring_interval": 1,
"currency_id": user.company_id.currency_id.id or request.env.ref('base.main_company').sudo().currency_id.id,
})
print("subscription_id", subscription_id)
# Create product #template
product_id = request.env["product.product"].sudo().create({
'name': helpdesk_team.name,
"default_code": subscription_id.code,
"list_price": plan.amount,
"type": "service",
"description": subscription_id.display_name,
"so_subscription": True,
})
print("product_id", product_id)
# Create a subscription
subscription_lines = request.env["subscription.service.line"].sudo().create({
'subscription_serv_id': subscription_id.id,
"name": plan.name + ' - ' + helpdesk_team.name,
"product_id": product_id.id,
"qty": 1,
"unit_price": plan.amount,
'sub_line_tax_ids': [(6, 0 , plan.tax_id.ids)],
})
print("subscription_lines", subscription_lines)
except Exception as e:
msg['error'] = str(e)
return request.render('odex25_website_helpdesk.error_support_account', msg)
if subscription_id:
# Update Helpdesk
helpdesk_team.sudo().write({
'subscription_id': subscription_id.id,
})
print("subscription_id month", subscription_id.sudo().month_num)
subscription_id.sudo()._compute_days_period()
print("subscription_id month", subscription_id.sudo().month_num)
subscription_id.sudo().set_open()
return http.redirect_with_hash('/my/subscriptions/{}'.format(subscription_id.id))
return http.redirect_with_hash('/my')

View File

@ -1,375 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * odex25_website_helpdesk
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-28 07:22+0000\n"
"PO-Revision-Date: 2023-02-28 09:26+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.2.2\n"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "<b>Current Support</b>"
msgstr "<b>الدعم الحالي</b>"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "<b>Your projects subcriptions</b>"
msgstr "<b>مشاريعك المرتبطة بإشتراكات دعم فني </b>"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_subscribed_teams
msgid "<b>Your projects that need a subcription</b>"
msgstr "<b>مشاريعك التي بحاجة إلي إشتراك دعم فني </b>"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.success_support_account
msgid "<span>Sign-in</span>"
msgstr "<span>تسجيل الدخول</span>"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Both start date and month number are required"
msgstr "كل من تاريخ البدء ورقم الشهر مطلوبان"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__can_publish
msgid "Can Publish"
msgstr "يمكن نشره"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Choose..."
msgstr "أختر..."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
msgid "Confirm Password"
msgstr "تأكيد كلمة المرور"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.success_support_account
msgid "Customer Support Account"
msgstr "حساب الدعم الفني"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_res_users__is_customer_support
msgid "Customer Support?"
msgstr "حساب دعم لعميل؟"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__display_name
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_res_users__display_name
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_website__display_name
msgid "Display Name"
msgstr "الاسم المعروض"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
msgid "Email"
msgstr "البريد الإلكتروني"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "From Date"
msgstr "من تاريخ"
#. module: odex25_website_helpdesk
#: model:website.menu,name:odex25_website_helpdesk.website_menu_helpdesk
msgid "Help"
msgstr "مركز المساعدة"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_published_any_team
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Helpdesk"
msgstr "مكتب المساعدة"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/models/website.py:0
#, python-format
msgid "Helpdesk Customer Satisfaction"
msgstr "رضا عميل مكتب المساعدة"
#. module: odex25_website_helpdesk
#: model:ir.model,name:odex25_website_helpdesk.model_odex25_helpdesk_team
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Helpdesk Team"
msgstr "فريق مكتب المساعدة"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__id
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_res_users__id
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_website__id
msgid "ID"
msgstr "المُعرف"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Invalid email"
msgstr "البريد الإلكتروني غير صحيح"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__is_published
msgid "Is Published"
msgstr "هل منشور"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team____last_update
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_res_users____last_update
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_website____last_update
msgid "Last Modified on"
msgstr "آخر تعديل في"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Month Number"
msgstr "عدد الشهور"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "No plan"
msgstr "لا يوجد خطة الأشتراك"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "No support account registered for this project"
msgstr "لا يوجد حساب دعم مسجل لهذا المشروع"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "No support for this project"
msgstr "لا يوجد دعم فني لهذا المشروع"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_subscribed_teams
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "Notes"
msgstr "ملاحظات"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Our team's ratings"
msgstr "التقييمات"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
msgid "Password"
msgstr "كلمة المرور"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Passwords do not match; please retype them."
msgstr "كلمة المرور غير مطابقة؛ الرجاء إعادة كتابتها."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
msgid "Phone"
msgstr "رقم الهاتف"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Plan"
msgstr "خطة الأشتراك"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Plan end date will be"
msgstr "سيكون تاريخ انتهاء الخطة"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_subscribed_teams
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "Project"
msgstr "المشروع"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Remined Tickets"
msgstr "التذاكر المتبقية"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "SAR on every month, the total amount will be"
msgstr "ريال سعودي في كل شهر ، سيكون المبلغ الإجمالي"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "SAR."
msgstr "ريال سعودي."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.error_support_account
msgid "Sorry, An Error Occurred"
msgstr "عفوا لقد حصل خطأ"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Submit"
msgstr "إرسال"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Submited Tickets"
msgstr "التذاكر المرسلة"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Subscription"
msgstr "الإشتراك"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "Subscription Status"
msgstr "حالة الإشتراك"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_subscribed_teams
msgid "Support Subscription"
msgstr "إشتراك دعم الفني"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Support account already registered for this project"
msgstr "حساب الدعم مسجل بالفعل لهذا المشروع"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "The form was not properly filled in."
msgstr "لم يتم ملء النموذج بشكل صحيح."
#. module: odex25_website_helpdesk
#: model:ir.model.fields,help:odex25_website_helpdesk.field_odex25_helpdesk_team__website_url
msgid "The full URL to access the document through the website."
msgstr "الرابط الكامل للوصول إلى المستند من خلال الموقع."
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "The project already has a subscription"
msgstr "المشروع لديه بالفعل اشتراك"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_published_any_team
msgid "There is no Helpdesk Subscription to show."
msgstr "لايوجد أشتراك دعم فني لعرضه."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Tickets Qouta"
msgstr "الحصة من التذاكر"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "To Date"
msgstr "إلى تاريخ"
#. module: odex25_website_helpdesk
#: model:ir.model,name:odex25_website_helpdesk.model_res_users
msgid "Users"
msgstr "المستخدمون"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "View Subscription"
msgstr "عرض الإشتراكات"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "View my Tickets"
msgstr "عرض تذاكري"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__website_published
msgid "Visible on current website"
msgstr "مرئي في الموقع"
#. module: odex25_website_helpdesk
#: model:ir.model,name:odex25_website_helpdesk.model_website
msgid "Website"
msgstr "الموقع الإلكتروني"
#. module: odex25_website_helpdesk
#: model:ir.model.fields,field_description:odex25_website_helpdesk.field_odex25_helpdesk_team__website_url
msgid "Website URL"
msgstr "رابط الموقع"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "You need to pay your invoices for this subscription."
msgstr "تحتاج إلى دفع فواتيرك لهذا الاشتراك."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended
msgid "You need to renew your subscription and pay your invoices."
msgstr "تحتاج إلى تجديد اشتراكك ودفع فواتيرك."
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "You will pay amount of "
msgstr "ستدفع مبلغ "
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_subscription_form
msgid "Your Subscription Plan"
msgstr "معلومات خطة الإشتراك"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.support_account_form
msgid "Your information"
msgstr "المعلومات الخاص بك"
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "Your plan is"
msgstr "خطة إشتراكك هو"
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.team
msgid "Your qouta for tickets submission is exceeded for this day."
msgstr "لقد تجاوزت حصتك من التذاكر لهذا اليوم."
#. module: odex25_website_helpdesk
#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.success_support_account
msgid ""
"Your support account has successfully created. You can sign-in to your "
"account now."
msgstr ""
"تم إنشاء حساب الدعم الخاص بك بنجاح. يمكنك تسجيل الدخول إلى حسابك الآن."
#. module: odex25_website_helpdesk
#: code:addons/odex25_website_helpdesk/controllers/main.py:0
#, python-format
msgid "months."
msgstr "شهور."

View File

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
from . import res_users
from . import helpdesk
from . import website

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from odoo import api, models
from odoo import api, models,fields
from odoo.addons.http_routing.models.ir_http import slug
@ -8,6 +8,9 @@ class HelpdeskTeam(models.Model):
_name = "odex25_helpdesk.team"
_inherit = ['odex25_helpdesk.team', 'website.published.mixin']
def _compute_website_url(self):
super(HelpdeskTeam, self)._compute_website_url()
for team in self:

View File

@ -1,9 +0,0 @@
from odoo import api, fields, models ,_
from odoo.exceptions import ValidationError
class PortalResUser(models.Model):
_inherit = 'res.users'
is_customer_support = fields.Boolean(string='Customer Support?', default=False)

View File

@ -1,108 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<template id="not_subscribed_teams" name="Helpdesk Team">
<div t-if="teams_not_subscribed">
<div class="oe_structure"/>
<div class="card bg-secondary mt-2">
<h6 class="card-header"><b>Your projects that need a subcription</b></h6>
<div class="card-body">
<table class="table borderless" style="width:100%;">
<tr style="font-weight:bold;">
<td>
Project
</td>
<td>
Notes
</td>
</tr>
<t t-foreach="teams_not_subscribed" t-as="team">
<tr style="font-weight:bold;">
<td>
<h5 t-field="team.name"/>
</td>
<td>
<a t-attf-class="btn btn-primary" t-attf-href="/support_subscription/#{team.id}">
Support Subscription
</a>
</td>
</tr>
</t>
</table>
</div>
</div>
<div class="oe_structure"/>
</div>
</template>
<template id="teams_sub_appended" name="Helpdesk Team">
<div t-if="teams_appended">
<div class="oe_structure"/>
<div class="card bg-secondary mt-2">
<h6 class="card-header"><b>Your projects subcriptions</b></h6>
<div class="card-body">
<table class="table borderless" style="width:100%;">
<tr style="font-weight:bold;">
<td>
Project
</td>
<td>
Subscription Status
</td>
<td>
Notes
</td>
<td>
View Subscription
</td>
</tr>
<t t-foreach="teams_appended" t-as="team">
<tr style="font-weight:bold;">
<td>
<h5 t-field="team.name"/>
</td>
<td>
<h5 t-field="team.sub_status"/>
</td>
<td>
<t t-if="team.sub_status == 'open'">
<h5>
You need to pay your invoices for this subscription.
</h5>
</t>
<t t-if="team.sub_status != 'open'">
<h5 t-if="team.fully_paid == False">
You need to renew your subscription and pay your invoices.
</h5>
</t>
</td>
<td>
<a t-attf-class="btn btn-primary" t-attf-href="/my/subscriptions/#{team.subscription_id.id}">
<h5 t-field="team.subscription_id.code"/>
</a>
</td>
</tr>
</t>
</table>
</div>
</div>
<div class="oe_structure"/>
</div>
</template>
<template id="not_published_any_team" name="Helpdesk Team">
<t t-call="website.layout">
<div class="oe_structure" id="oe_structure_odex25_website_helpdesk_not_published_any_team_1"/>
@ -112,29 +10,8 @@
<div class="navbar-brand">Helpdesk</div>
</div>
</div>
<div t-if="not (teams_not_subscribed or teams_appended)">
<p class="pl-4">There is no Helpdesk Subscription to show.</p>
<p class="pl-4">There is no public Helpdesk team to show.</p>
<div class="oe_structure"/>
</div>
<div t-if="teams_not_subscribed">
<t t-call="odex25_website_helpdesk.not_subscribed_teams"/>
<br></br>
<br></br>
<div class="oe_structure"/>
<br></br>
<br></br>
</div>
<div t-if="teams_appended">
<t t-call="odex25_website_helpdesk.teams_sub_appended"/>
<br></br>
<br></br>
<div class="oe_structure"/>
<br></br>
<br></br>
</div>
</div>
<div class="oe_structure" id="oe_structure_odex25_website_helpdesk_not_published_any_team_2"/>
</t>
@ -175,49 +52,11 @@
</div>
<div class="col-md-9 pl-4">
<!-- placeholder -->
<div class="card-body">
<h1><span t-field="team.name"/></h1>
</div>
<div id="odex25_website_helpdesk_form"/>
<br></br>
<div t-if="not team.submit_request and team.sudo().request_tickets_no == team.sudo().request_count" class="alert alert-danger">
<p>Your qouta for tickets submission is exceeded for this day.</p>
</div>
<div class="alert alert-info">
<table class="table borderless" style="width:100%;">
<tr style="font-weight:bold;">
<td>
Tickets Qouta
</td>
<td>
Submited Tickets
</td>
<td>
Remined Tickets
</td>
</tr>
<tr style="font-weight:bold;">
<td>
<h5 t-field="team.sudo().request_tickets_no"/>
</td>
<td>
<h5 t-field="team.sudo().request_count"/>
</td>
<td>
<h5 t-field="team.sudo().remine_tickets_no"/>
</td>
</tr>
</table>
</div>
</div>
<div class="col-md-3" id="right-column">
<div class="oe_structure" id="oe_structure_odex25_website_helpdesk_team_2"/>
<div class="row justify-content-end mb-5" id="website_published_button" groups="odex25_helpdesk.group_helpdesk_manager">
<div class="row justify-content-end mb-5" id="website_published_button" groups="odex25_helpdesk.group_odex25_helpdesk_manager">
<t t-call="website.publish_management">
<t t-set="object" t-value="team"/>
<t t-set="publish_edit" t-value="True"/>
@ -237,21 +76,14 @@
</t>
</div>
<t t-if="team.name">
<t t-if="team.description">
<div class="card bg-secondary mt-2" id="about_team">
<h6 class="card-header"><b>Current Support</b></h6>
<h6 class="card-header"><b>About our team</b></h6>
<div class="card-body">
<span t-field="team.name"/>
<br></br>
<span t-field="team.description"/>
</div>
</div>
</t>
<div t-if="teams_not_subscribed">
<t t-call="odex25_website_helpdesk.not_subscribed_teams"/>
</div>
<div class="oe_structure" id="oe_structure_odex25_website_helpdesk_team_3"/>
</div>
</div>

View File

@ -1,389 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- For Error -->
<template id="error_support_account" name="Error Occurred">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-12 mt-5">
<div class="card card-bordered max-width-480 min-height-320 m-auto">
<div class="card-body m-auto">
<div class="col-md-12 text-center">
<h3>Sorry, An Error Occurred</h3>
<i class="mt-3 fa fa-times-circle-o fa-6x text-danger"></i>
</div>
<div class="col-md-12 text-center">
<t t-if="error">
<div class="alert alert-danger">
<span t-esc="error"/>
</div>
</t>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- For Success -->
<template id="success_support_account" name="Registration Successful">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-12 mt-5">
<div class="card card-bordered max-width-480 min-height-320 m-auto">
<div class="card-body m-auto">
<div class="col-md-12 text-center">
<h3>Customer Support Account</h3>
<i class="mt-3 fa fa-check-circle-o fa-6x text-success"></i>
</div>
<div class="col-md-12 text-center">
<br></br>
<p> Your support account has successfully created. You can sign-in to your account now.</p>
<div class="col-md-12 text-center link-message">
<a class="fa fa-sign-in" href="/web/login">
<span>Sign-in</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- For create_support_account -->
<template id="support_account_form" name="Support Account">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-lg-12 mt-5">
<div class="shadow-lg p-3 card">
<!-- create_support_account Form -->
<div class="col-12 mt-5">
<div class="card min-height-320 m-auto">
<div class="card-body">
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="name">
<div class="col-xs-4">
<span t-esc="name"/>
</div>
</div>
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="description">
<div class="col-xs-4">
<span t-esc="description"/>
</div>
</div>
<form class="row mr-0 ml-0" action="/helpdesk/create_support_account"
method="post" enctype="multipart/form-data" id="create_support_account_form">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<input name="ref_id" type="hidden"
t-att-value="obj_id"/>
<input name="ref_email" type="hidden"
t-att-value="obj_email"/>
<input name="fullname" type="hidden"
t-att-value="obj_name"/>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<h5>Your Subscription Plan</h5>
<div t-if="is_sub == False">
<div class="form-group">
<label for="recurrency" class="control-label">Plan</label>
<select style="height: 50px; overflow: scroll;" required="required" id="recurrency" name="recurrency" class="form-control">
<option value="">Choose...</option>
<t t-foreach="recurrency_list" t-as="rec">
<option t-att-value="rec[0]">
<t t-esc="rec[1]" t-att-value="rec[0]"/>
</option>
</t>
</select>
</div>
<div class="form-group">
<label for="month_num"
class="col-form-label">Month Number
</label>
<input class="form-control" type="text" name="month_num"
required="required"
value="" id="month_num"/>
</div>
<div class="form-group">
<label for="date_start" class="control-label">From Date</label>
<input name="date_start" type="date"
t-att-value="datetime.datetime.now().date()"
id="date_start" class="form-control"
required="required" />
</div>
<div id="plan_info"></div>
<div id="error_msg"></div>
<input name="allow_submit" type="hidden" value="no" id="allow_submit"/>
</div>
<!-- If no subscription -->
<!-- If a subscription -->
<div t-if="is_sub == True">
<input name="sub_id" type="hidden"
t-att-value="subscription.id"/>
<div class="form-group">
<label for="sub_name"
class="col-form-label">Subscription
</label>
<input class="form-control" type="text" name="sub_name"
readonly="readonly"
t-att-value="subscription.display_name"
id="sub_name"/>
</div>
<div class="form-group">
<label for="month_num"
class="col-form-label">Month Number
</label>
<input class="form-control" type="text" name="month_num"
readonly="readonly"
t-att-value="subscription.month_num"
id="month_num"/>
</div>
<div class="form-group">
<label for="date_start" class="control-label">From Date</label>
<input name="date_start" type="date"
t-att-value="subscription.date_start"
id="date_start" class="form-control"
readonly="readonly" />
</div>
<div class="form-group">
<label for="date_end" class="control-label">To Date</label>
<input name="date_end" type="date"
t-att-value="subscription.date_end"
id="date_end" class="form-control"
readonly="readonly" />
</div>
<input name="allow_submit" type="hidden" value="yes" id="allow_submit"/>
</div>
<!-- End If a subscription -->
<hr></hr>
<h5>Your information</h5>
<div class="form-group">
<label for="username"
class="col-form-label">Email
</label>
<input class="form-control" type="text" name="username"
required="required"
value="" id="username"/>
</div>
<div class="form-group">
<label for="phone"
class="col-form-label">Phone
</label>
<input class="form-control" type="text" name="phone"
required="required"
value="" id="phone"/>
</div>
<div class="form-group">
<label for="password1"
class="col-form-label">Password
</label>
<input class="form-control" type="password" name="password1"
autocomplete="off"
required="required"
value="" id="password1"/>
</div>
<div class="form-group">
<label for="password2"
class="col-form-label">Confirm Password
</label>
<input class="form-control" type="password" name="password2"
autocomplete="off"
required="required"
value="" id="password2"/>
</div>
<div class="input-group justify-content-center">
<button
class="btn btn-success btn-md btn-submit">Submit
</button>
</div>
<!-- Submit -->
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- For create_support_subscription -->
<template id="support_subscription_form" name="Support Subscription">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-lg-12 mt-5">
<div class="shadow-lg p-3 card">
<!-- create_support_subscription Form -->
<div class="col-12 mt-5">
<div class="card min-height-320 m-auto">
<div class="card-body">
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="name">
<div class="col-xs-4">
<span t-esc="name"/>
</div>
</div>
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="description">
<div class="col-xs-4">
<span t-esc="description"/>
</div>
</div>
<form class="row mr-0 ml-0" action="/helpdesk/create_support_subscription"
method="post" enctype="multipart/form-data" id="create_support_subscription_form">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<input name="ref_id" type="hidden"
t-att-value="obj_id"/>
<input name="ref_email" type="hidden"
t-att-value="obj_email"/>
<input name="fullname" type="hidden"
t-att-value="obj_name"/>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<h5>Your Subscription Plan</h5>
<div t-if="not subscription">
<div class="form-group">
<label for="recurrency" class="control-label">Plan</label>
<select style="height: 50px; overflow: scroll;" required="required" id="recurrency" name="recurrency" class="form-control">
<option value="">Choose...</option>
<t t-foreach="recurrency_list" t-as="rec">
<option t-att-value="rec[0]">
<t t-esc="rec[1]" t-att-value="rec[0]"/>
</option>
</t>
</select>
</div>
<div class="form-group">
<label for="month_num"
class="col-form-label">Month Number
</label>
<input class="form-control" type="text" name="month_num"
required="required"
value="" id="month_num"/>
</div>
<div class="form-group">
<label for="date_start" class="control-label">From Date</label>
<input name="date_start" type="date"
t-att-value="datetime.datetime.now().date()"
id="date_start" class="form-control"
required="required" />
</div>
<div id="plan_info"></div>
<div id="error_msg"></div>
<input name="allow_submit" type="hidden" value="no" id="allow_submit"/>
</div>
<!-- If no subscription -->
<!-- If a subscription -->
<div t-if="subscription">
<input name="sub_id" type="hidden"
t-att-value="subscription.id"/>
<div class="form-group">
<label for="sub_name"
class="col-form-label">Subscription
</label>
<input class="form-control" type="text" name="sub_name"
readonly="readonly"
t-att-value="subscription.display_name"
id="sub_name"/>
</div>
<div class="form-group">
<label for="month_num"
class="col-form-label">Month Number
</label>
<input class="form-control" type="text" name="month_num"
readonly="readonly"
t-att-value="subscription.month_num"
id="month_num"/>
</div>
<div class="form-group">
<label for="date_start" class="control-label">From Date</label>
<input name="date_start" type="date"
t-att-value="subscription.date_start"
id="date_start" class="form-control"
readonly="readonly" />
</div>
<div class="form-group">
<label for="date_end" class="control-label">To Date</label>
<input name="date_end" type="date"
t-att-value="subscription.date_end"
id="date_end" class="form-control"
readonly="readonly" />
</div>
<input name="allow_submit" type="hidden" value="yes" id="allow_submit"/>
</div>
<!-- End If a subscription -->
<div class="input-group justify-content-center">
<button
class="btn btn-success btn-md btn-submit">Submit
</button>
</div>
<!-- Submit -->
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
</odoo>

View File

@ -1,240 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- For Error -->
<template id="error_support_account" name="Error Occurred">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-12 mt-5">
<div class="card card-bordered max-width-480 min-height-320 m-auto">
<div class="card-body m-auto">
<div class="col-md-12 text-center">
<h3>Sorry, An Error Occurred</h3>
<i class="mt-3 fa fa-times-circle-o fa-6x text-danger"></i>
</div>
<div class="col-md-12 text-center">
<t t-if="error">
<div class="alert alert-danger">
<span t-esc="error"/>
</div>
</t>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- For Success -->
<template id="success_support_account" name="Registration Successful">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-12 mt-5">
<div class="card card-bordered max-width-480 min-height-320 m-auto">
<div class="card-body m-auto">
<div class="col-md-12 text-center">
<h3>Customer Support Account</h3>
<i class="mt-3 fa fa-check-circle-o fa-6x text-success"></i>
</div>
<div class="col-md-12 text-center">
<br></br>
<p> Your support account has successfully created. You can sign-in to your account now.</p>
<div class="col-md-12 text-center link-message">
<a class="fa fa-sign-in" href="/web/login">
<span>Sign-in</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<!-- For create_support_account -->
<template id="support_account_form" name="Support Account">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="col-lg-12 mt-5">
<div class="shadow-lg p-3 card">
<!-- create_support_account Form -->
<div class="col-12 mt-5">
<div class="card min-height-320 m-auto">
<div class="card-body">
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="name">
<div class="col-xs-4">
<span t-esc="name"/>
</div>
</div>
<div class="row input-group m-1 mt-3 d-flex justify-content-center"
t-if="description">
<div class="col-xs-4">
<span t-esc="description"/>
</div>
</div>
<form class="row mr-0 ml-0" action="/helpdesk/create_support_account"
method="post" enctype="multipart/form-data">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<input name="ref_id" type="hidden"
t-att-value="obj_id"/>
<input name="ref_email" type="hidden"
t-att-value="obj_email"/>
<input name="fullname" type="hidden"
t-att-value="obj_name"/>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<!-- <div t-if="docs" class="form-group">
<h5 class="mb-4 mt-1">Our Subscription Plans</h5>
<t t-foreach="docs" t-as="o">
<table border="1" style="width:100%;">
<tr style="font-weight:bold;">
<td>
Plan: <h5 t-field="o.name"/>
</td>
<td>
Price: <h5 t-field="o.amount"/>
</td>
<td>
Tax Amount: <h5 t-field="o.tax_amount"/>
</td>
<td>
Total Price: <h5 t-field="o.total_amount"/>
</td>
</tr>
</table>
</t>
</div> -->
<h5 class="mb-4 mt-1">Your Subscription Plan</h5>
<div class="form-group">
<label for="recurrency" class="control-label">Subscription Plan</label>
<select style="height: 50px; overflow: scroll;" required="required" id="recurrency" name="recurrency" class="form-control">
<option value="">Choose...</option>
<t t-foreach="recurrency_list" t-as="rec">
<option t-att-value="rec[0]">
<t t-esc="rec[1]" t-att-value="rec[0]"/>
</option>
</t>
</select>
</div>
<div class="form-group">
<label for="date_start" class="control-label">From Date</label>
<input name="date_start" type="date"
t-att-value="datetime.datetime.now().date()"
id="date_start" class="form-control"
required="required" />
</div>
<div class="form-group">
<label for="date_end" class="control-label">To Date</label>
<input name="date_end" type="date"
t-att-value="datetime.datetime.now().date()"
id="date_end" class="form-control"
required="required" />
</div>
<div id="plan_info"></div>
<div id="error_msg"></div>
<h5 class="mb-4 mt-1">Your information</h5>
<div class="form-group">
<label for="username"
class="col-form-label">Email
</label>
<input class="form-control" type="text" name="username"
required="required"
value="" id="username"/>
</div>
<div class="form-group">
<label for="phone"
class="col-form-label">Phone
</label>
<input class="form-control" type="text" name="phone"
required="required"
value="" id="phone"/>
</div>
<div class="form-group">
<label for="password1"
class="col-form-label">Password
</label>
<input class="form-control" type="password" name="password1"
autocomplete="off"
required="required"
value="" id="password1"/>
</div>
<div class="form-group">
<label for="password2"
class="col-form-label">Confirm Password
</label>
<input class="form-control" type="password" name="password2"
autocomplete="off"
required="required"
value="" id="password2"/>
</div>
<div class="input-group justify-content-center">
<button
class="btn btn-success btn-md btn-submit">Submit
</button>
</div>
<!-- Submit -->
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<p> Welcome to HTTP Request and Response Page</p>
<form target="_self" action="" method="post" id="test_form">
Value of A: <input type="text" name="num_a" id="num_A"/><br/>
Value of B: <input type="text" name="num_b" id="num_B"/><br/>
Total Value: <input type="text" name="total" id="total" readonly="True"/><br/>
Gender: <select id="gender" name="gender">
<option value="" selected="1" disabled="1" hidden="1">Select Gender</option><option value="male">Male</option> <option value="female">Female</option> </select><br></br>
<br></br> Amount: <input type="text" id="amount" name="amount"/><br></br>
<button type="button" name="calculate" id="calculate">
Calculate
</button>
</form>
</t>
</template>
</odoo>