~vauxoo/openerp-mexico-localization/7.0-l10n_mx_invoice_datetime-validate-dev-julio

« back to all changes in this revision

Viewing changes to l10n_mx_facturae_pac_sf/wizard/wizard_cancel_invoice_pac_sf_v6.py

  • Committer: Jorge Angel Naranjo Rogel
  • Date: 2013-12-16 20:10:42 UTC
  • mfrom: (323.3.10 oml7.0-ids-nuevo)
  • Revision ID: jorge_nr@vauxoo.com-20131216201042-5ce3igsy9xh23jl9
[IMP] added context=None and if context is None

Merge from lp:~vauxoo/openerp-mexico-localization/7.0_l10n_mx_isinstance_ids_dev_carlos

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
class wizard_cancel_invoice_pac_sf(osv.TransientModel):
52
52
    _name = 'wizard.cancel.invoice.pac.sf'
53
53
 
54
 
    def _get_cancel_invoice_id(self, cr, uid, data, context={}):
 
54
    def _get_cancel_invoice_id(self, cr, uid, data, context=None):
55
55
        """
56
56
        @params data : Dictionary with information of the user, and active ids
57
57
        """
 
58
        if context is None:
 
59
            context = {}
58
60
        res = {}
59
61
        invoice_obj = self.pool.get('account.invoice')
60
62
        res = invoice_obj._get_file_cancel(cr, uid, data['active_ids'])
61
63
        return res['file']
62
64
 
63
 
    def upload_cancel_to_pac(self, cr, uid, ids, context={}):
 
65
    def upload_cancel_to_pac(self, cr, uid, ids, context=None):
 
66
        if context is None:
 
67
            context = {}
64
68
        res = {}
65
69
        invoice_obj = self.pool.get('account.invoice')
66
70
        res = invoice_obj.sf_cancel(cr, uid, context[