~numerigraphe/openobject-addons/6.0-delivery-free-no-invoice

« back to all changes in this revision

Viewing changes to base_calendar/base_calendar.py

  • Committer: Thibault Francois
  • Date: 2011-01-19 01:06:46 UTC
  • Revision ID: tfr@openerp.com-20110119010646-35w5chzmmh10nyl2
Tags: openerp-buildfail-1-5348
[FIX] ir.attachement with base_calendar

Show diffs side-by-side

added added

removed removed

Lines of Context:
1738
1738
        return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
1739
1739
                            limit=limit, order=order,
1740
1740
                            context=context, count=False)
 
1741
                            
 
1742
    def create(self, cr, uid, vals, context=None):
 
1743
       if context:
 
1744
           id = context.get('default_res_id', False)
 
1745
           context.update({'default_res_id' : base_calendar_id2real_id(id)})
 
1746
       return super(ir_attachment, self).create(cr, uid, vals, context=context)
 
1747
       
1741
1748
ir_attachment()
1742
1749
 
1743
1750
class ir_values(osv.osv):