2011-02-23 13:18:03 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# OpenERP, Open Source Management Solution
|
|
|
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
2011-03-29 10:06:41 +00:00
|
|
|
from osv import fields,osv
|
2011-02-23 13:18:03 +00:00
|
|
|
|
|
|
|
class res_partner_address(osv.osv):
|
|
|
|
_inherit = "res.partner.address"
|
|
|
|
|
2011-03-29 07:08:22 +00:00
|
|
|
_columns = {
|
2011-03-29 10:06:41 +00:00
|
|
|
'write_date': fields.datetime('Date Modified', readonly=True, help="Modification date and time of address."),
|
2011-03-29 07:08:22 +00:00
|
|
|
}
|
|
|
|
|
2011-02-23 13:18:03 +00:00
|
|
|
def unlink(self, cr, uid, ids, context=None):
|
|
|
|
model_obj = self.pool.get('ir.model.data')
|
2011-02-24 06:24:40 +00:00
|
|
|
model_ids = model_obj.search(cr, uid, [('res_id','in',ids),('model','=','res.partner.address'),('module','=','sync_google_contact')], context=context)
|
2011-02-23 13:18:03 +00:00
|
|
|
model_obj.unlink(cr, uid, model_ids, context=context)
|
|
|
|
return super(res_partner_address, self).unlink(cr, uid, ids, context=context)
|
|
|
|
|
|
|
|
res_partner_address()
|
|
|
|
|
|
|
|
# vim:expandtab:smartindent:toabstop=4:softtabstop=4:shiftwidth=4:
|