Merge lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link into lp:stock-logistic-flows/6.1

Proposed by Sébastien BEAU - http://www.akretion.com
Status: Merged
Merged at revision: 27
Proposed branch: lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link
Merge into: lp:stock-logistic-flows/6.1
Diff against target: 151 lines (+124/-0)
5 files modified
stock_picking_invoice_link/AUTHORS.txt (+1/-0)
stock_picking_invoice_link/__init__.py (+21/-0)
stock_picking_invoice_link/__openerp__.py (+43/-0)
stock_picking_invoice_link/stock.py (+34/-0)
stock_picking_invoice_link/stock_view.xml (+25/-0)
To merge this branch: bzr merge lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review, no test Approve
Joël Grand-Guillaume @ camptocamp code review, no tests Approve
Review via email: mp+189179@code.launchpad.net

Description of the change

Backport the usefull module stock_picking_invoice_link

To post a comment you must log in.
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

LGTM, Thanks !

review: Approve (code review, no tests)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM.

Maybe AUTHORS.txt file can be removed and include this information as a comment on __openerp__.py.

Regards.

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'stock_picking_invoice_link'
=== added file 'stock_picking_invoice_link/AUTHORS.txt'
--- stock_picking_invoice_link/AUTHORS.txt 1970-01-01 00:00:00 +0000
+++ stock_picking_invoice_link/AUTHORS.txt 2013-10-03 21:33:08 +0000
@@ -0,0 +1,1 @@
1Lorenzo Battistini <lorenzo.battistini@agilebg.com>
02
=== added file 'stock_picking_invoice_link/__init__.py'
--- stock_picking_invoice_link/__init__.py 1970-01-01 00:00:00 +0000
+++ stock_picking_invoice_link/__init__.py 2013-10-03 21:33:08 +0000
@@ -0,0 +1,21 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as published
8# by the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21import stock
022
=== added file 'stock_picking_invoice_link/__openerp__.py'
--- stock_picking_invoice_link/__openerp__.py 1970-01-01 00:00:00 +0000
+++ stock_picking_invoice_link/__openerp__.py 2013-10-03 21:33:08 +0000
@@ -0,0 +1,43 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as published
8# by the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21{
22 'name': "Picking Invoice Link",
23 'version': '0.1',
24 'category': 'Warehouse Management',
25 'description': """
26This module adds a link between pickings and generated invoices. So that user can easly reach the invoice related to the picking.
27
28""",
29 'author': 'Agile Business Group',
30 'website': 'http://www.agilebg.com',
31 'license': 'AGPL-3',
32 "depends": ['stock'],
33 "init_xml": [],
34 "update_xml": [
35 "stock_view.xml",
36 ],
37 "demo_xml": [],
38 'tests': [
39 ],
40 "installable": True,
41 "auto_install": False,
42 "application": False,
43}
044
=== added file 'stock_picking_invoice_link/stock.py'
--- stock_picking_invoice_link/stock.py 1970-01-01 00:00:00 +0000
+++ stock_picking_invoice_link/stock.py 2013-10-03 21:33:08 +0000
@@ -0,0 +1,34 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as published
8# by the Free Software Foundation, either version 3 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21from openerp.osv import fields, orm
22from openerp.tools.translate import _
23
24class stock_picking(orm.Model):
25 _inherit = "stock.picking"
26
27 _columns = {
28 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
29 }
30
31 def _invoice_hook(self, cr, uid, picking, invoice_id):
32 res = super(stock_picking,self)._invoice_hook(cr, uid, picking, invoice_id)
33 picking.write({'invoice_id': invoice_id})
34 return res
035
=== added file 'stock_picking_invoice_link/stock_view.xml'
--- stock_picking_invoice_link/stock_view.xml 1970-01-01 00:00:00 +0000
+++ stock_picking_invoice_link/stock_view.xml 2013-10-03 21:33:08 +0000
@@ -0,0 +1,25 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4 <record id="view_picking_out_form" model="ir.ui.view">
5 <field name="name">stock.picking.out.form</field>
6 <field name="model">stock.picking</field>
7 <field name="inherit_id" ref="stock.view_picking_out_form"></field>
8 <field name="arch" type="xml">
9 <field name="invoice_state" position="after">
10 <field name="invoice_id" string="Invoice" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
11 </field>
12 </field>
13 </record>
14 <record id="view_picking_in_form" model="ir.ui.view">
15 <field name="name">stock.picking.in.form</field>
16 <field name="model">stock.picking</field>
17 <field name="inherit_id" ref="stock.view_picking_in_form"></field>
18 <field name="arch" type="xml">
19 <field name="invoice_state" position="after">
20 <field name="invoice_id" string="Invoice" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
21 </field>
22 </field>
23 </record>
24</data>
25</openerp>
026
=== added directory 'stock_picking_invoice_link/test'

Subscribers

People subscribed via source and target branches