@ -0,0 +1,20 @@ |
|||||
|
POS Claims v9 |
||||
|
============= |
||||
|
|
||||
|
This application allows you to track your customers/vendors pos claims and grievances. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
Just select it from available modules to install it, there is no need to extra installations. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
Nothing to configure. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
Developers: Jesni Banu & Saritha |
||||
|
Guidance: Nilmar Shereef @ cybrosys, shereef@cybrosys.in |
||||
|
|
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies (<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies (<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
{ |
||||
|
'name': "POS Claims", |
||||
|
'version': '9.0.1.0.0', |
||||
|
'summary': """Manage your customer claims""", |
||||
|
'description': """ This application allows you to manage your customers claims.""", |
||||
|
'category': 'Point of sale', |
||||
|
'author': "Cybrosys Techno Solutions", |
||||
|
'website': "http://www.cybrosys.com", |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'depends': ['base', 'point_of_sale'], |
||||
|
'data': ['views/pos_claims_views.xml', 'views/pos_claims_popup.xml', 'views/pos_claim_sequence.xml'], |
||||
|
'qweb': ['static/src/xml/pos_claim.xml'], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies (<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
from . import pos_claim |
@ -0,0 +1,165 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies (<http://www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from openerp import SUPERUSER_ID |
||||
|
from openerp import models, fields, api, _ |
||||
|
|
||||
|
|
||||
|
class PosClaims(models.Model): |
||||
|
_name = 'pos.claims' |
||||
|
_description = "Claim" |
||||
|
_inherit = ['mail.thread'] |
||||
|
|
||||
|
name = fields.Many2one('pos.order', string='Claim Order', required=True) |
||||
|
ref_name = fields.Char(string="Claim Ticket", readonly=True, default=lambda self: _('New')) |
||||
|
claim_product = fields.Many2one('pos.order.line', string="Product", |
||||
|
domain="[('order_id', '=',name)]", required=True) |
||||
|
claim_qty = fields.Integer(string="Quantity") |
||||
|
claim_date = fields.Datetime(string='Claim Date', default=fields.Datetime.now, required=True) |
||||
|
session_id = fields.Many2one('pos.session', string='Session', related='name.session_id') |
||||
|
user_id = fields.Many2one('res.users', string="Assigned Person") |
||||
|
priority = fields.Selection([('0', 'Low'), ('1', 'Normal'), ('2', 'High')], 'Priority') |
||||
|
partner_id = fields.Many2one('res.partner', string='Partner', required=1) |
||||
|
partner_phone = fields.Char(string='Phone') |
||||
|
partner_email = fields.Char(string='Email', related='partner_id.email') |
||||
|
description = fields.Text(string='Description') |
||||
|
user_fault = fields.Char(string='Trouble Responsible') |
||||
|
cate_id = fields.Selection([('0', 'Factual Claims'), ('1', 'Value Claims'), ('2', 'Policy Claim')], 'Category Id', |
||||
|
) |
||||
|
date_action_next = fields.Datetime(string='Next Action Date') |
||||
|
action_next = fields.Char(string='Next Action') |
||||
|
resolution = fields.Text(string='Resolution') |
||||
|
cause = fields.Text(string='Root Cause') |
||||
|
type_action = fields.Selection([('correction', 'Corrective Action'), |
||||
|
('prevention', 'Preventive Action')], 'Action Type') |
||||
|
date_closed = fields.Datetime('Closed') |
||||
|
state = fields.Selection([ |
||||
|
('new', 'New'), |
||||
|
('assigned', 'Assigned'), |
||||
|
('feedback', 'Feedback'), |
||||
|
('paid', 'Paid'), |
||||
|
('settle', 'Settled'), |
||||
|
('reject', 'Rejected'), |
||||
|
], default='new') |
||||
|
|
||||
|
def create_from_ui(self, cr, uid, claim, context=None): |
||||
|
""" create claims from the point of sale ui. """ |
||||
|
claim_id = self.create(cr, uid, claim, context=context) |
||||
|
return claim_id |
||||
|
|
||||
|
@api.model |
||||
|
def create(self, vals): |
||||
|
if vals.get('ref_name', 'New') == 'New': |
||||
|
vals['ref_name'] = self.env['ir.sequence'].next_by_code('pos.claims') or 'New' |
||||
|
|
||||
|
if vals.get('user_id'): |
||||
|
vals['state'] = 'assigned' |
||||
|
result = super(PosClaims, self).create(vals) |
||||
|
result.claim_ticket() |
||||
|
return result |
||||
|
|
||||
|
@api.multi |
||||
|
def write(self, vals): |
||||
|
if vals.get('user_id'): |
||||
|
vals['state'] = 'assigned' |
||||
|
result = super(PosClaims, self).write(vals) |
||||
|
return result |
||||
|
|
||||
|
@api.multi |
||||
|
def action_settle(self): |
||||
|
self.state = 'settle' |
||||
|
|
||||
|
@api.multi |
||||
|
def action_reject(self): |
||||
|
self.state = 'reject' |
||||
|
|
||||
|
@api.one |
||||
|
def claim_ticket(self): |
||||
|
su_id = self.env['res.partner'].browse(SUPERUSER_ID) |
||||
|
self.ensure_one() |
||||
|
ir_model_data = self.env['ir.model.data'] |
||||
|
try: |
||||
|
template_id = ir_model_data.get_object_reference('pos_claims', 'email_template_edi_pos_ticket')[1] |
||||
|
except ValueError: |
||||
|
template_id = False |
||||
|
email_template_obj = self.env['mail.template'].browse(template_id) |
||||
|
if template_id: |
||||
|
values = email_template_obj.generate_email(self.id, fields=None) |
||||
|
values['email_from'] = su_id.email |
||||
|
values['email_to'] = self.partner_id.email |
||||
|
values['res_id'] = False |
||||
|
mail_mail_obj = self.env['mail.mail'] |
||||
|
msg_id = mail_mail_obj.create(values) |
||||
|
if msg_id: |
||||
|
msg_id.send() |
||||
|
|
||||
|
@api.multi |
||||
|
def action_sent(self): |
||||
|
self.ensure_one() |
||||
|
ir_model_data = self.env['ir.model.data'] |
||||
|
try: |
||||
|
template_id = ir_model_data.get_object_reference('pos_claims', 'email_template_edi_pos_claims')[1] |
||||
|
except ValueError: |
||||
|
template_id = False |
||||
|
try: |
||||
|
compose_form_id = ir_model_data.get_object_reference('mail', 'email_compose_message_wizard_form')[1] |
||||
|
except ValueError: |
||||
|
compose_form_id = False |
||||
|
ctx = dict() |
||||
|
ctx.update({ |
||||
|
'default_model': 'pos.claims', |
||||
|
'default_res_id': self.ids[0], |
||||
|
'default_use_template': bool(template_id), |
||||
|
'default_template_id': template_id, |
||||
|
'default_composition_mode': 'comment', |
||||
|
}) |
||||
|
return { |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'view_type': 'form', |
||||
|
'view_mode': 'form', |
||||
|
'res_model': 'mail.compose.message', |
||||
|
'views': [(compose_form_id, 'form')], |
||||
|
'view_id': compose_form_id, |
||||
|
'target': 'new', |
||||
|
'context': ctx, |
||||
|
} |
||||
|
|
||||
|
|
||||
|
class MailComposeMessage(models.TransientModel): |
||||
|
_inherit = 'mail.compose.message' |
||||
|
|
||||
|
@api.multi |
||||
|
def send_mail(self, auto_commit=False): |
||||
|
if self._context.get('default_model') == 'pos.claims' and self._context.get('default_res_id'): |
||||
|
order = self.env['pos.claims'].browse([self._context['default_res_id']]) |
||||
|
if order.state == 'assigned': |
||||
|
order.state = 'feedback' |
||||
|
order.sent = True |
||||
|
self = self.with_context(mail_post_autofollow=True) |
||||
|
return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit) |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,114 @@ |
|||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h2 class="oe_slogan">POS Claims</h2> |
||||
|
<h3 class="oe_slogan">Manage Customer Claims</h3> |
||||
|
<h4 class="oe_slogan">Cybrosys Technologies , www.cybrosys.com</h4> |
||||
|
<div> |
||||
|
<h4><p>Features:</p></h4> |
||||
|
<ul> |
||||
|
<div class="col-md-6"> |
||||
|
☀Easily create claims from POS interface.<br> |
||||
|
☀ Automatic stage changes for assignment of claims.<br> |
||||
|
☀ Email Notification.<br> |
||||
|
☀ Calender view.<br> |
||||
|
|
||||
|
</div> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<div class="oe_span12"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="pos_claims.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span12"> |
||||
|
<p class='oe_mt32'><center> |
||||
|
This application allows you to manage your customers claims. |
||||
|
</center></p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h3 class="oe_slogan">Create Claims</h3> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="interface_pos.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<p class='oe_mt32'> |
||||
|
Create claims easily from pos interface.Ticket is generated automatically and |
||||
|
it is send to corresponding user on creation of claims. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_space"> |
||||
|
<h3 class="oe_slogan"> Automatic Stage Change</h3> |
||||
|
<div class="oe_span6"> |
||||
|
<p class='oe_mt32'> |
||||
|
On assigning claim to responsible user,state of claim is changed. |
||||
|
</p> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="claim_state_change.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h3 class="oe_slogan">Email Notification</h3> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="email.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<p class='oe_mt32'> |
||||
|
An email is sent to corresponding customer |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_space"> |
||||
|
<h3 class="oe_slogan"> Calender view</h3> |
||||
|
<div class="oe_span6"> |
||||
|
<p class='oe_mt32'> |
||||
|
You can see all your next action on calender view |
||||
|
</p> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="calender.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h3 class="oe_slogan">View your claims</h3> |
||||
|
<div class="oe_span12"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<img src="claim.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 142 KiB |
@ -0,0 +1,184 @@ |
|||||
|
odoo.define('point_of_sale.pos_claims', function (require) { |
||||
|
"use strict"; |
||||
|
var chrome = require('point_of_sale.chrome'); |
||||
|
var db = require('point_of_sale.DB'); |
||||
|
var gui = require('point_of_sale.gui'); |
||||
|
var models = require('point_of_sale.models'); |
||||
|
var Model = require('web.DataModel'); |
||||
|
var popup = require('point_of_sale.popups'); |
||||
|
var Model = require('web.DataModel'); |
||||
|
var core = require('web.core'); |
||||
|
var QWeb = core.qweb; |
||||
|
var _t = core._t; |
||||
|
|
||||
|
models.load_models({ |
||||
|
model: 'pos.order', |
||||
|
fields: ['name', 'lines', 'partner_id'], |
||||
|
loaded: function(self,claim_orders){ |
||||
|
self.order = []; |
||||
|
for (var i = 0; i < claim_orders.length; i++) { |
||||
|
self.order[i] = claim_orders[i]; |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
models.load_models({ |
||||
|
model: 'res.partner', |
||||
|
fields: ['name', 'id', 'email'], |
||||
|
loaded: function(self,claim_customers){ |
||||
|
self.customer = []; |
||||
|
for (var i = 0; i < claim_customers.length; i++) { |
||||
|
self.customer[i] = claim_customers[i]; |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
models.load_models({ |
||||
|
model: 'pos.order.line', |
||||
|
fields: ['product_id','qty'], |
||||
|
loaded: function(self,claim_products){ |
||||
|
self.order_line = []; |
||||
|
for (var i = 0; i < claim_products.length; i++) { |
||||
|
self.order_line[i] = claim_products[i]; |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
chrome.Chrome.include({ |
||||
|
events: { |
||||
|
"click .pos-claims": "on_click_pos_claims", |
||||
|
}, |
||||
|
renderElement: function(){ |
||||
|
var self = this; |
||||
|
return this._super(); |
||||
|
}, |
||||
|
on_click_pos_claims: function () { |
||||
|
var list =[]; |
||||
|
var list1 =[]; |
||||
|
for (var i = 0; i < this.pos.order.length; i++) { |
||||
|
var orders = this.pos.order[i]; |
||||
|
if (orders.name){ |
||||
|
list.push({ |
||||
|
'label': orders.name, |
||||
|
'id':orders.id, |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
for (var i = 0; i < this.pos.customer.length; i++) { |
||||
|
var customers = this.pos.customer[i]; |
||||
|
if (customers.name){ |
||||
|
list1.push({ |
||||
|
'label': customers.name, |
||||
|
'id':customers.id, |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
this.gui.show_popup('pos_claim',{orders:list, customers:list1}); |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
var PosClaimWidget = popup.extend({ |
||||
|
template:'PosClaimWidget', |
||||
|
events : { |
||||
|
'click .selected_order': 'on_click_select_order', |
||||
|
'click .selected_customer': 'on_click_select_customer', |
||||
|
'click .button.confirm': 'click_confirm', |
||||
|
'click .button.cancel': 'click_cancel', |
||||
|
}, |
||||
|
show : function(options){ |
||||
|
options = options || []; |
||||
|
var self = this; |
||||
|
this._super(options); |
||||
|
this.orders = options.orders || []; |
||||
|
this.customers = options.customers || []; |
||||
|
this.product = options.product || []; |
||||
|
this.renderElement(); |
||||
|
}, |
||||
|
|
||||
|
on_click_select_order:function(){ |
||||
|
var selected_order = $('.selected_order').val(); |
||||
|
for (var i = 0; i < this.pos.order.length; i++) { |
||||
|
if (this.pos.order[i].id==selected_order){ |
||||
|
var orders = this.pos.order[i]; |
||||
|
} |
||||
|
} |
||||
|
if (orders) { |
||||
|
var x = document.getElementsByClassName('selected_customer'); |
||||
|
x[0].selectedIndex = orders.partner_id[0]; |
||||
|
if (orders.partner_id) |
||||
|
{ |
||||
|
for (var i = 0; i < this.pos.customer.length; i++) { |
||||
|
if (this.pos.customer[i].id==orders.partner_id[0]){ |
||||
|
var customers = this.pos.customer[i]; |
||||
|
} |
||||
|
} |
||||
|
if (customers) |
||||
|
{ |
||||
|
var x = document.getElementsByClassName('select_email'); |
||||
|
x[0].value = customers.email; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var product = []; |
||||
|
if (orders) |
||||
|
{ |
||||
|
for (var i = 0; i < this.pos.order_line.length; i++){ |
||||
|
for (var j = 0; j < orders.lines.length; j++){ |
||||
|
if (this.pos.order_line[i].id == orders.lines[j]){ |
||||
|
var product_line = this.pos.order_line[i]; |
||||
|
if (product_line.product_id){ |
||||
|
product.push({ |
||||
|
'label': product_line.product_id[1], |
||||
|
'id':product_line.id, |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
this.$('.selected_product').html(QWeb.render('PosClaimProductWidget',{product:product})); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
on_click_select_customer:function() { |
||||
|
var selected_customer = $('.selected_customer').val(); |
||||
|
for (var i = 0; i < this.pos.customer.length; i++) { |
||||
|
if (this.pos.customer[i].id==selected_customer){ |
||||
|
var customers = this.pos.customer[i]; |
||||
|
} |
||||
|
} |
||||
|
if (customers) |
||||
|
{ |
||||
|
var x = document.getElementsByClassName('select_email'); |
||||
|
x[0].value = customers.email; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
click_confirm: function(){ |
||||
|
var self = this; |
||||
|
var fields = {}; |
||||
|
this.$('.popup .detail').each(function(idx,el){ |
||||
|
fields[el.name] = el.value; |
||||
|
}); |
||||
|
if (fields.partner_id && fields.claim_product) { |
||||
|
new Model('pos.claims').call('create_from_ui', [fields]); |
||||
|
this.gui.close_popup(); |
||||
|
} |
||||
|
else{ |
||||
|
alert('You need to specify the Product and Customer') |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
click_cancel: function(){ |
||||
|
this.gui.close_popup(); |
||||
|
if (this.options.cancel) { |
||||
|
this.options.cancel.call(this); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
renderElement: function(){ |
||||
|
var self = this; |
||||
|
return this._super(); |
||||
|
}, |
||||
|
}); |
||||
|
gui.define_popup({name:'pos_claim', widget: PosClaimWidget}); |
||||
|
}); |
@ -0,0 +1,105 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<template id="template" xml:space="preserve"> |
||||
|
<t t-extend="Chrome"> |
||||
|
<t t-jquery="div.pos-rightheader" t-operation="append"> |
||||
|
<div class="oe_status"> |
||||
|
<a title="Claims" href="#"> |
||||
|
<i class="fa fa-exclamation-triangle pos-claims"/> |
||||
|
</a> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
|
||||
|
<t t-name="PosClaimWidget"> |
||||
|
<div class="modal-dialog"> |
||||
|
<div class="popup popup-pos_claim"> |
||||
|
<p class="title"> |
||||
|
<a >Pos Claims</a> |
||||
|
</p> |
||||
|
<div style="text-align: left !important;padding-left: 70px;padding-top: 7px;border: solid;"> |
||||
|
<table> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<label>Select Order:</label> |
||||
|
</td> |
||||
|
<td style="padding-left: 21px;"> |
||||
|
<select class="selected_order detail" name="name"> |
||||
|
<option/> |
||||
|
<t t-foreach="widget.orders || []" t-as="orders"> |
||||
|
<option t-att-value="orders.id" t-attf-class="select_order"> |
||||
|
<t t-esc="orders.label" /> |
||||
|
</option> |
||||
|
</t> |
||||
|
</select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<label>Customer:</label> |
||||
|
</td> |
||||
|
<td style="padding-left: 21px;"> |
||||
|
<select class="selected_customer detail" name="partner_id"> |
||||
|
<option/> |
||||
|
<t t-foreach="widget.customers || []" t-as="customers"> |
||||
|
<option t-att-value="customers.id" t-attf-class="select_customer"> |
||||
|
<t t-esc="customers.label" /> |
||||
|
</option> |
||||
|
</t> |
||||
|
</select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<label>Email:</label> |
||||
|
</td> |
||||
|
<td style="padding-left: 21px;"> |
||||
|
<input type='text' class="select_email detail" name="partner_email"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<div class="selected_product" style="align:left;"> |
||||
|
</div> |
||||
|
<div class="selected_quantity" style="align:left;"> |
||||
|
</div> |
||||
|
<div class="footer centered"> |
||||
|
<div class="button cancel"> |
||||
|
Cancel |
||||
|
</div> |
||||
|
<div class="button confirm"> |
||||
|
Ok |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</t> |
||||
|
|
||||
|
<t t-name="PosClaimProductWidget"> |
||||
|
<table> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<label>Select Product:</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<select class="select_product detail" name="claim_product"> |
||||
|
<option/> |
||||
|
<t t-foreach="product || []" t-as="products"> |
||||
|
<option t-att-value="products.id" t-attf-class="select_pdt"> |
||||
|
<t t-esc="products.label" /> |
||||
|
</option> |
||||
|
</t> |
||||
|
</select> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<label>Description :</label> |
||||
|
</td> |
||||
|
<td> |
||||
|
<input type='text' class="select_description detail" name="description"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</t> |
||||
|
|
||||
|
</template> |
@ -0,0 +1,13 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
<record model="ir.sequence" id="seq_pos_claim"> |
||||
|
<field name="name">POS Claims</field> |
||||
|
<field name="code">pos.claims</field> |
||||
|
<field name="prefix">Ticket/</field> |
||||
|
<field name="number_next">001</field> |
||||
|
<field name="number_increment">1</field> |
||||
|
<field name="padding">3</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,10 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
<template id="pos_claims" inherit_id="point_of_sale.assets"> |
||||
|
<xpath expr="." position="inside"> |
||||
|
<script type="text/javascript" src="/pos_claims/static/src/js/pos_claim.js"/> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,218 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
|
||||
|
<openerp> |
||||
|
<data> |
||||
|
<!-- Form view of pos claim --> |
||||
|
<record id="pos_claim_category_form" model="ir.ui.view"> |
||||
|
<field name="name">Claims</field> |
||||
|
<field name="model">pos.claims</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="ClaimS"> |
||||
|
<header> |
||||
|
<button name="action_sent" |
||||
|
string="Send Mail" |
||||
|
type="object" |
||||
|
state="assigned" |
||||
|
class="oe_highlight" |
||||
|
context="{'send_rfq':True }" |
||||
|
attrs = "{'invisible': [('state', 'in', ('new','settle','feedback','paid','reject'))]}" /> |
||||
|
<button name="action_settle" |
||||
|
string="Accept" |
||||
|
type="object" |
||||
|
state="feedback" |
||||
|
class="oe_highlight" |
||||
|
attrs = "{'invisible': [('state', 'in', ('new','settle','paid','reject','assigned'))]}"/> |
||||
|
<button name="action_reject" |
||||
|
string="Cancel" |
||||
|
type="object" |
||||
|
state="feedback" |
||||
|
class="oe_highlight" |
||||
|
attrs = "{'invisible': [('state', 'in', ('new','settle','paid','reject','assigned'))]}"/> |
||||
|
<field name="state" |
||||
|
widget="statusbar" |
||||
|
statusbar_visible="new,assigned,feedback,settle,reject" clickable="1"/> |
||||
|
</header> |
||||
|
<sheet> |
||||
|
<div class="oe_title"> |
||||
|
<h1> |
||||
|
<field name="ref_name" readonly="1"/> |
||||
|
</h1> |
||||
|
</div> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="name" style="width:40%%" options="{'no_create': True}"/> |
||||
|
<field name="claim_date"/> |
||||
|
</group> |
||||
|
<group colspan="4" col="4"> |
||||
|
<field name="user_id" style="width:70%%"/> |
||||
|
<field name="priority" widget="priority"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
<notebook> |
||||
|
|
||||
|
<page string="Claim Description"> |
||||
|
<group> |
||||
|
<group> |
||||
|
<separator colspan="2" string="Product Details"/> |
||||
|
<field name="claim_product" style="width:60%%" options="{'no_create': True}"/> |
||||
|
<field name="claim_qty" style="width:60%%"/> |
||||
|
<field name="session_id" style="width:60%%"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
</group> |
||||
|
</group> |
||||
|
<group> |
||||
|
<group> |
||||
|
<separator colspan="2" string="Claim Reporter"/> |
||||
|
<field name="partner_id"/> |
||||
|
<field name="partner_phone"/> |
||||
|
<field name="partner_email"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
</group> |
||||
|
</group> |
||||
|
<group colspan="2" col="2"> |
||||
|
<separator colspan="2" string="Responsibilities"/> |
||||
|
<field name="user_fault"/> |
||||
|
<field name="cate_id" style="width:25%%" options="{'no_create': True, 'no_open': True}"/> |
||||
|
</group> |
||||
|
<separator colspan="4" string="Claim/Action Description" groups="base.group_user"/> |
||||
|
<field name="description" colspan="4" nolabel="1"/> |
||||
|
</page> |
||||
|
<page string="Follow Up" groups="base.group_user"> |
||||
|
<group colspan="2" col="2"> |
||||
|
<separator colspan="2" string="Actions"/> |
||||
|
<field name="date_action_next"/> |
||||
|
<field name="action_next"/> |
||||
|
</group> |
||||
|
<group colspan="2" col="2"> |
||||
|
<separator colspan="2" string="Root Causes"/> |
||||
|
<field name="cause" colspan="2" nolabel="1"/> |
||||
|
</group> |
||||
|
<group colspan="2" col="2"> |
||||
|
<separator colspan="2" string="Resolution Actions"/> |
||||
|
<field name="type_action" style="width:25%%"/> |
||||
|
<field name="resolution" colspan="2" nolabel="1" placeholder="Action Description..."/> |
||||
|
</group> |
||||
|
</page> |
||||
|
</notebook> |
||||
|
</sheet> |
||||
|
<div class="oe_chatter"> |
||||
|
<field name="message_follower_ids" widget="mail_followers"/> |
||||
|
<field name="message_ids" widget="mail_thread"/> |
||||
|
</div> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Tree view of pos claim --> |
||||
|
|
||||
|
<record model="ir.ui.view" id="pos_case_claims_tree_view"> |
||||
|
<field name="name">Claims</field> |
||||
|
<field name="model">pos.claims</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Claims"> |
||||
|
<field name="ref_name" string="Ticket Number"/> |
||||
|
<field name="name"/> |
||||
|
<field name="claim_product"/> |
||||
|
<field name="claim_qty"/> |
||||
|
<field name="partner_id"/> |
||||
|
<field name="session_id"/> |
||||
|
<field name="claim_date"/> |
||||
|
<field name="date_action_next"/> |
||||
|
<field name="action_next"/> |
||||
|
<field name="cate_id" string="Type"/> |
||||
|
<field name="state"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Calender view of pos claim --> |
||||
|
<record model="ir.ui.view" id="pos_case_claims_calendar_view"> |
||||
|
<field name="name">Claims</field> |
||||
|
<field name="model">pos.claims</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<calendar string="Claims" date_start="date_action_next" color="user_id"> |
||||
|
<field name="name"/> |
||||
|
</calendar> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="pos_claim_cate_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Claims</field> |
||||
|
<field name="res_model">pos.claims</field> |
||||
|
<field name="view_mode">tree,form,calendar</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="oe_view_nocontent_create"> |
||||
|
Click to create a claim category. |
||||
|
</p><p> |
||||
|
Create claim categories to better manage and classify your |
||||
|
claims. Some example of claims can be: preventive action, |
||||
|
corrective action. |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!--Email template --> |
||||
|
<record id="email_template_edi_pos_ticket" model="mail.template"> |
||||
|
<field name="name">Pos Ticket</field> |
||||
|
<field name="email_from">${(object.user_id.email)}</field> |
||||
|
<field name="email_to">${object.partner_id.id}</field> |
||||
|
<field name="partner_to">${object.partner_id.id}</field> |
||||
|
<field name="subject">Pos Ticket</field> |
||||
|
<field name="model_id" ref="pos_claims.model_pos_claims" /> |
||||
|
<field name="auto_delete" eval="True" /> |
||||
|
<field name="body_html"><![CDATA[ |
||||
|
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
||||
|
<p>Dear ${object.partner_id.name},</p> |
||||
|
<p> |
||||
|
Your claim is reported successfully and your ticket ${object.ref_name} is now on hold. |
||||
|
</p> |
||||
|
<p> |
||||
|
We will be in contact with you in the coming days to make our best attempt in regaining your |
||||
|
confidence in our company. |
||||
|
</p> |
||||
|
<p> |
||||
|
Please accept our sincerest apology for any trouble or inconvenience we have caused you. |
||||
|
</p> |
||||
|
<p>Thank you,</p> |
||||
|
|
||||
|
</div> |
||||
|
]]> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="email_template_edi_pos_claims" model="mail.template"> |
||||
|
<field name="name">Pos Claims</field> |
||||
|
<field name="email_from">${(object.user_id.email}</field> |
||||
|
<field name="email_to">${object.partner_id.id}</field> |
||||
|
<field name="partner_to">${object.partner_id.id}</field> |
||||
|
<field name="subject">Pos Claims</field> |
||||
|
<field name="model_id" ref="pos_claims.model_pos_claims" /> |
||||
|
<field name="auto_delete" eval="True" /> |
||||
|
<field name="body_html"><![CDATA[ |
||||
|
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
||||
|
<p>Dear ${object.partner_id.name},</p> |
||||
|
<p> Thank you for taking the time to communicate to us why our {product / service } did not meet |
||||
|
your expectations. We have every desire to address your needs and provide the best solution |
||||
|
available to resolve your issue as soon as possible.</p> |
||||
|
<p> We will be in contact with you in the coming days to make our best attempt in regaining your |
||||
|
confidence in our company. In addition, we will further evaluate how we can prevent this problem |
||||
|
from occurring again in the future.</p> |
||||
|
<p>Please accept our sincerest apology for any trouble or inconvenience we have caused you. Again, |
||||
|
we highly appreciate your feedback as it will assist us in becoming better at what we do. |
||||
|
As with any business like ours, the greatest advertising we can have is word of mouth from a |
||||
|
satisfied customer. It’s our goal to retain you as a satisfied customer and will hope to |
||||
|
serve you again in the future. |
||||
|
<p>Thank you,</p> |
||||
|
|
||||
|
</div> |
||||
|
]]> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem name="Pos Claims" id="menu_point_of_sale_claim" parent="point_of_sale.menu_point_root" sequence="22"/> |
||||
|
<menuitem name="Pos Claims" parent="menu_point_of_sale_claim" id="point_of_sale_claim" |
||||
|
action="pos_claim_cate_action" sequence="10" /> |
||||
|
</data> |
||||
|
</openerp> |