openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #00299
lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link into lp:stock-logistic-flows
Sébastien BEAU - http://www.akretion.com has proposed merging lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link into lp:stock-logistic-flows.
Requested reviews:
Stock and Logistic Core Editors (stock-logistic-core-editors)
For more details, see:
https://code.launchpad.net/~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link/+merge/189179
--
https://code.launchpad.net/~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link/+merge/189179
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~sebastien.beau/stock-logistic-flows/stock-logistic-flows-61-backport-stock_picking_invoice_link into lp:stock-logistic-flows.
=== 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 @@
+Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxx>
=== 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 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
+#
+# 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/>.
+#
+##############################################################################
+
+import stock
=== 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 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
+#
+# 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/>.
+#
+##############################################################################
+
+{
+ 'name': "Picking Invoice Link",
+ 'version': '0.1',
+ 'category': 'Warehouse Management',
+ 'description': """
+This module adds a link between pickings and generated invoices. So that user can easly reach the invoice related to the picking.
+
+""",
+ 'author': 'Agile Business Group',
+ 'website': 'http://www.agilebg.com',
+ 'license': 'AGPL-3',
+ "depends": ['stock'],
+ "init_xml": [],
+ "update_xml": [
+ "stock_view.xml",
+ ],
+ "demo_xml": [],
+ 'tests': [
+ ],
+ "installable": True,
+ "auto_install": False,
+ "application": False,
+}
=== 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 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
+#
+# 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"
+
+ _columns = {
+ 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
+ }
+
+ def _invoice_hook(self, cr, uid, picking, invoice_id):
+ res = super(stock_picking,self)._invoice_hook(cr, uid, picking, invoice_id)
+ picking.write({'invoice_id': invoice_id})
+ return res
=== 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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+ <record id="view_picking_out_form" model="ir.ui.view">
+ <field name="name">stock.picking.out.form</field>
+ <field name="model">stock.picking</field>
+ <field name="inherit_id" ref="stock.view_picking_out_form"></field>
+ <field name="arch" type="xml">
+ <field name="invoice_state" position="after">
+ <field name="invoice_id" string="Invoice" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
+ </field>
+ </field>
+ </record>
+ <record id="view_picking_in_form" model="ir.ui.view">
+ <field name="name">stock.picking.in.form</field>
+ <field name="model">stock.picking</field>
+ <field name="inherit_id" ref="stock.view_picking_in_form"></field>
+ <field name="arch" type="xml">
+ <field name="invoice_state" position="after">
+ <field name="invoice_id" string="Invoice" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
+ </field>
+ </field>
+ </record>
+</data>
+</openerp>
=== added directory 'stock_picking_invoice_link/test'
Follow ups