openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #04402
[Merge] lp:~agilebg/account-invoicing/7.0-bug-1287179-hurrinico into lp:account-invoicing
Nicola Malcontenti - Agile BG has proposed merging lp:~agilebg/account-invoicing/7.0-bug-1287179-hurrinico into lp:account-invoicing.
Requested reviews:
Andrea Cometa (scigghia)
For more details, see:
https://code.launchpad.net/~agilebg/account-invoicing/7.0-bug-1287179-hurrinico/+merge/209207
https://bugs.launchpad.net/account-invoicing/+bug/1287179
--
https://code.launchpad.net/~agilebg/account-invoicing/7.0-bug-1287179-hurrinico/+merge/209207
Your team Account Core Editors is subscribed to branch lp:account-invoicing.
=== modified file 'account_invoice_shipping_address/__init__.py'
--- account_invoice_shipping_address/__init__.py 2013-09-04 13:41:03 +0000
+++ account_invoice_shipping_address/__init__.py 2014-03-04 09:39:39 +0000
@@ -22,3 +22,4 @@
import invoice
import sale
+import stock
=== modified file 'account_invoice_shipping_address/__openerp__.py'
--- account_invoice_shipping_address/__openerp__.py 2013-09-11 14:01:17 +0000
+++ account_invoice_shipping_address/__openerp__.py 2014-03-04 09:39:39 +0000
@@ -25,7 +25,7 @@
"name": "Invoice Shipping Address",
"version": "0.1",
'category': 'Generic Modules/Accounting',
- "depends": ["account", "sale"],
+ "depends": ["account", "sale", "sale_stock"],
"author": "Andrea Cometa, Agile Business Group",
"description": """Adds a shipping address field to the invoice, also fill
it in sale invoicing""",
=== added file 'account_invoice_shipping_address/stock.py'
--- account_invoice_shipping_address/stock.py 1970-01-01 00:00:00 +0000
+++ account_invoice_shipping_address/stock.py 2014-03-04 09:39:39 +0000
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
+# Author: Nicola Malcontenti <nicola.malcontenti@xxxxxxxxxxx>
+#
+# 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/>.
+#
+##############################################################################
+
+from openerp.osv import fields, orm
+from openerp.tools.translate import _
+
+
+class stock_picking(orm.Model):
+ _inherit = "stock.picking"
+
+ def _prepare_invoice(self, cr, uid, picking,
+ partner, inv_type, journal_id, context=None):
+ invoice_vals = super(stock_picking, self)._prepare_invoice(
+ cr, uid, picking, partner, inv_type, journal_id, context=context)
+ if picking and picking.partner_id:
+ invoice_vals['address_shipping_id'] = picking.partner_id.id
+ return invoice_vals
Follow ups