← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~agilebg/openerp-product-attributes/adding_product_pack_7 into lp:openerp-product-attributes

 

Lorenzo Battistini - Agile BG has proposed merging lp:~agilebg/openerp-product-attributes/adding_product_pack_7 into lp:openerp-product-attributes.

Requested reviews:
  Product Core Editors (product-core-editors)

For more details, see:
https://code.launchpad.net/~agilebg/openerp-product-attributes/adding_product_pack_7/+merge/195786

Based on the NAN_product_pack this module allows configuring products
as a collection of other products.
If such a product is added in a sale order or a purchase order, all the
products of the pack will be added automatically (when storing the order)
as children of the pack product
-- 
https://code.launchpad.net/~agilebg/openerp-product-attributes/adding_product_pack_7/+merge/195786
Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.
=== added directory 'product_pack'
=== added file 'product_pack/__init__.py'
--- product_pack/__init__.py	1970-01-01 00:00:00 +0000
+++ product_pack/__init__.py	2013-11-19 14:19:52 +0000
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+#    Copyright (c) 2009 Angel Alvarez - NaN  (http://www.nan-tic.com)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    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 pack

=== added file 'product_pack/__openerp__.py'
--- product_pack/__openerp__.py	1970-01-01 00:00:00 +0000
+++ product_pack/__openerp__.py	2013-11-19 14:19:52 +0000
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+#    Copyright (c) 2009 Angel Alvarez - NaN  (http://www.nan-tic.com)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
+#    @author Albert Cervera i Areny <albert@xxxxxxxxxxx>
+#    @author Franco Tampieri <franco.tampieri@xxxxxxxxxxx>
+#    Ported to OpenERP 7.0 by Alex Comba <alex.comba@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/>.
+#
+###############################################################################
+{
+    "name": "Product Pack",
+    "version": "0.2",
+    "category": "Warehouse Management",
+    "description": """
+Based on the NAN_product_pack this module allows configuring products
+as a collection of other products.
+If such a product is added in a sale order or a purchase order, all the
+products of the pack will be added automatically (when storing the order)
+as children of the pack product.
+    """,
+    "author": "Agile Business Group & NaN·tic",
+    "website": "http://www.agilebg.com";,
+    "depends": [
+        'sale',
+        'purchase',
+    ],
+    "data": [
+        'security/ir.model.access.csv',
+        'pack_view.xml'
+    ],
+    "active": False,
+    "installable": True
+}

=== added directory 'product_pack/i18n'
=== added file 'product_pack/i18n/ca.po'
--- product_pack/i18n/ca.po	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/ca.po	2013-11-19 14:19:52 +0000
@@ -0,0 +1,163 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* nan_product_pack
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-01-15 11:45+0000\n"
+"PO-Revision-Date: 2011-02-15 15:15+0000\n"
+"Last-Translator: Jordi Esteve (Zikzakmedia) <jesteve@xxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-05 04:56+0000\n"
+"X-Generator: Launchpad (build 15060)\n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"El nom de l'objecte ha de començar amb x_ i no contenir cap caràcter "
+"especial!"
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr ""
+"Marqueu aquest camp si l'estoc del paquet es calcula a partir de l'estoc "
+"dels components."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr "Línies en el paquet"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr "Profunditat del producte si forma part d'un paquet."
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr "Producte"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr "Línies del paquet de productes"
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid ""
+"If you add products in the 'Pack Products' field, all those products will be "
+"added automatically when a new quotation or order is created."
+msgstr ""
+"Si afegiu productes en el camp \"Paquet de productes\", tots els productes "
+"s'afegiran automàticament quan creeu un nou pressupost o comanda."
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid ""
+"\n"
+"Allows configuring products as a collection of other products. If such a "
+"product is added in a sale order, all the products of the pack will be added "
+"automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts "
+"code to specifically handle when the module is available but they're still "
+"independent and there are no dependencies between them.\n"
+"        "
+msgstr ""
+"\n"
+"Permet configurar els productes com col·leccions d'altres productes. Si "
+"s'afegeix un producte d'aquest tipus en una comanda de venda, tots els "
+"productes del paquet s'afegiran automàticament (quan es guardi la comanda) "
+"com a fills del producte principal.\n"
+"\n"
+"Aquest mòdul és compatible amb nan_external_prices i conté codi per "
+"funcionar quan està instal·lat encara que ambdós són encara independents i "
+"no hi ha dependències entre ells.\n"
+"        "
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr "Paquet"
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr "producte.paquet.línea"
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML no vàlid per a la definició de la vista!"
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr "Paquet de productes"
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr "Estoc depen dels components"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr "El paquet que conté aquest producte."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr "Profunditat"
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid ""
+"Mark this field if the public price of the pack should be fixed. Do not mark "
+"it if the price should be calculated from the sum of the prices of the "
+"products in the pack."
+msgstr ""
+"Marqueu aquest camp si el preu de venda del paquet ha de ser fix. No ho "
+"marqueu si el preu s'ha de calcular a partir de la suma dels preus dels "
+"productes del paquet."
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr "Quantitat"
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr "Productes del paquet"
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr "Producte pare"
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr "El paquet té un preu fix"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr "Línia de paquet de productes"
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr "Llista de productes que formen part del paquet."

=== added file 'product_pack/i18n/de.po'
--- product_pack/i18n/de.po	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/de.po	2013-11-19 14:19:52 +0000
@@ -0,0 +1,145 @@
+# German translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-01-15 11:45+0000\n"
+"PO-Revision-Date: 2011-02-15 15:15+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German <de@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-05 04:56+0000\n"
+"X-Generator: Launchpad (build 15060)\n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr ""
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid ""
+"If you add products in the 'Pack Products' field, all those products will be "
+"added automatically when a new quotation or order is created."
+msgstr ""
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid ""
+"\n"
+"Allows configuring products as a collection of other products. If such a "
+"product is added in a sale order, all the products of the pack will be added "
+"automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts "
+"code to specifically handle when the module is available but they're still "
+"independent and there are no dependencies between them.\n"
+"        "
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr ""
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr ""
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr ""
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid ""
+"Mark this field if the public price of the pack should be fixed. Do not mark "
+"it if the price should be calculated from the sum of the prices of the "
+"products in the pack."
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr ""

=== added file 'product_pack/i18n/es.po'
--- product_pack/i18n/es.po	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/es.po	2013-11-19 14:19:52 +0000
@@ -0,0 +1,164 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* nan_product_pack
+#
+# Albert Cervera i Areny <albert@xxxxxxxxxxx>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-01-15 11:45+0000\n"
+"PO-Revision-Date: 2011-02-15 15:15+0000\n"
+"Last-Translator: Jordi Esteve (Zikzakmedia) <jesteve@xxxxxxxxxxxxxxx>\n"
+"Language-Team: Catalan <kde-i18n-ca@xxxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-05 04:56+0000\n"
+"X-Generator: Launchpad (build 15060)\n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
+"especial!"
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr ""
+"Marque este campo si el stock del pack se calcula a partir del stock de los "
+"componentes."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr "Líneas en el pack"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr "Profundidad del producto si forma parte de un pack."
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr "Producto"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr "Líneas del pack de productos"
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid ""
+"If you add products in the 'Pack Products' field, all those products will be "
+"added automatically when a new quotation or order is created."
+msgstr ""
+"Si añade productos en el campo \"Pack de productos\", todos los productos se "
+"añadirán automáticamente cuando cree un nuevo presupuesto o pedido."
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid ""
+"\n"
+"Allows configuring products as a collection of other products. If such a "
+"product is added in a sale order, all the products of the pack will be added "
+"automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts "
+"code to specifically handle when the module is available but they're still "
+"independent and there are no dependencies between them.\n"
+"        "
+msgstr ""
+"\n"
+"Permite configurar los productos como colecciones de otros productos. Si se "
+"añade un producto de este tipo en un pedido de venta, todos los productos "
+"del pack se añadirán automáticamente (cuando se guarde el pedido) como hijos "
+"del producto principal.\n"
+"\n"
+"Este módulo es compatible con nan_external_prices y contiene código para "
+"funcionar cuando está instalado aunque ambos son todavía independientes y no "
+"hay dependencias entre ellos.\n"
+"        "
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr "Pack"
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr "producto.pack.línea"
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "¡XML no válido para la definición de la vista!"
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr "Pack de productos"
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr "Stock depende de los componentes"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr "El pack que contiene este producto."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr "Profundidad"
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid ""
+"Mark this field if the public price of the pack should be fixed. Do not mark "
+"it if the price should be calculated from the sum of the prices of the "
+"products in the pack."
+msgstr ""
+"Marque este campo si el precio de venta del pack tiene que ser fijo. No lo "
+"marque si el precio se tiene que calcular a partir de la suma de los precios "
+"de los productos del pack."
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr "Cantidad"
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr "Productos del pack"
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr "Producto padre"
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr "El pack tiene un precio fijo"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr "Línea de pack de productos"
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr "Lista de productos que forman parte del pack."

=== added file 'product_pack/i18n/it.po'
--- product_pack/i18n/it.po	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/it.po	2013-11-19 14:19:52 +0000
@@ -0,0 +1,164 @@
+# Italian translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-01-15 11:45+0000\n"
+"PO-Revision-Date: 2011-05-04 08:52+0000\n"
+"Last-Translator: Lorenzo Battistini - Agile BG - Domsense "
+"<lorenzo.battistini@xxxxxxxxxxx>\n"
+"Language-Team: Italian <it@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-05 04:56+0000\n"
+"X-Generator: Launchpad (build 15060)\n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Il nome dell'oggetto deve iniziare con x_ e non deve contenere alcun "
+"carattere speciale !"
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr ""
+"Selezionare se la giacenza del kit è calcolata sulla base della giacenza dei "
+"componenti"
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr "Righe nel kit"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr "Profondità del prodotto se è parte di un kit"
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr "Prodotto"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr "Righe Kit"
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid ""
+"If you add products in the 'Pack Products' field, all those products will be "
+"added automatically when a new quotation or order is created."
+msgstr ""
+"Se si aggiungono prodotti nel campo 'Prodotti Kit', tutti quei prodotti "
+"saranno automaticamente aggiunti alla creazione di un preventivo o ordine."
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid ""
+"\n"
+"Allows configuring products as a collection of other products. If such a "
+"product is added in a sale order, all the products of the pack will be added "
+"automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts "
+"code to specifically handle when the module is available but they're still "
+"independent and there are no dependencies between them.\n"
+"        "
+msgstr ""
+"\n"
+"Permette di configurare prosotti come collezioni di altri prodotti. Se uno "
+"di questi prodotti viene aggiunto ad un ordine di vendita, tutti i prodotti "
+"nel kit saranno aggiunti automaticamente (al salvataggio dell'ordine) come "
+"figli del prodotto kit.\n"
+"\n"
+"Il modulo è stato reso compatibile con nan_external_prices e contiene il "
+"codice per gestire entrambi i moduli pur mantenendoli indipendenti.\n"
+"        "
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr "Kit"
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr "product.pack.line"
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valido per l'architettura della vista"
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr "Kit prodotto"
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr "La giacenza si basa sui componenti"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr "Il kit che contiene questo prodotto."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr "Profondità"
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid ""
+"Mark this field if the public price of the pack should be fixed. Do not mark "
+"it if the price should be calculated from the sum of the prices of the "
+"products in the pack."
+msgstr ""
+"Selezionare questo campo se il prezzo pubblico del kit debba essere fisso. "
+"Non selezionarlo se il prezzo debba essere calcolato sulla base dei prezzi "
+"dei prodotti nel kit."
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr "Quantità"
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr "Prodotti kit"
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr "Prodotto genitore"
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr "Il kit ha prezzo fisso"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr "Riga prodotto kit"
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr "Lista dei prodotti che sono parte di questo kit."

=== added file 'product_pack/i18n/nan_product_pack.pot'
--- product_pack/i18n/nan_product_pack.pot	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/nan_product_pack.pot	2013-11-19 14:19:52 +0000
@@ -0,0 +1,137 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* nan_product_pack
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.15\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-01-15 11:45:01+0000\n"
+"PO-Revision-Date: 2011-01-15 11:45:01+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr "The Object name must start with x_ and not contain any special character !"
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr "Mark if pack stock is calcualted from component stock"
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr "Lines in pack"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr "Depth of the product if it is part of a pack."
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr "Product"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr "Pack Product Lines"
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid "If you add products in the 'Pack Products' field, all those products will be added automatically when a new quotation or order is created."
+msgstr "If you add products in the 'Pack Products' field, all those products will be added automatically when a new quotation or order is created."
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid "\n"
+"Allows configuring products as a collection of other products. If such a product is added in a sale order, all the products of the pack will be added automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts code to specifically handle when the module is available but they're still independent and there are no dependencies between them.\n"
+"        "
+msgstr "\n"
+"Allows configuring products as a collection of other products. If such a product is added in a sale order, all the products of the pack will be added automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts code to specifically handle when the module is available but they're still independent and there are no dependencies between them.\n"
+"        "
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr "Pack"
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr "product.pack.line"
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Invalid XML for View Architecture!"
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr "Product Pack"
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr "Stock depends of components"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr "The pack that contains this product."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr "Depth"
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid "Mark this field if the public price of the pack should be fixed. Do not mark it if the price should be calculated from the sum of the prices of the products in the pack."
+msgstr "Mark this field if the public price of the pack should be fixed. Do not mark it if the price should be calculated from the sum of the prices of the products in the pack."
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr "Quantity"
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr "Pack Products"
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr "Parent Product"
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr "Pack has fixed price"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr "Pack Product Line"
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr "List of products that are part of this pack."
+

=== added file 'product_pack/i18n/pt.po'
--- product_pack/i18n/pt.po	1970-01-01 00:00:00 +0000
+++ product_pack/i18n/pt.po	2013-11-19 14:19:52 +0000
@@ -0,0 +1,149 @@
+# Portuguese translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-01-15 11:45+0000\n"
+"PO-Revision-Date: 2011-02-15 15:15+0000\n"
+"Last-Translator: Luniz <luniz52@xxxxxxxxxxx>\n"
+"Language-Team: Portuguese <pt@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-04-05 04:56+0000\n"
+"X-Generator: Launchpad (build 15060)\n"
+
+#. module: nan_product_pack
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"O nome do Objecto deve começar com x_ e não pode conter nenhum caracter "
+"especial !"
+
+#. module: nan_product_pack
+#: help:product.product,stock_depends:0
+msgid "Mark if pack stock is calcualted from component stock"
+msgstr ""
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_child_line_ids:0
+msgid "Lines in pack"
+msgstr "Linhas em embalagens"
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_depth:0
+msgid "Depth of the product if it is part of a pack."
+msgstr "Profundidade do produto se ele faz parte da embalagem."
+
+#. module: nan_product_pack
+#: field:product.pack.line,product_id:0
+msgid "Product"
+msgstr "Produto"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Lines"
+msgstr "Linhas de Embalagem de Produto"
+
+#. module: nan_product_pack
+#: view:product.product:0
+msgid ""
+"If you add products in the 'Pack Products' field, all those products will be "
+"added automatically when a new quotation or order is created."
+msgstr ""
+"Se adicionar o produto no campo \"Embalagem de Produtos ', todos os produtos "
+"serão adicionados automaticamente quando uma nova ordem de cotação é criado."
+
+#. module: nan_product_pack
+#: model:ir.module.module,description:nan_product_pack.module_meta_information
+msgid ""
+"\n"
+"Allows configuring products as a collection of other products. If such a "
+"product is added in a sale order, all the products of the pack will be added "
+"automatically (when storing the order) as children of the pack product.\n"
+"\n"
+"The module has been made compatible with nan_external_prices and containts "
+"code to specifically handle when the module is available but they're still "
+"independent and there are no dependencies between them.\n"
+"        "
+msgstr ""
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:sale.order.line,pack_parent_line_id:0
+msgid "Pack"
+msgstr "Embalagem"
+
+#. module: nan_product_pack
+#: model:ir.model,name:nan_product_pack.model_product_pack_line
+msgid "product.pack.line"
+msgstr "product.pack.line"
+
+#. module: nan_product_pack
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML Inválido para a Aquitectura de Vista!"
+
+#. module: nan_product_pack
+#: model:ir.module.module,shortdesc:nan_product_pack.module_meta_information
+msgid "Product Pack"
+msgstr "Embalagem de Produto"
+
+#. module: nan_product_pack
+#: field:product.product,stock_depends:0
+msgid "Stock depends of components"
+msgstr ""
+
+#. module: nan_product_pack
+#: help:sale.order.line,pack_parent_line_id:0
+msgid "The pack that contains this product."
+msgstr "A embalagem que contém esse produto."
+
+#. module: nan_product_pack
+#: field:sale.order.line,pack_depth:0
+msgid "Depth"
+msgstr "Profundidade"
+
+#. module: nan_product_pack
+#: help:product.product,pack_fixed_price:0
+msgid ""
+"Mark this field if the public price of the pack should be fixed. Do not mark "
+"it if the price should be calculated from the sum of the prices of the "
+"products in the pack."
+msgstr ""
+
+#. module: nan_product_pack
+#: field:product.pack.line,quantity:0
+msgid "Quantity"
+msgstr "Quantidade"
+
+#. module: nan_product_pack
+#: view:product.product:0
+#: field:product.product,pack_line_ids:0
+msgid "Pack Products"
+msgstr "Embalagem de Produtos"
+
+#. module: nan_product_pack
+#: field:product.pack.line,parent_product_id:0
+msgid "Parent Product"
+msgstr "Produto Ascendente"
+
+#. module: nan_product_pack
+#: field:product.product,pack_fixed_price:0
+msgid "Pack has fixed price"
+msgstr "A Embalagem tem preço fixado"
+
+#. module: nan_product_pack
+#: view:product.pack.line:0
+msgid "Pack Product Line"
+msgstr "Linha de Embalagem de Produto"
+
+#. module: nan_product_pack
+#: help:product.product,pack_line_ids:0
+msgid "List of products that are part of this pack."
+msgstr "Lista dos produtos que fazem parte desta embalagem."

=== added file 'product_pack/pack.py'
--- product_pack/pack.py	1970-01-01 00:00:00 +0000
+++ product_pack/pack.py	2013-11-19 14:19:52 +0000
@@ -0,0 +1,484 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+#    Copyright (c) 2009 Angel Alvarez - NaN  (http://www.nan-tic.com)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    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 math
+from openerp.osv import fields, orm
+
+
+class product_pack(orm.Model):
+    _name = 'product.pack.line'
+    _rec_name = 'product_id'
+    _columns = {
+        'parent_product_id': fields.many2one(
+            'product.product', 'Parent Product',
+            ondelete='cascade', required=True
+        ),
+        'quantity': fields.float('Quantity', required=True),
+        'product_id': fields.many2one(
+            'product.product', 'Product', required=True
+        ),
+    }
+
+
+class product_product(orm.Model):
+    _inherit = 'product.product'
+    _columns = {
+        'stock_depends': fields.boolean(
+            'Stock depends of components',
+            help='Mark if pack stock is calcualted from component stock'
+        ),
+        'pack_fixed_price': fields.boolean(
+            'Pack has fixed price',
+            help="""
+            Mark this field if the public price of the pack should be fixed.
+            Do not mark it if the price should be calculated from the sum of
+            the prices of the products in the pack.
+        """
+        ),
+        'pack_line_ids': fields.one2many(
+            'product.pack.line', 'parent_product_id', 'Pack Products',
+            help='List of products that are part of this pack.'
+        ),
+    }
+
+    def get_product_available(self, cr, uid, ids, context=None):
+        """
+        Calulate stock for packs
+        :return: maximum stock that lets complete pack
+        """
+        result = {}
+        for product in self.browse(cr, uid, ids, context=context):
+            stock = super(product_product, self).get_product_available(
+                cr, uid, [product.id], context=context)
+
+            # Check if product stock depends on it's subproducts stock.
+            if not product.stock_depends:
+                result[product.id] = stock[product.id]
+                continue
+
+            first_subproduct = True
+            pack_stock = 0
+
+            # Check if the pack has subproducts
+            if product.pack_line_ids:
+
+                # Take the stock/virtual stock of all subproducts
+                subproducts_stock = self.get_product_available(
+                    cr,
+                    uid,
+                    [line.product_id.id for line in product.pack_line_ids],
+                    context=context
+                )
+
+                """ Go over all subproducts, take quantity needed for the pack
+                and its available stock """
+                for subproduct in product.pack_line_ids:
+
+                    # if subproduct is a service don't calculate the stock
+                    if subproduct.product_id.type == 'service':
+                        continue
+                    if first_subproduct:
+                        subproduct_quantity = subproduct.quantity
+                        subproduct_stock = (
+                            subproducts_stock[subproduct.product_id.id])
+                        if subproduct_quantity == 0:
+                            continue
+
+                        """ Calculate real stock for current pack from the
+                        subproduct stock and needed quantity """
+                        pack_stock = math.floor(
+                            subproduct_stock / subproduct_quantity)
+                        first_subproduct = False
+                        continue
+
+                    # Take the info of the next subproduct
+                    subproduct_quantity_next = subproduct.quantity
+                    subproduct_stock_next = (
+                        subproducts_stock[subproduct.product_id.id])
+
+                    if (
+                        subproduct_quantity_next == 0
+                        or subproduct_quantity_next == 0.0
+                    ):
+                        continue
+
+                    pack_stock_next = math.floor(
+                        subproduct_stock_next / subproduct_quantity_next)
+
+                    # compare the stock of a subproduct and the next subproduct
+                    if pack_stock_next < pack_stock:
+                        pack_stock = pack_stock_next
+
+                # result is the minimum stock of all subproducts
+                result[product.id] = pack_stock
+            else:
+                result[product.id] = stock[product.id]
+        return result
+
+
+class sale_order_line(orm.Model):
+    _inherit = 'sale.order.line'
+    _columns = {
+        'pack_depth': fields.integer(
+            'Depth', required=True,
+            help='Depth of the product if it is part of a pack.'
+        ),
+        'pack_parent_line_id': fields.many2one(
+            'sale.order.line', 'Pack',
+            help='The pack that contains this product.'
+        ),
+        'pack_child_line_ids': fields.one2many(
+            'sale.order.line', 'pack_parent_line_id', 'Lines in pack'),
+    }
+    _defaults = {
+        'pack_depth': lambda *a: 0,
+    }
+
+
+class sale_order(orm.Model):
+    _inherit = 'sale.order'
+
+    def create(self, cr, uid, vals, context=None):
+        result = super(sale_order, self).create(cr, uid, vals, context)
+        self.expand_packs(cr, uid, [result], context)
+        return result
+
+    def write(self, cr, uid, ids, vals, context=None):
+        result = super(sale_order, self).write(cr, uid, ids, vals, context)
+        self.expand_packs(cr, uid, ids, context)
+        return result
+
+    def expand_packs(self, cr, uid, ids, context={}, depth=1):
+        if type(ids) in [int, long]:
+            ids = [ids]
+        if depth == 10:
+            return
+        updated_orders = []
+        for order in self.browse(cr, uid, ids, context):
+
+            fiscal_position = (
+                order.fiscal_position
+                and self.pool.get('account.fiscal.position').browse(
+                    cr, uid, order.fiscal_position.id, context
+                )
+                or False
+            )
+            """
+            The reorder variable is used to ensure lines of the same pack go
+            right after their parent. What the algorithm does is check if the
+            previous item had children. As children items must go right after
+            the parent if the line we're evaluating doesn't have a parent it
+            means it's a new item (and probably has the default 10 sequence
+            number - unless the appropiate c2c_sale_sequence module is
+            installed). In this case we mark the item for reordering and
+            evaluate the next one. Note that as the item is not evaluated and
+            it might have to be expanded it's put on the queue for another
+            iteration (it's simple and works well). Once the next item has been
+            evaluated the sequence of the item marked for reordering is updated
+            with the next value.
+            """
+            sequence = -1
+            reorder = []
+            last_had_children = False
+            for line in order.order_line:
+                if last_had_children and not line.pack_parent_line_id:
+                    reorder.append(line.id)
+                    if (
+                        line.product_id.pack_line_ids
+                        and not order.id in updated_orders
+                    ):
+                        updated_orders.append(order.id)
+                    continue
+
+                sequence += 1
+
+                if sequence > line.sequence:
+                    self.pool.get('sale.order.line').write(
+                        cr, uid, [line.id], {'sequence': sequence, }, context)
+                else:
+                    sequence = line.sequence
+
+                if line.state != 'draft':
+                    continue
+                if not line.product_id:
+                    continue
+
+                """ If pack was already expanded (in another create/write
+                operation or in a previous iteration) don't do it again. """
+                if line.pack_child_line_ids:
+                    last_had_children = True
+                    continue
+                last_had_children = False
+
+                for subline in line.product_id.pack_line_ids:
+                    sequence += 1
+
+                    subproduct = subline.product_id
+                    quantity = subline.quantity * line.product_uom_qty
+
+                    if line.product_id.pack_fixed_price:
+                        price = 0.0
+                        discount = 0.0
+                    else:
+                        pricelist = order.pricelist_id.id
+                        price = self.pool.get('product.pricelist').price_get(
+                            cr, uid, [pricelist], subproduct.id, quantity,
+                            order.partner_id.id, {
+                                'uom': subproduct.uom_id.id,
+                                'date': order.date_order,
+                                }
+                            )[pricelist]
+                        discount = line.discount
+
+                    # Obtain product name in partner's language
+                    ctx = {'lang': order.partner_id.lang}
+                    subproduct_name = self.pool.get('product.product').browse(
+                        cr, uid, subproduct.id, ctx).name
+
+                    tax_ids = self.pool.get('account.fiscal.position').map_tax(
+                        cr, uid, fiscal_position, subproduct.taxes_id)
+
+                    if subproduct.uos_id:
+                        uos_id = subproduct.uos_id.id
+                        uos_qty = quantity * subproduct.uos_coeff
+                    else:
+                        uos_id = False
+                        uos_qty = quantity
+
+                    vals = {
+                        'order_id': order.id,
+                        'name': '%s%s' % (
+                            '> ' * (line.pack_depth+1), subproduct_name
+                        ),
+                        'sequence': sequence,
+                        'delay': subproduct.sale_delay or 0.0,
+                        'product_id': subproduct.id,
+                        'procurement_id': (
+                            line.procurement_id
+                            and line.procurement_id.id
+                            or False
+                        ),
+                        'price_unit': price,
+                        'tax_id': [(6, 0, tax_ids)],
+                        'type': subproduct.procure_method,
+                        'property_ids': [(6, 0, [])],
+                        'address_allotment_id': False,
+                        'product_uom_qty': quantity,
+                        'product_uom': subproduct.uom_id.id,
+                        'product_uos_qty': uos_qty,
+                        'product_uos': uos_id,
+                        'product_packaging': False,
+                        'move_ids': [(6, 0, [])],
+                        'discount': discount,
+                        'number_packages': False,
+                        'notes': False,
+                        'th_weight': False,
+                        'state': 'draft',
+                        'pack_parent_line_id': line.id,
+                        'pack_depth': line.pack_depth + 1,
+                    }
+
+                    """ It's a control for the case that the
+                    nan_external_prices was installed with the product pack """
+                    if 'prices_used' in line:
+                        vals['prices_used'] = line.prices_used
+
+                    self.pool.get('sale.order.line').create(
+                        cr, uid, vals, context)
+                    if not order.id in updated_orders:
+                        updated_orders.append(order.id)
+
+                for id in reorder:
+                    sequence += 1
+                    self.pool.get('sale.order.line').write(
+                        cr, uid, [id], {'sequence': sequence, }, context)
+
+        if updated_orders:
+            """ Try to expand again all those orders that had a pack in this
+            iteration. This way we support packs inside other packs. """
+            self.expand_packs(cr, uid, ids, context, depth + 1)
+        return
+
+
+class purchase_order_line(orm.Model):
+    _inherit = 'purchase.order.line'
+    _columns = {
+        'sequence': fields.integer(
+            'Sequence',
+            help="""Gives the sequence order when displaying a list of
+            purchase order lines. """
+        ),
+        'pack_depth': fields.integer(
+            'Depth', required=True,
+            help='Depth of the product if it is part of a pack.'
+        ),
+        'pack_parent_line_id': fields.many2one(
+            'purchase.order.line', 'Pack',
+            help='The pack that contains this product.'
+        ),
+        'pack_child_line_ids': fields.one2many(
+            'purchase.order.line', 'pack_parent_line_id', 'Lines in pack'
+        ),
+    }
+    _defaults = {
+        'pack_depth': lambda *a: 0,
+    }
+
+
+class purchase_order(orm.Model):
+    _inherit = 'purchase.order'
+
+    def create(self, cr, uid, vals, context=None):
+        result = super(purchase_order, self).create(cr, uid, vals, context)
+        self.expand_packs(cr, uid, [result], context)
+        return result
+
+    def write(self, cr, uid, ids, vals, context=None):
+        result = super(purchase_order, self).write(cr, uid, ids, vals, context)
+        self.expand_packs(cr, uid, ids, context)
+        return result
+
+    def expand_packs(self, cr, uid, ids, context={}, depth=1):
+        if type(ids) in [int, long]:
+            ids = [ids]
+        if depth == 10:
+            return
+        updated_orders = []
+        for order in self.browse(cr, uid, ids, context):
+            fiscal_position = (
+                order.fiscal_position
+                and self.pool.get('account.fiscal.position').browse(
+                    cr, uid, order.fiscal_position.id, context
+                )
+                or False
+            )
+            """
+            The reorder variable is used to ensure lines of the same pack go
+            right after their parent. What the algorithm does is check if the
+            previous item had children. As children items must go right after
+            the parent if the line we're evaluating doesn't have a parent it
+            means it's a new item (and probably has the default 10 sequence
+            number - unless the appropiate c2c_sale_sequence module is
+            installed). In this case we mark the item for reordering and
+            evaluate the next one. Note that as the item is not evaluated and
+            it might have to be expanded it's put on the queue for another
+            iteration (it's simple and works well). Once the next item has been
+            evaluated the sequence of the item marked for reordering is updated
+            with the next value.
+            """
+            sequence = -1
+            reorder = []
+            last_had_children = False
+            for line in order.order_line:
+                if last_had_children and not line.pack_parent_line_id:
+                    reorder.append(line.id)
+                    if (
+                        line.product_id.pack_line_ids
+                        and not order.id in updated_orders
+                    ):
+                        updated_orders.append(order.id)
+                    continue
+
+                sequence += 1
+
+                if sequence > line.sequence:
+                    self.pool.get('purchase.order.line').write(
+                        cr, uid, [line.id], {'sequence': sequence, }, context)
+                else:
+                    sequence = line.sequence
+
+                if line.state != 'draft':
+                    continue
+                if not line.product_id:
+                    continue
+
+                # If pack was already expanded (in another create/write
+                # operation or in a previous iteration) don't do it again.
+                if line.pack_child_line_ids:
+                    last_had_children = True
+                    continue
+                last_had_children = False
+
+                for subline in line.product_id.pack_line_ids:
+                    sequence += 1
+
+                    subproduct = subline.product_id
+                    quantity = subline.quantity * line.product_qty
+
+                    if line.product_id.pack_fixed_price:
+                        price = 0.0
+                    else:
+                        pricelist = order.pricelist_id.id
+                        price = self.pool.get('product.pricelist').price_get(
+                            cr, uid, [pricelist], subproduct.id, quantity,
+                            order.partner_id.id, {
+                                'uom': subproduct.uom_id.id,
+                                'date': order.date_order,
+                                }
+                            )[pricelist]
+
+                    # Obtain product name in partner's language
+                    ctx = {'lang': order.partner_id.lang}
+                    subproduct_name = self.pool.get('product.product').browse(
+                        cr, uid, subproduct.id, ctx).name
+
+                    tax_ids = self.pool.get('account.fiscal.position').map_tax(
+                        cr, uid, fiscal_position, subproduct.taxes_id)
+
+                    vals = {
+                        'order_id': order.id,
+                        'name': '%s%s' % (
+                            '> ' * (line.pack_depth + 1), subproduct_name),
+                        'date_planned': line.date_planned or 0.0,
+                        'sequence': sequence,
+                        'product_id': subproduct.id,
+                        'price_unit': price,
+                        'taxes_id': [(6, 0, tax_ids)],
+                        'product_qty': quantity,
+                        'product_uom': subproduct.uom_id.id,
+                        'move_ids': [(6, 0, [])],
+                        'notes': False,
+                        'state': 'draft',
+                        'pack_parent_line_id': line.id,
+                        'pack_depth': line.pack_depth + 1,
+                    }
+
+                    # It's a control for the case that the nan_external_prices
+                    # was installed with the product pack
+                    if 'prices_used' in line:
+                        vals['prices_used'] = line.prices_used
+
+                    self.pool.get('purchase.order.line').create(
+                        cr, uid, vals, context)
+                    if not order.id in updated_orders:
+                        updated_orders.append(order.id)
+
+                for id in reorder:
+                    sequence += 1
+                    self.pool.get('purchase.order.line').write(
+                        cr, uid, [id], {'sequence': sequence, }, context)
+
+        if updated_orders:
+            """ Try to expand again all those orders that had a pack in this
+            iteration. This way we support packs inside other packs. """
+            self.expand_packs(cr, uid, ids, context, depth + 1)
+        return

=== added file 'product_pack/pack_view.xml'
--- product_pack/pack_view.xml	1970-01-01 00:00:00 +0000
+++ product_pack/pack_view.xml	2013-11-19 14:19:52 +0000
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+
+		<!-- Product view modification -->
+		<record model="ir.ui.view" id="nan_product_pack_form">
+			<field name="name">product.product.pack.form</field>
+			<field name="model">product.product</field>
+			<field name="inherit_id" ref="product.product_normal_form_view" />
+			<field name="arch" type="xml">
+				<notebook position="inside">
+					<page string="Pack">
+						<label string="If you add products in the 'Pack Products' field, all those products will be added automatically when a new quotation or order is created." colspan="4"/>
+						<group>
+							<field name="stock_depends" />
+							<field name="pack_fixed_price" />
+						</group>
+						<separator string="Pack Products" colspan="4"/>
+						<field name="pack_line_ids" colspan="4" nolabel="1"/>
+					</page>
+				</notebook>
+			</field>
+		</record>
+
+		<!-- product.pack.line -->
+		<record model="ir.ui.view" id="product_pack_line_form">
+			<field name="name">product.pack.line.form</field>
+			<field name="model">product.pack.line</field>
+			<field name="arch" type="xml">
+				<form string="Pack Product Line">
+					<field name="quantity"/>
+					<field name="product_id"/>
+				</form>
+			</field>
+		</record>
+		<record model="ir.ui.view" id="product_pack_line_tree">
+			<field name="name">product.pack.line.tree</field>
+			<field name="model">product.pack.line</field>
+			<field name="arch" type="xml">
+				<tree string="Pack Product Lines">
+					<field name="quantity"/>
+					<field name="product_id"/>
+				</tree>
+			</field>
+		</record>
+	</data>
+</openerp>
+

=== added directory 'product_pack/security'
=== added file 'product_pack/security/ir.model.access.csv'
--- product_pack/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ product_pack/security/ir.model.access.csv	2013-11-19 14:19:52 +0000
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_product_pack_line_manager","product.pack.line manager","model_product_pack_line","base.group_sale_manager",1,1,1,1
+"access_product_pack_line_mployee","product.pack.line employee","model_product_pack_line","base.group_user",1,0,0,0


Follow ups