mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[REM] helpdesk_rma: available in professional
H14528
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
from . import models
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
'name': 'Helpdesk RMA',
|
|
||||||
'summary': 'Adds RMA functionality to the Helpdesk App',
|
|
||||||
'version': '15.0.1.0.0',
|
|
||||||
'author': "Hibou Corp.",
|
|
||||||
'category': 'Helpdesk',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'images': [],
|
|
||||||
'website': "https://hibou.io",
|
|
||||||
'description': "Adds functionality to the Helpdesk App",
|
|
||||||
'depends': [
|
|
||||||
'helpdesk',
|
|
||||||
'rma',
|
|
||||||
],
|
|
||||||
'demo': [],
|
|
||||||
'data': [
|
|
||||||
'views/helpdesk_views.xml',
|
|
||||||
],
|
|
||||||
'auto_install': False,
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * helpdesk_rma
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 15.0+e\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2021-10-12 01:21+0000\n"
|
|
||||||
"PO-Revision-Date: 2021-10-12 01:21+0000\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: helpdesk_rma
|
|
||||||
#: model:ir.model,name:helpdesk_rma.model_helpdesk_ticket
|
|
||||||
msgid "Helpdesk Ticket"
|
|
||||||
msgstr "Ticket de Servicio de Asistencia"
|
|
||||||
|
|
||||||
#. module: helpdesk_rma
|
|
||||||
#: model_terms:ir.ui.view,arch_db:helpdesk_rma.helpdesk_ticket_view_form_inherit
|
|
||||||
msgid "RMAs"
|
|
||||||
msgstr "RMAs"
|
|
||||||
|
|
||||||
#. module: helpdesk_rma
|
|
||||||
#: model:ir.model.fields,field_description:helpdesk_rma.field_helpdesk_ticket__rma_count
|
|
||||||
msgid "Rma Count"
|
|
||||||
msgstr "Recuento de RMAs"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import helpdesk
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from odoo import api, models, fields
|
|
||||||
|
|
||||||
from logging import getLogger
|
|
||||||
_logger = getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class Ticket(models.Model):
|
|
||||||
_inherit = 'helpdesk.ticket'
|
|
||||||
|
|
||||||
rma_count = fields.Integer(compute='_compute_rma_count')
|
|
||||||
|
|
||||||
def _compute_rma_count(self):
|
|
||||||
for ticket in self:
|
|
||||||
if ticket.partner_id:
|
|
||||||
ticket.rma_count = self.env['rma.rma'].search_count([('partner_id', 'child_of', ticket.partner_id.id)])
|
|
||||||
else:
|
|
||||||
ticket.rma_count = 0
|
|
||||||
|
|
||||||
def action_partner_rma(self):
|
|
||||||
self.ensure_one()
|
|
||||||
action = self.env.ref('rma.action_rma_rma').read()[0]
|
|
||||||
|
|
||||||
action['context'] = {
|
|
||||||
'search_default_partner_id': self.partner_id.id,
|
|
||||||
}
|
|
||||||
return action
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
from . import test_helpdesk
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
from odoo.tests import common
|
|
||||||
|
|
||||||
|
|
||||||
class TestHelpdesk(common.TransactionCase):
|
|
||||||
|
|
||||||
# We need to test Stage, Ticket, Server, and Filter Classes
|
|
||||||
# We created a couple fields per model and a couple methods
|
|
||||||
# for our functionality implementation
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_helpdesk_filter(self):
|
|
||||||
pass
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<!-- Helpdesk Ticket -->
|
|
||||||
<record id="helpdesk_ticket_view_form_inherit" model="ir.ui.view">
|
|
||||||
<field name="name">helpdesk.ticket.form.inherit</field>
|
|
||||||
<field name="model">helpdesk.ticket</field>
|
|
||||||
<field name="inherit_id" ref="helpdesk.helpdesk_ticket_view_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//button[@name='action_open_helpdesk_ticket']" position="after">
|
|
||||||
<button class="oe_stat_button" type="object" name="action_partner_rma"
|
|
||||||
context="{'search_default_partner_id': partner_id, 'default_partner_id': partner_id}"
|
|
||||||
attrs="{'invisible': [('partner_id', '=', False)]}"
|
|
||||||
icon="fa-cubes">
|
|
||||||
<field string="RMAs" name="rma_count" widget="statinfo"/>
|
|
||||||
</button>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
Reference in New Issue
Block a user