← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~mikel-martin/purchase-wkfl/6.1-purchase_landed_costs into lp:purchase-wkfl/6.1

 

mikel has proposed merging lp:~mikel-martin/purchase-wkfl/6.1-purchase_landed_costs into lp:purchase-wkfl/6.1.

Requested reviews:
  Purchase Core Editors (purchase-core-editors)

For more details, see:
https://code.launchpad.net/~mikel-martin/purchase-wkfl/6.1-purchase_landed_costs/+merge/199587

[ADD] purchase_landed_cost from c2c-rd-addons fixed
-- 
https://code.launchpad.net/~mikel-martin/purchase-wkfl/6.1-purchase_landed_costs/+merge/199587
Your team Purchase Core Editors is requested to review the proposed merge of lp:~mikel-martin/purchase-wkfl/6.1-purchase_landed_costs into lp:purchase-wkfl/6.1.
=== added directory 'purchase_landed_costs'
=== added file 'purchase_landed_costs/__init__.py'
--- purchase_landed_costs/__init__.py	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/__init__.py	2013-12-18 22:53:49 +0000
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
+#
+#    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 product
+import stock
+import purchase
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'purchase_landed_costs/__openerp__.py'
--- purchase_landed_costs/__openerp__.py	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/__openerp__.py	2013-12-18 22:53:49 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
+#
+#    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': 'Landed Costs',
+    'version': '0.7',
+    'category': 'Warehouse Management',
+    'description': """
+    This module add the possibility to iclude landed costs in the average price computation.
+    The landed costs can be defined for 
+    * purchase orders
+    * purchase order lines
+    * pickings
+    * picking lines (stock moves)
+    costs defined for purchase orders and pickings will be distributed according to the distribution type
+    defined in landed cost category
+    * value - example custom fees
+    * quantity - example freight
+    """,
+    'author': 'Camptocamp Austria',
+    'depends': ['purchase' ],
+    'update_xml': ['security/ir.model.access.csv',
+                   'purchase_view.xml',
+                   'stock_view.xml',
+                   ],
+    'demo_xml': [],
+    'installable': True,
+    'active': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'purchase_landed_costs/i18n'
=== added file 'purchase_landed_costs/i18n/de.po'
--- purchase_landed_costs/i18n/de.po	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/i18n/de.po	2013-12-18 22:53:49 +0000
@@ -0,0 +1,333 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* purchase_landed_costs
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1rc1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-02-12 08:57+0000\n"
+"PO-Revision-Date: 2012-02-13 09:37+0000\n"
+"Last-Translator: Ferdinand @ Camptocamp <Unknown>\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-10-23 05:13+0000\n"
+"X-Generator: Launchpad (build 16179)\n"
+
+#. module: purchase_landed_costs
+#: field:product.category,landed_cost:0 field:product.template,landed_cost:0
+msgid "Calculate Landed Costs"
+msgstr "Berechnete Einstandskosten"
+
+#. module: purchase_landed_costs
+#: sql_constraint:purchase.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr "Bestellbezug muss je Unternehmen eindeutig sein!"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order_line
+#: field:landed.cost.position,purchase_order_line_id:0
+msgid "Purchase Order Line"
+msgstr "Einkaufspositionen"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,move_line_id:0
+msgid "Picking Line"
+msgstr "Lieferscheinzeile"
+
+#. module: purchase_landed_costs
+#: field:stock.move,sub_total:0
+msgid "Line Sub Total"
+msgstr "Zeile Teilsumme"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,partner_id:0
+msgid "The supplier of this cost component ."
+msgstr "Der Lieferant dieser Kostenkomponente"
+
+#. module: purchase_landed_costs
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+"Fehler: Die Standard Mengeneinheit (ME) sowie die Mengeneinheit (ME) bei der "
+"Beschaffung muss in derselben Kategorie sein."
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You must assign a production lot for this product"
+msgstr "Sie müssen zwingend eine Losnummer für dieses Produkt angeben"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount_currency:0
+msgid "The amount expressed in an optional other currency."
+msgstr "optionaler Betrag in anderer Währung"
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost_type:0
+msgid ""
+"Used if this product is landed costs: If landed costs are defined for "
+"purchase orders or pickings, this indicates how the costs are distributed to "
+"the lines"
+msgstr ""
+"Aktivieren, wenn dieses Produkt als Bestellnebenkosten für die "
+"Durschnittspreisberechung verfügbar sein soll. Wenn die Nebenkosten für den "
+"Lieferschein definiert sind, gibt dies an, welcher Schüssel (Mengen, Wert) "
+"für die Verteilung verwendet werden soll."
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Per Unit"
+msgstr "Je Einheit"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_picking
+msgid "Picking List"
+msgstr "Lieferschein"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_landed_cost_position
+msgid "landed.cost.position"
+msgstr "landed.cost.position"
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs_picking:0
+msgid "Landing Costs from Picking"
+msgstr "Einstandsnebenkosten vom Lieferschien"
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Absolute Value"
+msgstr "Absoluter Wert"
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost:0
+msgid ""
+"Checck this if you want to use landed cost calculation for average price for "
+"this product"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_line_ids:0
+#: field:purchase.order.line,landed_costs:0 field:stock.move,landed_cost:0
+msgid "Landed Costs"
+msgstr "Einstandskosten"
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You try to assign a lot which is not from the same product"
+msgstr ""
+"Sie versuchen eine Losnummer ohne Bezug zu diesem Produkt zuzuweisen."
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You can not move products from or to a location of the type view."
+msgstr "Sie können keine Buchungen auf Sichten machen"
+
+#. module: purchase_landed_costs
+#: view:landed.cost.position:0 view:purchase.order:0
+#: view:purchase.order.line:0 field:purchase.order.line,landing_costs:0
+#: view:stock.picking:0
+msgid "Landing Costs"
+msgstr "Einstandsnebenkosten"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_picking_line
+msgid "stock.partial.picking.line"
+msgstr "pstock.partial.picking.line"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,quantity_total:0 field:stock.picking,quantity_total:0
+msgid "Total Quantity"
+msgstr "Gesamtmenge"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,currency_id:0
+msgid "Optional other currency."
+msgstr "Optional andere Währung"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_value:0
+#: field:stock.picking,landed_cost_base_value:0
+msgid "Landed Costs Base Value"
+msgstr "Einstandskosten Basis Wert"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,picking_id:0
+msgid "Picking"
+msgstr "Lieferschein"
+
+#. module: purchase_landed_costs
+#: field:stock.picking,total_amount:0
+msgid "Total Product Price"
+msgstr "Gesamter Produktpreis"
+
+#. module: purchase_landed_costs
+#: field:stock.move,price_unit_net:0
+msgid "Purchase Price"
+msgstr "Kaufpreis"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landing_cost_lines:0
+#: field:stock.picking,landing_cost_lines:0
+msgid "Landing Cost Lines"
+msgstr "Einstandsnebenkostenzeilen"
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid ""
+"Error: Negative quantities for location and/or lots are not allowed for this "
+"product or product category"
+msgstr "Fehler: negative Mengen sind für diesen Lagerort / Los nicht erlaubt"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "None"
+msgstr "Keine"
+
+#. module: purchase_landed_costs
+#: field:product.template,landed_cost_type:0
+msgid "Distribution Type"
+msgstr "Verteilungsart"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_move
+msgid "Partial Move Processing Wizard"
+msgstr "Assistent für Teillieferungen"
+
+#. module: purchase_landed_costs
+#: view:stock.picking:0
+msgid "Notes"
+msgstr "Notizen"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,currency_id:0
+msgid "Secondary Currency"
+msgstr "Alternative Währung"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Value"
+msgstr "Betrag"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order
+#: field:landed.cost.position,purchase_order_id:0
+msgid "Purchase Order"
+msgstr "Einkaufsauftrag"
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landed_cost_line_ids:0
+#: field:stock.move,landed_cost_line_ids:0
+#: field:stock.picking,landed_cost_line_ids:0
+msgid "Landed Costs Positions"
+msgstr "Nebenkostenpositionen"
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landing_costs_order:0
+msgid "Landing Costs from Order"
+msgstr "Nebenkosten vom Einkaufsauftrag"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount:0
+msgid "Amount"
+msgstr "Betrag"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_category
+msgid "Product Category"
+msgstr "Produktkategorie"
+
+#. module: purchase_landed_costs
+#: sql_constraint:stock.picking:0
+msgid "Reference must be unique per Company!"
+msgstr "Referenz muss je Unternehmen eindeutig sein"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_picking
+msgid "Partial Picking Processing Wizard"
+msgstr "Teillieferungsassistent"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,price_type:0
+msgid ""
+"Defines if the amount is to be calculated for each quantity or an absolute "
+"value"
+msgstr ""
+"Definiert, ob der Wert je Mengeneinheit oder absolut gerechnet werden muss"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Quantity"
+msgstr "Menge"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,product_id:0
+msgid "Landed Cost Name"
+msgstr "Nebenkosten Bezeichnung"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_quantity:0
+#: field:stock.picking,landed_cost_base_quantity:0
+msgid "Landed Costs Base Quantity"
+msgstr "Nebenkosten - Megnenbasis"
+
+#. module: purchase_landed_costs
+#: help:product.category,landed_cost:0
+msgid ""
+"Checck this if you want to use landed cost calculation for average price for "
+"this catgory"
+msgstr ""
+"Aktivieren, wenn für diese Produktkategorie Einstandsnebenkosten berechnet "
+"werden sollen"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_template
+msgid "Product Template"
+msgstr "Produktvorlage"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_move
+msgid "Stock Move"
+msgstr "Lagerbuchung"
+
+#. module: purchase_landed_costs
+#: constraint:product.category:0
+msgid "Error ! You cannot create recursive categories."
+msgstr "Fehler ! Sie dürfen keine rekurisven Kategorien anlegen."
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount_currency:0
+msgid "Amount Currency"
+msgstr "Währungsbetrag"
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs:0
+msgid "Line Landing Costs"
+msgstr "Nebenkosten Zeilen"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount:0
+msgid ""
+"Landed cost for stock valuation. It will be added to the price of the "
+"supplier price."
+msgstr ""
+"Einstandskosten für die Produktbewertung. Diese werden zu dem Produktpreis "
+"hinzugerechnet."
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,partner_id:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost:0 field:stock.picking,landed_cost:0
+msgid "Landed Costs Total Untaxed"
+msgstr "EInstandspreise ohne Umsatzsteuer"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,price_type:0
+msgid "Amount Type"
+msgstr "Berechnungsart"

=== added file 'purchase_landed_costs/i18n/es.po'
--- purchase_landed_costs/i18n/es.po	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/i18n/es.po	2013-12-18 22:53:49 +0000
@@ -0,0 +1,298 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* purchase_landed_costs
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-18 22:32+0000\n"
+"PO-Revision-Date: 2013-12-18 22:32+0000\n"
+"Last-Translator: Mikel Martin <mikel@xxxxxxxxxx>\n"
+"Language-Team: ES\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: purchase_landed_costs
+#: field:product.category,landed_cost:0
+#: field:product.template,landed_cost:0
+msgid "Calculate Landed Costs"
+msgstr "Calcular costes de llegada"
+
+#. module: purchase_landed_costs
+#: sql_constraint:purchase.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr "¡La referencia de la compra debe ser única por compañía!"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order_line
+#: field:landed.cost.position,purchase_order_line_id:0
+msgid "Purchase Order Line"
+msgstr "Línea pedido de compra"
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Per Quantity"
+msgstr "Per Quantity"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,move_line_id:0
+msgid "Picking Line"
+msgstr "Línea de albarán"
+
+#. module: purchase_landed_costs
+#: field:stock.move,sub_total:0
+msgid "Line Sub Total"
+msgstr "Línea del subtotal "
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,partner_id:0
+msgid "The supplier of this cost component ."
+msgstr "El porveedor de este componente."
+
+#. module: purchase_landed_costs
+#: constraint:product.template:0
+msgid "Error: The default UOM and the purchase UOM must be in the same category."
+msgstr "Error: La UdM por defecto y la UdM de compra deben estar en la misma categoría."
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You must assign a production lot for this product"
+msgstr "Debe asignar un lote de producción para este producto"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount_currency:0
+msgid "The amount expressed in an optional other currency."
+msgstr "La cantidad indicada es una moneda alternaiva opcional."
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost_type:0
+msgid "Used if this product is landed costs: If landed costs are defined for purchase orders or pickings, this indicates how the costs are distributed to the lines"
+msgstr "Usado si el producto es un \"coste de llegada\": Si los \"coste de llegada\" están definidos para pedidos de compra o albaranes, esto indica cómo se distribuyen los costes a cada línea."
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_picking
+msgid "Picking List"
+msgstr "Albarán"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_landed_cost_position
+msgid "landed.cost.position"
+msgstr "landed.cost.position"
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs_picking:0
+msgid "Landing Costs from Picking"
+msgstr "Costes de llegada desde el albarán"
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Absolute Value"
+msgstr "Valor absoluto"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_category
+msgid "Product Category"
+msgstr "Categoría de producto"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_line_ids:0
+#: field:purchase.order.line,landed_costs:0
+#: field:stock.move,landed_cost:0
+msgid "Landed Costs"
+msgstr "Costes de llegada"
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You try to assign a lot which is not from the same product"
+msgstr "Está intentando asignar un lote que no es del mismo producto"
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You can not move products from or to a location of the type view."
+msgstr "No puede mover productos desde o hacia una ubicación de tipo vista."
+
+#. module: purchase_landed_costs
+#: view:landed.cost.position:0
+#: view:purchase.order:0
+#: view:purchase.order.line:0
+#: field:purchase.order.line,landing_costs:0
+#: view:stock.picking:0
+msgid "Landing Costs"
+msgstr "Costes de llegada"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,currency_id:0
+msgid "Optional other currency."
+msgstr "Otra moneda opcional"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_value:0
+#: field:stock.picking,landed_cost_base_value:0
+msgid "Landed Costs Base Value"
+msgstr "Precio base de los costes de llegada"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,picking_id:0
+msgid "Picking"
+msgstr "Albarán"
+
+#. module: purchase_landed_costs
+#: field:stock.picking,total_amount:0
+msgid "Total Product Price"
+msgstr "Precio total del producto"
+
+#. module: purchase_landed_costs
+#: field:stock.move,price_unit_net:0
+msgid "Purchase Price"
+msgstr "Precio de compra"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landing_cost_lines:0
+#: field:stock.picking,landing_cost_lines:0
+msgid "Landing Cost Lines"
+msgstr "Líneas de costes de llegada"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "None"
+msgstr "Ninguna"
+
+#. module: purchase_landed_costs
+#: field:product.template,landed_cost_type:0
+msgid "Distribution Type"
+msgstr "Tipo de distribución"
+
+#. module: purchase_landed_costs
+#: view:stock.picking:0
+msgid "Notes"
+msgstr "Notas"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,currency_id:0
+msgid "Secondary Currency"
+msgstr "Moneda secundaria"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Value"
+msgstr "Valor"
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost:0
+msgid "Check this if you want to use landed cost calculation for average price for this product"
+msgstr "Check this if you want to use landed cost calculation for average price for this product"
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landed_cost_line_ids:0
+#: field:stock.move,landed_cost_line_ids:0
+#: field:stock.picking,landed_cost_line_ids:0
+msgid "Landed Costs Positions"
+msgstr "Posición de los costes de llegada"
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landing_costs_order:0
+msgid "Landing Costs from Order"
+msgstr "Costes de llegada desde el pedido"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount:0
+msgid "Amount"
+msgstr "Importe"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,quantity_total:0
+#: field:stock.picking,quantity_total:0
+msgid "Total Quantity"
+msgstr "Cantidad total"
+
+#. module: purchase_landed_costs
+#: sql_constraint:stock.picking:0
+msgid "Reference must be unique per Company!"
+msgstr "¡La referencia debe ser única por compañía!"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_picking
+msgid "Partial Picking Processing Wizard"
+msgstr "Asistente para el procesamiento de recogida parcial"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,price_type:0
+msgid "Defines if the amount is to be calculated for each quantity or an absolute value"
+msgstr "Define si el importe a calcular para cada cantida es un valor absoluto"
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Quantity"
+msgstr "Cantidad"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,product_id:0
+msgid "Landed Cost Name"
+msgstr "Nombre del coste de llegada"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_quantity:0
+#: field:stock.picking,landed_cost_base_quantity:0
+msgid "Landed Costs Base Quantity"
+msgstr "Catidad base del coste de llegada"
+
+#. module: purchase_landed_costs
+#: help:product.category,landed_cost:0
+msgid "Check this if you want to use landed cost calculation for average price for this catgory"
+msgstr "Check this if you want to use landed cost calculation for average price for this catgory"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_template
+msgid "Product Template"
+msgstr "Plantilla de producto"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_move
+msgid "Stock Move"
+msgstr "Moviemiento de stock"
+
+#. module: purchase_landed_costs
+#: constraint:product.category:0
+msgid "Error ! You cannot create recursive categories."
+msgstr "¡Error! No puede crear categorías recursivas"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount_currency:0
+msgid "Amount Currency"
+msgstr "Importe en moneda"
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs:0
+msgid "Line Landing Costs"
+msgstr "Costes de llegada de línea"
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount:0
+msgid "Landed cost for stock valuation. It will be added to the price of the supplier price."
+msgstr "Coste de llegada para la valoración de stock. Se añadirá a el precio de proveedor."
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,partner_id:0
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost:0
+#: field:stock.picking,landed_cost:0
+msgid "Landed Costs Total Untaxed"
+msgstr "Costes de llegada sin impuestos"
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order
+#: field:landed.cost.position,purchase_order_id:0
+msgid "Purchase Order"
+msgstr "Pedido de compra"
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,price_type:0
+msgid "Amount Type"
+msgstr "Tipo de importe"
+

=== added file 'purchase_landed_costs/i18n/purchase_landed_costs.pot'
--- purchase_landed_costs/i18n/purchase_landed_costs.pot	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/i18n/purchase_landed_costs.pot	2013-12-18 22:53:49 +0000
@@ -0,0 +1,320 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* purchase_landed_costs
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1rc1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-02-12 08:57+0000\n"
+"PO-Revision-Date: 2012-02-12 08:57+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: purchase_landed_costs
+#: field:product.category,landed_cost:0 field:product.template,landed_cost:0
+msgid "Calculate Landed Costs"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: sql_constraint:purchase.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order_line
+#: field:landed.cost.position,purchase_order_line_id:0
+msgid "Purchase Order Line"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,move_line_id:0
+msgid "Picking Line"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:stock.move,sub_total:0
+msgid "Line Sub Total"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,partner_id:0
+msgid "The supplier of this cost component ."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:product.template:0
+msgid ""
+"Error: The default UOM and the purchase UOM must be in the same category."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You must assign a production lot for this product"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount_currency:0
+msgid "The amount expressed in an optional other currency."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost_type:0
+msgid ""
+"Used if this product is landed costs: If landed costs are defined for "
+"purchase orders or pickings, this indicates how the costs are distributed to "
+"the lines"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Per Unit"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_picking
+msgid "Picking List"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_landed_cost_position
+msgid "landed.cost.position"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs_picking:0
+msgid "Landing Costs from Picking"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: selection:landed.cost.position,price_type:0
+msgid "Absolute Value"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:product.template,landed_cost:0
+msgid ""
+"Checck this if you want to use landed cost calculation for average price for "
+"this product"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_line_ids:0
+#: field:purchase.order.line,landed_costs:0 field:stock.move,landed_cost:0
+msgid "Landed Costs"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You try to assign a lot which is not from the same product"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid "You can not move products from or to a location of the type view."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: view:landed.cost.position:0 view:purchase.order:0
+#: view:purchase.order.line:0 field:purchase.order.line,landing_costs:0
+#: view:stock.picking:0
+msgid "Landing Costs"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_picking_line
+msgid "stock.partial.picking.line"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,quantity_total:0 field:stock.picking,quantity_total:0
+msgid "Total Quantity"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,currency_id:0
+msgid "Optional other currency."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_value:0
+#: field:stock.picking,landed_cost_base_value:0
+msgid "Landed Costs Base Value"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,picking_id:0
+msgid "Picking"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:stock.picking,total_amount:0
+msgid "Total Product Price"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:stock.move,price_unit_net:0
+msgid "Purchase Price"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landing_cost_lines:0
+#: field:stock.picking,landing_cost_lines:0
+msgid "Landing Cost Lines"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:stock.move:0
+msgid ""
+"Error: Negative quantities for location and/or lots are not allowed for this "
+"product or product category"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "None"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:product.template,landed_cost_type:0
+msgid "Distribution Type"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_move
+msgid "Partial Move Processing Wizard"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: view:stock.picking:0
+msgid "Notes"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,currency_id:0
+msgid "Secondary Currency"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Value"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_purchase_order
+#: field:landed.cost.position,purchase_order_id:0
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landed_cost_line_ids:0
+#: field:stock.move,landed_cost_line_ids:0
+#: field:stock.picking,landed_cost_line_ids:0
+msgid "Landed Costs Positions"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order.line,landing_costs_order:0
+msgid "Landing Costs from Order"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount:0
+msgid "Amount"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_category
+msgid "Product Category"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: sql_constraint:stock.picking:0
+msgid "Reference must be unique per Company!"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_partial_picking
+msgid "Partial Picking Processing Wizard"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,price_type:0
+msgid ""
+"Defines if the amount is to be calculated for each quantity or an absolute "
+"value"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: selection:product.template,landed_cost_type:0
+msgid "Quantity"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,product_id:0
+msgid "Landed Cost Name"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost_base_quantity:0
+#: field:stock.picking,landed_cost_base_quantity:0
+msgid "Landed Costs Base Quantity"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:product.category,landed_cost:0
+msgid ""
+"Checck this if you want to use landed cost calculation for average price for "
+"this catgory"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_product_template
+msgid "Product Template"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: model:ir.model,name:purchase_landed_costs.model_stock_move
+msgid "Stock Move"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: constraint:product.category:0
+msgid "Error ! You cannot create recursive categories."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,amount_currency:0
+msgid "Amount Currency"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:stock.move,landing_costs:0
+msgid "Line Landing Costs"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: help:landed.cost.position,amount:0
+msgid ""
+"Landed cost for stock valuation. It will be added to the price of the "
+"supplier price."
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,partner_id:0
+msgid "Partner"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:purchase.order,landed_cost:0 field:stock.picking,landed_cost:0
+msgid "Landed Costs Total Untaxed"
+msgstr ""
+
+#. module: purchase_landed_costs
+#: field:landed.cost.position,price_type:0
+msgid "Amount Type"
+msgstr ""

=== added file 'purchase_landed_costs/product.py'
--- purchase_landed_costs/product.py	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/product.py	2013-12-18 22:53:49 +0000
@@ -0,0 +1,47 @@
+#  -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
+#
+#    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 osv import osv, fields
+from tools.translate import _
+        
+
+#----------------------------------------------------------
+# Product INHERIT
+#----------------------------------------------------------
+class product_template(osv.osv):
+    _inherit = "product.template"
+
+    _columns = {
+        'landed_cost_type': fields.selection( [('value','Value'), ('per_unit','Quantity'), ('none','None')], 'Distribution Type',  \
+                  help="Used if this product is landed costs: If landed costs are defined for purchase orders or pickings, this indicates how the costs are distributed to the lines"),
+        'landed_cost'    :fields.boolean('Calculate Landed Costs', help="Check this if you want to use landed cost calculation for average price for this product"), 
+    }
+
+product_template()
+
+class product_category(osv.osv):
+    _inherit = 'product.category'
+    _columns = {
+        'landed_cost'    :fields.boolean('Calculate Landed Costs', help="Check this if you want to use landed cost calculation for average price for this catgory"),
+    }
+product_category()
+

=== added file 'purchase_landed_costs/purchase.py'
--- purchase_landed_costs/purchase.py	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/purchase.py	2013-12-18 22:53:49 +0000
@@ -0,0 +1,243 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2010-2012 Camptocamp (<http://www.camptocamp.at>)
+#
+#    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 osv import osv, fields
+import decimal_precision as dp
+from tools.translate import _
+import logging
+
+class landed_cost_position(osv.osv):
+    _name = "landed.cost.position"
+
+    _columns = \
+      { 'product_id' : fields.many2one('product.product','Landed Cost Name', required=True, domain=[('landed_cost_type','!=', False)]),
+        'amount'      : fields.float
+            ( 'Amount'
+            , required=True
+            , digits_compute=dp.get_precision('Purchase Price')
+            , help="""Landed cost for stock valuation. It will be added to the price of the supplier price."""),
+        'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency."),
+        'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Optional other currency."),
+        'partner_id': fields.many2one('res.partner', 'Partner', help="The supplier of this cost component ."),
+        'price_type': fields.selection( [('per_unit','Per Quantity'), ('value','Absolute Value')], 'Amount Type', required=True,  \
+                  help="Defines if the amount is to be calculated for each quantity or an absolute value"),
+        'purchase_order_line_id': fields.many2one('purchase.order.line', 'Purchase Order Line'),
+        'purchase_order_id': fields.many2one('purchase.order', 'Purchase Order'),
+        'move_line_id': fields.many2one('stock.move', 'Picking Line'),
+        'picking_id': fields.many2one('stock.picking', 'Picking'),
+      }
+
+    def onchange_product_id(self, cr, uid, ids, product_id, context=None):
+        if product_id:
+            prod_obj=self.pool.get('product.product')
+            prod=prod_obj.browse(cr,uid,[product_id])[0]
+            v = {'price_type':prod.landed_cost_type}
+            return {'value': v}
+        return {}
+
+landed_cost_position()
+
+#----------------------------------------------------------
+# Purchase Line INHERIT
+#----------------------------------------------------------
+class purchase_order_line(osv.osv):
+    _inherit = "purchase.order.line"
+
+    def _landing_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            landed_costs = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.price_type == 'value':
+                        landed_costs += costs.amount
+                    else:       
+                        landed_costs += costs.amount * line.product_qty
+            result[line.id] = landed_costs
+        return result
+
+    def _landing_cost_order(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        lines = self.browse(cr, uid, ids)
+        # Landed costs line by line
+        for line in lines:
+            landed_costs = 0.0
+            # distribution of landed costs of PO
+            if line.order_id.landed_cost_line_ids:
+                # Base value (Absolute Value)
+                landed_costs += line.order_id.landed_cost_base_value / line.order_id.amount_total * line.price_subtotal
+
+                # Base quantity (Per Quantity)
+                landed_costs += line.order_id.landed_cost_base_quantity / line.order_id.quantity_total * line.product_qty
+            result[line.id] = landed_costs
+
+        return result
+
+
+    def _landed_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            result[line.id] = line.price_subtotal + line.landing_costs +  line.landing_costs_order
+
+        return result
+        
+    _columns = \
+       {
+         'landed_cost_line_ids': fields.one2many('landed.cost.position', 'purchase_order_line_id', 'Landed Costs Positions'),
+         'landing_costs' : fields.function(_landing_cost, digits_compute=dp.get_precision('Account'), string='Landing Costs'),
+         'landing_costs_order' : fields.function(_landing_cost_order, digits_compute=dp.get_precision('Account'), string='Landing Costs from Order'),
+         'landed_costs' : fields.function(_landed_cost, digits_compute=dp.get_precision('Account'), string='Landed Costs'),
+    }
+
+purchase_order_line()
+
+class purchase_order(osv.osv):
+    _inherit = "purchase.order"
+    _logger = logging.getLogger(__name__)
+
+    def _landed_cost_base_value(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        
+        for line in self.browse(cr, uid, ids):
+            landed_costs_base_value = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.product_id.landed_cost_type == 'value':
+                        landed_costs_base_value += costs.amount
+            result[line.id] = landed_costs_base_value
+        return result
+
+    def _landed_cost_base_quantity(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        
+        for line in self.browse(cr, uid, ids):
+            landed_costs_base_quantity = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.product_id.landed_cost_type == 'quantity':
+                         landed_costs_base_quantity += costs.amount
+            result[line.id] = landed_costs_base_quantity
+        return result
+
+    def _quantity_total(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        
+        for line in self.browse(cr, uid, ids):
+            quantity_total = 0.0
+            if line.order_line:
+                for pol in line.order_line:
+                    if pol.product_qty > 0.0:
+                         quantity_total += pol.product_qty
+            result[line.id] = quantity_total
+        return result
+
+    def _landed_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costs for the line
+        for line in self.browse(cr, uid, ids):
+            result[line.id] = line.landing_cost_lines + line.amount_untaxed
+
+        return result
+
+    def _landing_cost_lines(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        landed_cost_lines = 0.0
+        for line in self.browse(cr, uid, ids):
+            if line.order_line:
+                for pol in line.order_line:
+                    if pol.product_qty > 0.0:
+                         landed_cost_lines += pol.landing_costs
+            result[line.id] = landed_cost_lines
+        return result
+
+
+    _columns = \
+        {
+         'landed_cost_line_ids': fields.one2many('landed.cost.position', 'purchase_order_id', 'Landed Costs'),
+         'landed_cost_base_value' : fields.function(_landed_cost_base_value, digits_compute=dp.get_precision('Account'), string='Landed Costs Base Value'),
+         'landed_cost_base_quantity' : fields.function(_landed_cost_base_quantity, digits_compute=dp.get_precision('Account'), string='Landed Costs Base Quantity'),
+         'landing_cost_lines' : fields.function(_landing_cost_lines, digits_compute=dp.get_precision('Account'), string='Landing Cost Lines'),
+         'landed_cost' : fields.function(_landed_cost, digits_compute=dp.get_precision('Account'), string='Landed Costs Total Untaxed'),
+         'quantity_total' : fields.function(_quantity_total, digits_compute=dp.get_precision('Product UoM'), string='Total Quantity'),
+    }
+
+    def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, context=None):
+        res = super(purchase_order,self)._prepare_order_line_move( cr, uid, order, order_line, picking_id, context)
+        res['price_unit_net'] =  res['price_unit']
+        res['price_unit'] = order_line.landed_costs / order_line.product_qty
+        return res
+        
+    def _prepare_order_picking(self, cr, uid, order, context=None):
+        res = super(purchase_order,self)._prepare_order_picking( cr, uid, order, context)
+
+        return res
+
+    def _create_pickings(self, cr, uid, order, order_lines, picking_id=False, context=None): 
+        res =  super(purchase_order,self)._create_pickings(cr, uid, order, order_lines, picking_id, context)
+        pick_id = int(res[0])
+        # landing costs for PICK from PO 
+        cost_obj = self.pool.get('landed.cost.position')
+        for order_cost in order.landed_cost_line_ids:
+            vals = {}
+            vals['product_id'] = order_cost.product_id.id
+            vals['partner_id'] = order_cost.partner_id.id
+            vals['amount'] = order_cost.amount
+            vals['amount_currency'] = order_cost.amount_currency
+            vals['currency_id'] = order_cost.currency_id.id
+            vals['price_type'] = order_cost.price_type
+            vals['picking_id'] = pick_id
+            self._logger.debug('vals `%s`', vals)
+            cost_obj.create(cr, uid, vals, context=None) 
+
+        #self.pool.get('landed.cost.position').create(cr, uid, cost_lines, context=None) 
+        # landing costs for PICK Lines from PO   
+        pick_obj = self.pool.get('stock.picking')
+        for pick in pick_obj.browse(cr, uid, [pick_id], context=None):
+          self._logger.debug('pick `%s`', pick)
+          for line in pick.move_lines:
+           self._logger.debug('line `%s`', line)
+           for order_cost in line.purchase_line_id.landed_cost_line_ids:
+            vals = {}
+            vals['product_id'] = order_cost.product_id.id
+            vals['partner_id'] = order_cost.partner_id.id
+            vals['amount'] = order_cost.amount
+            vals['amount_currency'] = order_cost.amount_currency
+            vals['currency_id'] = order_cost.currency_id.id
+            vals['price_type'] = order_cost.price_type
+            vals['move_line_id'] = line.id
+            self._logger.debug('vals `%s`', vals)
+            cost_obj.create(cr, uid, vals, context=None) 
+        self._logger.debug('cost created')
+           
+        return res
+
+purchase_order()

=== added file 'purchase_landed_costs/purchase_view.xml'
--- purchase_landed_costs/purchase_view.xml	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/purchase_view.xml	2013-12-18 22:53:49 +0000
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+  <data>
+
+     <record model="ir.ui.view" id="c2c_landed_cost_tree">
+      <field name="name">c2clanded.cost.tree</field>
+      <field name="model">landed.cost.position</field>
+      <field name="priority">1</field>
+      <field name="type">tree</field>
+      <field name="arch" type="xml">
+        <tree string="Landing Costs" editable="bottom">
+              <field name="product_id" on_change="onchange_product_id(product_id)"/>
+              <field name="partner_id"/>
+              <field name="amount"/>
+              <field name="price_type"/>
+              <field name="amount_currency"/>
+              <field name="currency_id"/>
+        </tree>
+      </field>
+    </record>
+
+     <record model="ir.ui.view" id="c2c_landed_cost_form">
+      <field name="name">c2clanded.cost.form</field>
+      <field name="model">landed.cost.position</field>
+      <field name="priority">1</field>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <form string="Landing Costs">
+              <field name="product_id" on_change="onchange_product_id(product_id)"/>
+              <field name="partner_id"/>
+              <field name="amount"/>
+              <field name="price_type"/>
+              <field name="amount_currency"/>
+              <field name="currency_id"/>
+        </form>
+      </field>
+    </record>
+    
+
+              
+        <!-- ******************
+         Landed cost definition in product form
+         ******************-->
+    <record model="ir.ui.view" id="c2c_product_landed_cost_view">
+      <field name="name">c2c_product.landed.cost.view</field>
+      <field name="model">product.product</field>
+      <field name="inherit_id" ref="product.product_normal_form_view"/>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <field name="active" position="after">
+             <field name="landed_cost_type"/>
+             <field name="landed_cost"/>
+        </field>
+      </field>
+    </record>
+    
+    <!-- Landed costs Purchase Form-->
+    <record model="ir.ui.view" id="c2c_purchase_order_landed_cost_view">
+      <field name="name">c2c_purchase.order.landed.cost.form.view</field>
+      <field name="model">purchase.order</field>
+      <field name="inherit_id" ref="purchase.purchase_order_form"/>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <notebook position="inside">
+          <page string="Landing Costs" attrs="{'readonly':[('state','=','done')]}">
+            <group colspan="2" col="2"> 
+             <field name="quantity_total"/>
+             <field name="landed_cost_base_quantity"/>
+             <field name="landed_cost_base_value"/>
+           </group>
+           <group colspan="2" col="2"> 
+              
+             <field name="landing_cost_lines"/>
+             <field name="landed_cost"/>
+           </group>
+             <field name="landed_cost_line_ids" colspan="4" nolabel="1"  widget="one2many_list"/>
+           
+          </page>
+        </notebook>
+      </field>
+    </record>
+    
+    <!-- Landed costs Purchase Line Form-->
+    <record model="ir.ui.view" id="purchase_oder_line_landed_cost_view">
+      <field name="name">purchase.oder.line.landed.cost.view</field>
+      <field name="model">purchase.order.line</field>
+      <field name="inherit_id" ref="purchase.purchase_order_line_form"/>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <notebook position="inside">
+             <page string="Landing Costs" >
+                <group colspan="2" col="2"> 
+                  <field name="landing_costs"/>
+                  <field name="landing_costs_order"/>
+                  <field name="landed_costs"/>
+                  <field name="landed_cost_line_ids" colspan="4" nolabel="1"  widget="one2many_list"/>
+                </group>  
+             </page>     
+        </notebook>
+      </field>
+    </record>
+
+  </data>
+</openerp>

=== added directory 'purchase_landed_costs/security'
=== added file 'purchase_landed_costs/security/ir.model.access.csv'
--- purchase_landed_costs/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/security/ir.model.access.csv	2013-12-18 22:53:49 +0000
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+access_landed_cost,landed.cost.position,model_landed_cost_position,purchase.group_purchase_user,1,1,1,1
+access_landed_cost_manager,landed.cost.position,model_landed_cost_position,purchase.group_purchase_manager,1,1,1,1

=== added file 'purchase_landed_costs/stock.py'
--- purchase_landed_costs/stock.py	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/stock.py	2013-12-18 22:53:49 +0000
@@ -0,0 +1,196 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    Copyright (C) 2010-2012 Camptocamp (<http://www.camptocamp.at>)
+#
+#    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 osv import osv, fields
+import decimal_precision as dp
+import logging
+#----------------------------------------------------------
+#  Stock Move
+#----------------------------------------------------------
+class stock_move(osv.osv):
+    _inherit = "stock.move"
+    
+    def _landing_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            landed_costs = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.price_type == 'value':
+                        landed_costs += costs.amount
+                    else:
+                        landed_costs += costs.amount * line.product_qty
+            result[line.id] = landed_costs
+        return result
+
+    def _landing_cost_order(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            landed_costs = 0.0            
+            # distrubution of landed costs of PO
+            if line.picking_id.landed_cost_line_ids:
+               if line.picking_id.total_amount and line.picking_id.total_amount > 0.0:
+                   landed_costs += line.picking_id.landed_cost_base_value / line.picking_id.total_amount * line.price_unit * line.product_qty 
+               if line.picking_id.quantity_total and line.picking_id.quantity_total >0.0:
+                   landed_costs +=  line.picking_id.landed_cost_base_quantity / line.picking_id.quantity_total * line.product_qty
+            result[line.id] = landed_costs
+
+        return result
+
+    def _landed_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            result[line.id] = line.product_qty * line.price_unit
+
+        return result
+
+    def _sub_total(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        for line in self.browse(cr, uid, ids):
+            result[line.id] = line.product_qty * line.price_unit_net or 0.0
+
+        return result
+
+
+    _columns = { 
+         'landed_cost_line_ids': fields.one2many('landed.cost.position', 'move_line_id', 'Landed Costs Positions'),
+         'landing_costs' : fields.function(_landing_cost, digits_compute=dp.get_precision('Account'), string='Line Landing Costs'),
+         'landing_costs_picking' : fields.function(_landing_cost_order, digits_compute=dp.get_precision('Account'), string='Landing Costs from Picking'),
+         'landed_cost' : fields.function(_landed_cost, digits_compute=dp.get_precision('Account'), string='Landed Costs'),
+         'sub_total' : fields.function(_sub_total, digits_compute=dp.get_precision('Account'), string='Line Sub Total'),
+         'price_unit_net' : fields.float('Purchase Price', digits_compute=dp.get_precision('Account'), ),
+    }
+
+stock_move()
+
+#----------------------------------------------------------
+# Stock Picking
+#----------------------------------------------------------
+class stock_picking(osv.osv):
+    _inherit = "stock.picking"
+
+    def _landed_cost_base_value(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        for line in self.browse(cr, uid, ids):
+            landed_costs_base_value = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.product_id.landed_cost_type == 'value':
+                        landed_costs_base_value += costs.amount
+            result[line.id] = landed_costs_base_value
+        return result
+
+    def _landed_cost_base_quantity(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        for line in self.browse(cr, uid, ids):
+            landed_costs_base_quantity = 0.0
+            if line.landed_cost_line_ids:
+                for costs in line.landed_cost_line_ids:
+                    if costs.product_id.landed_cost_type == 'quantity':
+                         landed_costs_base_quantity += costs.amount
+            result[line.id] = landed_costs_base_quantity
+        return result
+
+    def _landed_cost(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        # landed costss for the line
+        for line in self.browse(cr, uid, ids):
+            landed_costs = 0.0            
+            if line.move_lines:
+                for ml in line.move_lines:
+                    landed_costs += ml.landed_cost 
+            result[line.id] = landed_costs
+
+        return result
+
+    def _landing_cost_lines(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        for line in self.browse(cr, uid, ids):
+            landed_cost_lines = 0.0
+            if line.move_lines:
+                for ml in line.move_lines:
+                    if ml.product_qty > 0.0:
+                         landed_cost_lines += ml.landing_costs + ml.landing_costs_picking
+            result[line.id] = landed_cost_lines
+        return result
+
+    def _quantity_total(self, cr, uid, ids, name, args, context):
+        if not ids : return {}
+        result = {}
+        for line in self.browse(cr, uid, ids):
+            quantity_total = 0.0
+            if line.move_lines:
+                for ml in line.move_lines:
+                    if ml.product_qty > 0.0:
+                         quantity_total += ml.product_qty
+            result[line.id] = quantity_total
+        return result
+
+    def _amount_total(self, cr, uid, ids, name, args, context):
+        if not ids:
+            return {}
+        result = {}
+        stock_picking_lines = self.browse(cr, uid, ids)
+        for line in stock_picking_lines:
+            amount_total = 0.0
+            if line.move_lines:
+                for ml in line.move_lines:
+                    if ml.product_qty > 0.0 and ml.price_unit:
+                         amount_total += ml.sub_total
+            result[line.id] = amount_total
+        return result
+
+
+    _columns = { 
+         'landed_cost_line_ids': fields.one2many('landed.cost.position', 'picking_id', 'Landed Costs Positions'),
+         'landed_cost_base_value' : fields.function(_landed_cost_base_value, digits_compute=dp.get_precision('Account'), string='Landed Costs Base Value'),
+         'landed_cost_base_quantity' : fields.function(_landed_cost_base_quantity, digits_compute=dp.get_precision('Account'), string='Landed Costs Base Quantity'),
+         'landing_cost_lines' : fields.function(_landing_cost_lines, digits_compute=dp.get_precision('Account'), string='Landing Cost Lines'),
+         'landed_cost' : fields.function(_landed_cost, digits_compute=dp.get_precision('Account'), string='Landed Costs Total Untaxed'),
+         'total_amount' : fields.function(_amount_total, digits_compute=dp.get_precision('Account'), string='Total Product Price'),
+         'quantity_total' : fields.function(_quantity_total, digits_compute=dp.get_precision('Product UoM'), string='Total Quantity'),
+    }
+
+stock_picking()
+
+class stock_partial_picking(osv.osv_memory):
+    _inherit = "stock.partial.picking"
+    _logger = logging.getLogger(__name__)
+
+    def _product_cost_for_average_update(self, cr, uid, move):
+       res = super(stock_partial_picking, self)._product_cost_for_average_update(cr, uid, move)
+       self._logger.debug('res stock_partial_picking `%s`', res)
+       res['cost'] = move.landed_cost / move.product_qty
+       self._logger.debug('res stock_partial_picking `%s`', res)
+       return res
+
+stock_partial_picking()

=== added file 'purchase_landed_costs/stock_view.xml'
--- purchase_landed_costs/stock_view.xml	1970-01-01 00:00:00 +0000
+++ purchase_landed_costs/stock_view.xml	2013-12-18 22:53:49 +0000
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+  <data>
+
+    <!-- Landed costs Picking In Form-->
+    <record model="ir.ui.view" id="c2c_stock_picking_landed_cost_view">
+      <field name="name">c2c_stock.picking.landed.cost.form.view</field>
+      <field name="model">stock.picking</field>
+      <field name="inherit_id" ref="stock.view_picking_in_form"/>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+        <page string="Notes" position="after">
+          <page string="Landing Costs" attrs="{'readonly':[('state','=','done')]}">
+            <group colspan="2" col="2">
+             <field name="quantity_total"/>
+             <field name="landed_cost_base_quantity"/>
+             <field name="landed_cost_base_value"/>
+            </group>
+            <group colspan="2" col="2">
+             <field name="total_amount"/>
+             <field name="landing_cost_lines"/>
+             <field name="landed_cost"/>
+            </group>
+             <field name="landed_cost_line_ids" colspan="4" nolabel="1"  widget="one2many_list"/>
+          </page>
+        </page>
+      </field>
+    </record>
+    
+    <!-- Landed costs Picking In Line Form-->
+    <record model="ir.ui.view" id="ic2c_stock_picking_landed_cost_line_view">
+      <field name="name">move.line.landed.cost.line.view</field>
+      <field name="model">stock.picking</field>
+      <field name="inherit_id" ref="stock.view_picking_in_form"/>
+      <field name="type">form</field>
+      <field name="arch" type="xml">
+           <xpath expr="/form/notebook/page[@string='General Information']/field/form/label" position="before">   
+             <group string="Landing Costs" colspan="4">
+                  <field name="landing_costs"/>
+                  <field name="landing_costs_picking"/>
+                  <field name="sub_total"/>
+                  <field name="landed_cost"/>
+                  <field name="landed_cost_line_ids" colspan="4" nolabel="1"  widget="one2many_list"/>
+             </group>     
+        </xpath>
+      </field>
+    </record>
+  </data>
+</openerp>

=== added directory 'purchase_landed_costs/wizard'

Follow ups