Merge lp:~agilebg/account-invoicing/7.0-bug-1287179-hurrinico into lp:~account-core-editors/account-invoicing/7.0

Proposed by Nicola Malcontenti - Agile BG
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: 40
Merged at revision: 41
Proposed branch: lp:~agilebg/account-invoicing/7.0-bug-1287179-hurrinico
Merge into: lp:~account-core-editors/account-invoicing/7.0
Diff against target: 67 lines (+40/-3)
3 files modified
account_invoice_shipping_address/__init__.py (+1/-0)
account_invoice_shipping_address/__openerp__.py (+3/-3)
account_invoice_shipping_address/stock.py (+36/-0)
To merge this branch: bzr merge lp:~agilebg/account-invoicing/7.0-bug-1287179-hurrinico
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Alexandre Fayolle - camptocamp code review, no test Approve
Lorenzo Battistini (community) code review Approve
Andrea Cometa Pending
Review via email: mp+209207@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Whithin the _prepare_invoice method I see tabs and spaces mixed

review: Needs Fixing
39. By Hurrinico

[FIX] pep8 fix

Revision history for this message
Nicola Malcontenti - Agile BG (hurrin1c0) wrote :

> Whithin the _prepare_invoice method I see tabs and spaces mixed
done

Revision history for this message
Lorenzo Battistini (elbati) :
review: Approve (code review)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM.

review: Approve (code review, no test)
40. By Lorenzo Battistini

[IMP] description

Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_invoice_shipping_address/__init__.py'
2--- account_invoice_shipping_address/__init__.py 2013-09-04 13:41:03 +0000
3+++ account_invoice_shipping_address/__init__.py 2014-03-06 13:53:22 +0000
4@@ -22,3 +22,4 @@
5
6 import invoice
7 import sale
8+import stock
9
10=== modified file 'account_invoice_shipping_address/__openerp__.py'
11--- account_invoice_shipping_address/__openerp__.py 2013-09-11 14:01:17 +0000
12+++ account_invoice_shipping_address/__openerp__.py 2014-03-06 13:53:22 +0000
13@@ -25,10 +25,10 @@
14 "name": "Invoice Shipping Address",
15 "version": "0.1",
16 'category': 'Generic Modules/Accounting',
17- "depends": ["account", "sale"],
18+ "depends": ["account", "sale", "sale_stock"],
19 "author": "Andrea Cometa, Agile Business Group",
20- "description": """Adds a shipping address field to the invoice, also fill
21-it in sale invoicing""",
22+ "description": """This module adds a shipping address field to the invoice, also it fills
23+it in sale and picking invoicing""",
24 'website': 'http://www.andreacometa.it',
25 'data': [
26 'invoice_view.xml',
27
28=== added file 'account_invoice_shipping_address/stock.py'
29--- account_invoice_shipping_address/stock.py 1970-01-01 00:00:00 +0000
30+++ account_invoice_shipping_address/stock.py 2014-03-06 13:53:22 +0000
31@@ -0,0 +1,36 @@
32+# -*- coding: utf-8 -*-
33+##############################################################################
34+#
35+# Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
36+# Author: Nicola Malcontenti <nicola.malcontenti@agilebg.com>
37+#
38+# This program is free software: you can redistribute it and/or modify
39+# it under the terms of the GNU Affero General Public License as published
40+# by the Free Software Foundation, either version 3 of the License, or
41+# (at your option) any later version.
42+#
43+# This program is distributed in the hope that it will be useful,
44+# but WITHOUT ANY WARRANTY; without even the implied warranty of
45+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46+# GNU Affero General Public License for more details.
47+#
48+# You should have received a copy of the GNU Affero General Public License
49+# along with this program. If not, see <http://www.gnu.org/licenses/>.
50+#
51+##############################################################################
52+
53+from openerp.osv import fields, orm
54+from openerp.tools.translate import _
55+
56+
57+class stock_picking(orm.Model):
58+ _inherit = "stock.picking"
59+
60+ def _prepare_invoice(
61+ self, cr, uid, picking, partner,
62+ inv_type, journal_id, context=None):
63+ invoice_vals = super(stock_picking, self)._prepare_invoice(
64+ cr, uid, picking, partner, inv_type, journal_id, context=context)
65+ if picking and picking.partner_id:
66+ invoice_vals['address_shipping_id'] = picking.partner_id.id
67+ return invoice_vals

Subscribers

People subscribed via source and target branches