~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/ir_attachment_facturae.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:
59
59
    _inherit = 'ir.attachment.facturae.mx'
60
60
 
61
61
    def _get_type(self, cr, uid, ids=None, context=None):
 
62
        if context is None:
 
63
            context = {}
62
64
        types = super(ir_attachment_facturae_mx, self)._get_type(
63
65
            cr, uid, ids, context=context)
64
66
        types.extend([
86
88
    }
87
89
    
88
90
    def sf_cancel(self, cr, uid, ids, context=None):
 
91
        if context is None:
 
92
            context = {}
89
93
        msg = ''
90
94
        certificate_obj = self.pool.get('res.company.facturae.certificate')
91
95
        pac_params_obj = self.pool.get('params.pac')
155
159
                msg = _('Not found information of webservices of PAC, verify that the configuration of PAC is correct')
156
160
        return {'message': msg, 'status_uuid': status_uuid, 'status': status}
157
161
    
158
 
    def _upload_ws_file(self, cr, uid, ids, fdata=None, context={}):
 
162
    def _upload_ws_file(self, cr, uid, ids, fdata=None, context=None):
159
163
        """
160
164
        @params fdata : File.xml codification in base64
161
165
        """
 
166
        if context is None:
 
167
            context = {}
162
168
        invoice_obj = self.pool.get('account.invoice')
163
169
        pac_params_obj = invoice_obj.pool.get('params.pac')
164
170
        for ir_attachment_facturae_mx_id in self.browse(cr, uid, ids, context=context):