Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEC] invoice_validation_wkfl: fix unsafe eval #126

Merged
merged 1 commit into from Feb 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion invoice_validation_wkfl/__openerp__.py
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Add "To Send" and "To Validate" states in Invoices',
'version': '1.0',
'version': '7.0.1.0.1',
'category': 'Generic Modules/Invoicing',
'description':
'''
Expand Down
7 changes: 4 additions & 3 deletions invoice_validation_wkfl/invoice.py
Expand Up @@ -19,8 +19,9 @@
#
##############################################################################
from openerp.osv import orm, fields
from tools.translate import _
import netsvc
from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval
from openerp import netsvc


class AccountInvoice(orm.Model):
Expand Down Expand Up @@ -229,7 +230,7 @@ def compute_refund(self, cr, uid, ids, mode='refund', context=None):
result = mod_obj.get_object_reference(cr, uid, 'account', xml_id)
rec_id = result and result[1] or False
result = act_obj.read(cr, uid, rec_id, context=context)
invoice_domain = eval(result['domain'])
invoice_domain = safe_eval(result['domain'])
invoice_domain.append(('id', 'in', created_inv))
result['domain'] = invoice_domain
return result