Skip to content

Commit

Permalink
Merge pull request #127 from gurneyalex/9.0
Browse files Browse the repository at this point in the history
[SEC] account_invoice_validation_workflow: fix unsafe eval
  • Loading branch information
Maxime Chambreuil - http://www.savoirfairelinux.com committed Feb 15, 2016
2 parents 0c14e54 + e8a857a commit edf1f2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion account_invoice_validation_workflow/__openerp__.py
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Add "To Send" and "To Validate" states in Invoices',
'version': '8.0.1.0.0',
'version': '8.0.1.0.1',
'category': 'Generic Modules/Invoicing',
'description':
'''
Expand Down
3 changes: 2 additions & 1 deletion account_invoice_validation_workflow/invoice.py
Expand Up @@ -21,6 +21,7 @@
from openerp import models, fields, api, exceptions
from openerp.osv import orm
from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval
from openerp import netsvc


Expand Down Expand Up @@ -228,7 +229,7 @@ def compute_refund(self, cr, uid, ids, mode='refund', context=None):
result = mod_obj.get_object_reference(cr, uid, 'account', xml_id)
id = result and result[1] or False
result = act_obj.read(cr, uid, 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

0 comments on commit edf1f2e

Please sign in to comment.