diff --git a/odex25_helpdesk/odex25_helpdesk/data/digest_data.xml b/odex25_helpdesk/odex25_helpdesk/data/digest_data.xml deleted file mode 100644 index 171c8292e..000000000 --- a/odex25_helpdesk/odex25_helpdesk/data/digest_data.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - True - - - - - - Tip: Create tickets from incoming emails - 1800 - - -
- % set record = object.env['odex25_helpdesk.team'].search([('alias_name', '!=', False)],limit=1) - Tip: Create tickets from incoming emails - % if record and record.alias_domain -

Emails sent to ${record.alias_id.display_name} generate tickets in your pipeline.

- % else -

Emails sent to a Helpdesk Team alias generate tickets in your pipeline.

- % endif -
-
-
-
-
diff --git a/odex25_helpdesk/odex25_website_helpdesk/__manifest__.py b/odex25_helpdesk/odex25_website_helpdesk/__manifest__.py index a9d3fceca..11b93e800 100644 --- a/odex25_helpdesk/odex25_website_helpdesk/__manifest__.py +++ b/odex25_helpdesk/odex25_website_helpdesk/__manifest__.py @@ -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', ], diff --git a/odex25_helpdesk/odex25_website_helpdesk/controllers/main.py b/odex25_helpdesk/odex25_website_helpdesk/controllers/main.py index 3609ac497..bc04d0ace 100644 --- a/odex25_helpdesk/odex25_website_helpdesk/controllers/main.py +++ b/odex25_helpdesk/odex25_website_helpdesk/controllers/main.py @@ -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/'], 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/'], 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') diff --git a/odex25_helpdesk/odex25_website_helpdesk/i18n/ar_001.po b/odex25_helpdesk/odex25_website_helpdesk/i18n/ar_001.po deleted file mode 100644 index 299cd7063..000000000 --- a/odex25_helpdesk/odex25_website_helpdesk/i18n/ar_001.po +++ /dev/null @@ -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 "Current Support" -msgstr "الدعم الحالي" - -#. module: odex25_website_helpdesk -#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.teams_sub_appended -msgid "Your projects subcriptions" -msgstr "مشاريعك المرتبطة بإشتراكات دعم فني " - -#. module: odex25_website_helpdesk -#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.not_subscribed_teams -msgid "Your projects that need a subcription" -msgstr "مشاريعك التي بحاجة إلي إشتراك دعم فني " - -#. module: odex25_website_helpdesk -#: model_terms:ir.ui.view,arch_db:odex25_website_helpdesk.success_support_account -msgid "Sign-in" -msgstr "تسجيل الدخول" - -#. 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 "شهور." diff --git a/odex25_helpdesk/odex25_website_helpdesk/models/__init__.py b/odex25_helpdesk/odex25_website_helpdesk/models/__init__.py index a2f6a40df..21116d749 100644 --- a/odex25_helpdesk/odex25_website_helpdesk/models/__init__.py +++ b/odex25_helpdesk/odex25_website_helpdesk/models/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- -from . import res_users + from . import helpdesk from . import website diff --git a/odex25_helpdesk/odex25_website_helpdesk/models/helpdesk.py b/odex25_helpdesk/odex25_website_helpdesk/models/helpdesk.py index 83e52de79..9b74b01db 100644 --- a/odex25_helpdesk/odex25_website_helpdesk/models/helpdesk.py +++ b/odex25_helpdesk/odex25_website_helpdesk/models/helpdesk.py @@ -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: diff --git a/odex25_helpdesk/odex25_website_helpdesk/models/res_users.py b/odex25_helpdesk/odex25_website_helpdesk/models/res_users.py deleted file mode 100644 index ea9a3ab7f..000000000 --- a/odex25_helpdesk/odex25_website_helpdesk/models/res_users.py +++ /dev/null @@ -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) - diff --git a/odex25_helpdesk/odex25_website_helpdesk/views/helpdesk_templates.xml b/odex25_helpdesk/odex25_website_helpdesk/views/helpdesk_templates.xml index 0497cd21c..07d62550c 100644 --- a/odex25_helpdesk/odex25_website_helpdesk/views/helpdesk_templates.xml +++ b/odex25_helpdesk/odex25_website_helpdesk/views/helpdesk_templates.xml @@ -1,108 +1,6 @@ - - - -