|
@ -19,21 +19,24 @@ |
|
|
# |
|
|
# |
|
|
############################################################################### |
|
|
############################################################################### |
|
|
|
|
|
|
|
|
from openerp.osv import orm, fields |
|
|
|
|
|
|
|
|
from openerp.osv import orm |
|
|
import base64 |
|
|
import base64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class document_multiple_action(orm.TransientModel): |
|
|
class document_multiple_action(orm.TransientModel): |
|
|
_name = "document.multiple.action" |
|
|
_name = "document.multiple.action" |
|
|
_description = "Multiple action on document" |
|
|
_description = "Multiple action on document" |
|
|
|
|
|
|
|
|
def write_again(self, cr, uid, ids, context=None): |
|
|
def write_again(self, cr, uid, ids, context=None): |
|
|
if context is None: context = {} |
|
|
|
|
|
|
|
|
if context is None: |
|
|
|
|
|
context = {} |
|
|
document_obj = self.pool.get('ir.attachment') |
|
|
document_obj = self.pool.get('ir.attachment') |
|
|
document_ids = context.get('active_ids') |
|
|
document_ids = context.get('active_ids') |
|
|
if document_ids: |
|
|
if document_ids: |
|
|
document_obj.write_again(cr, uid, document_ids, context=context) |
|
|
document_obj.write_again(cr, uid, document_ids, context=context) |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class document_file(orm.Model): |
|
|
class document_file(orm.Model): |
|
|
_inherit = 'ir.attachment' |
|
|
_inherit = 'ir.attachment' |
|
|
|
|
|
|
|
@ -50,10 +53,8 @@ class document_file(orm.Model): |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
def write_again(self, cr, uid, ids, context=None): |
|
|
def write_again(self, cr, uid, ids, context=None): |
|
|
if context==None: |
|
|
|
|
|
|
|
|
if context is None: |
|
|
context = {} |
|
|
context = {} |
|
|
for document_id in ids: |
|
|
for document_id in ids: |
|
|
self._write_again(cr, uid, document_id, context=context) |
|
|
self._write_again(cr, uid, document_id, context=context) |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
|
|
|