1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2011 Domsense s.r.l. (<http://www.domsense.com>).
6
# Copyright (C) 2013 Andrea Cometa Perito Informatico (www.andreacometa.it)
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
23
from openerp.osv import orm
26
class sale_order(orm.Model):
27
_inherit = 'sale.order'
29
def _prepare_invoice(self, cr, uid, order, lines, context=None):
31
res = super(sale_order, self)._prepare_invoice(
32
cr, uid, order, lines, context=context
35
'address_shipping_id': order.partner_shipping_id.id, })