Purchase Landed Costs

purchase_landed_costs
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/9.0/purchase_landed_costs
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSStéphane Bidoul (ACSONE)
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - purchase
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - report
    - procurement
    - barcodes
    - web_planner
    - account
    - analytic
    - web_tip
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Purchase Landed Costs
=====================

This module adds the possibility to include estimated landed costs to the
average price computation. To define those landed costs, create products
for every landed costs and affect them a distribution type. Don't forget to
as well assign them a specific financial account (the one which will record
the real cost) in order to compare at the end of the year the estimation
with real accounting entries (see stock valuation). The landed costs is
defined in purchase orders. These costs will be distributed according to
the distribution type defined in landed cost:

 * value - example custom fees
 * quantity - example freight

Note : Products used to define landed cost must have a default "Distribution
Type" set (Value/Quantity).

For each landed cost position (=line) define in a PO, a draft invoice can be
pre-created at PO validation (an option need to be checked). Doing so will
allow you to see those invoices using the view invoice button directly from
the PO. You can define landed cost relative to a whole PO or by PO line (or
both) and the system will distribute them to each line according to the
chosen distribution type.

Note that the landed cost is always expressed in company currency.

Find all landed cost here : Reporting -> Purchase -> Landed costs

Stock valuation:
----------------
As the average price is also used for the stock valuation and because the
computation is based on estimation of landed cost in the PO (done at
incoming shipment reception), you will have a  difference with the actual
accounting bookings of landed cost.  Stock valuation will have to be
adjusted with a manual journal entry. In order to correct that amount, make
a sum of estimated landed cost (landed cost position) by account and
compare with the real account chart value. You can access those
informations through this menu: Reporting -> Purchase -> Landed costs

Warning:
--------

 * Average price will be computed based on the estimation made on the PO - not
   from real cost. This is due to the way OpenERP compute average stock: it
   stores the updated value at every input, no history, so no way to redefine
   the value afterwards.

   i.e.
    - incomming 01: 100 product A at 50.- AVG = 50.-, stock = 100
    - incomming 02: 100 product A at 60.- AVG = 55.-, stock = 200
    - delivery 01: 50 product A AVG = 55.-, stock = 150
    - Receive the real landed cost of 10.- for incomming 01
  => cannot compute back because no historical price was store for every
  transaction. Moreover, in OpenERP I can even
  set another average price for a product using the update wizard.


 * As the price type of OpenERP is not really well handled, we need to be sure
   that price type of cost price in product form is the same as the company
   one. Otherwise, when computing the AVG price, it make the convertion in
   company currency from the price type currency. This is not related to this
   module, but from the core of OpenERP. If you use this module in
   multi-company and different currency between company, you'll have to not
   share the product between them, even if product are the same (bug:
   https://bugs.launchpad.net/ocb-addons/+bug/1238525).

TODO/Ideas:
-----------
 * Manage multi-currencies landed costs in PO
 * Have the shipped date in landed cost instead of PO date for a better
   analysis
 * Compute a average purchase price per products while keep cost price as it is
   now

 Contributors:
 -------------

  * Joël Grand-Guillaume <joel.grand-guillaume@camptocamp.com>
  * Ferdinand Gasauer <ferdinand.gasauer@camptocamp.com>

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
c2c_landed_cost_form c2clanded.cost.form landed.cost.position form New
c2c_landed_cost_tree c2clanded.cost.tree landed.cost.position tree New
c2c_landed_cost_tree_stat c2clanded.cost.tree landed.cost.position tree New
c2c_product_landed_cost_view c2c_product.landed.cost.view product.product field Inherits product.product_normal_form_view
c2c_purchase_order_landed_cost_view c2c_purchase.order.landed.cost.form.view purchase.order data Inherits purchase.purchase_order_form
landed_cost_position_graph landed.cost.position.graph landed.cost.position graph New
purchase_oder_line_landed_cost_view purchase.oder.line.landed.cost.view purchase.order.line notebook Inherits purchase.purchase_order_line_form
view_landed_cost_search landed.cost.position.search landed.cost.position search New
view_order_form_editable_list purchase.order.landed.cost.form.view.form purchase.order xpath Inherits purchase.purchase_order_form
Models touched (8)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • create(self, cr, uid, vals, context=None)
    Add the purchase_order_id if only linked to a line
  • onchange_product_id(self, cr, uid, ids, product_id, purchase_order_id=False, context=None)
    Give the default value for the distribution type depending on the setting of the product and the use case: line or order position.
  • write(self, cr, uid, ids, vals, context=None)
    Add the purchase_order_id if only linked to a line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • wkf_approve_order(self, cr, uid, ids, context=None)
    On PO approval, generate all invoices for all landed cost position. Remember that only landed cost position with the checkbox generate_invoice ticked are generated.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/8.0/purchase_landed_costs
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Pedro M. Baeza, Stéphane Bidoul (ACSONE)
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:26
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - purchase
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
    - procurement
    - board
    - web_kanban_gauge
    - web_kanban_sparkline
    - account
    - analytic
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Purchase Landed Costs
=====================

This module adds the possibility to include estimated landed costs to the
average price computation. To define those landed costs, create products
for every landed costs and affect them a distribution type. Don't forget to
as well assign them a specific financial account (the one which will record
the real cost) in order to compare at the end of the year the estimation
with real accounting entries (see stock valuation). The landed costs is
defined in purchase orders. These costs will be distributed according to
the distribution type defined in landed cost:

 * value - example custom fees
 * quantity - example freight

Note : Products used to define landed cost must have a default "Distribution
Type" set (Value/Quantity).

For each landed cost position (=line) define in a PO, a draft invoice can be
pre-created at PO validation (an option need to be checked). Doing so will
allow you to see those invoices using the view invoice button directly from
the PO. You can define landed cost relative to a whole PO or by PO line (or
both) and the system will distribute them to each line according to the
chosen distribution type.

Note that the landed cost is always expressed in company currency.

Find all landed cost here : Reporting -> Purchase -> Landed costs

Stock valuation:
----------------
As the average price is also used for the stock valuation and because the
computation is based on estimation of landed cost in the PO (done at
incoming shipment reception), you will have a  difference with the actual
accounting bookings of landed cost.  Stock valuation will have to be
adjusted with a manual journal entry. In order to correct that amount, make
a sum of estimated landed cost (landed cost position) by account and
compare with the real account chart value. You can access those
informations through this menu: Reporting -> Purchase -> Landed costs

Warning:
--------

 * Average price will be computed based on the estimation made on the PO - not
   from real cost. This is due to the way OpenERP compute average stock: it
   stores the updated value at every input, no history, so no way to redefine
   the value afterwards.

   i.e.
    - incomming 01: 100 product A at 50.- AVG = 50.-, stock = 100
    - incomming 02: 100 product A at 60.- AVG = 55.-, stock = 200
    - delivery 01: 50 product A AVG = 55.-, stock = 150
    - Receive the real landed cost of 10.- for incomming 01
  => cannot compute back because no historical price was store for every
  transaction. Moreover, in OpenERP I can even
  set another average price for a product using the update wizard.


 * As the price type of OpenERP is not really well handled, we need to be sure
   that price type of cost price in product form is the same as the company
   one. Otherwise, when computing the AVG price, it make the convertion in
   company currency from the price type currency. This is not related to this
   module, but from the core of OpenERP. If you use this module in
   multi-company and different currency between company, you'll have to not
   share the product between them, even if product are the same (bug:
   https://bugs.launchpad.net/ocb-addons/+bug/1238525).

TODO/Ideas:
-----------
 * Manage multi-currencies landed costs in PO
 * Have the shipped date in landed cost instead of PO date for a better
   analysis
 * Compute a average purchase price per products while keep cost price as it is
   now

 Contributors:
 -------------

  * Joël Grand-Guillaume <joel.grand-guillaume@camptocamp.com>
  * Ferdinand Gasauer <ferdinand.gasauer@camptocamp.com>

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
c2c_landed_cost_form c2clanded.cost.form landed.cost.position form New
c2c_landed_cost_tree c2clanded.cost.tree landed.cost.position tree New
c2c_landed_cost_tree_stat c2clanded.cost.tree landed.cost.position tree New
c2c_product_landed_cost_view c2c_product.landed.cost.view product.product field Inherits product.product_normal_form_view
c2c_purchase_order_landed_cost_view c2c_purchase.order.landed.cost.form.view purchase.order data Inherits purchase.purchase_order_form
landed_cost_position_graph landed.cost.position.graph landed.cost.position graph New
purchase_oder_line_landed_cost_view purchase.oder.line.landed.cost.view purchase.order.line notebook Inherits purchase.purchase_order_line_form
view_landed_cost_search landed.cost.position.search landed.cost.position search New
view_order_form_editable_list purchase.order.landed.cost.form.view.form purchase.order xpath Inherits purchase.purchase_order_form
Models touched (8)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • create(self, cr, uid, vals, context=None)
    Add the purchase_order_id if only linked to a line
  • onchange_product_id(self, cr, uid, ids, product_id, purchase_order_id=False, context=None)
    Give the default value for the distribution type depending on the setting of the product and the use case: line or order position.
  • write(self, cr, uid, ids, vals, context=None)
    Add the purchase_order_id if only linked to a line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • wkf_approve_order(self, cr, uid, ids, context=None)
    On PO approval, generate all invoices for all landed cost position. Remember that only landed cost position with the checkbox generate_invoice ticked are generated.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/7.0/purchase_landed_costs
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSYannick Vaucher, Guewen Baconnier, Alexandre Fayolle, Joel Grand-Guillaume, Leonardo Pistone, unknown, Alexandre Fayolle @ camptocamp, Launchpad Translations on behalf of purchase-core-editors, OCA Transbot, Rudolf Schnapka, Lionel Sausin (Numérigraphe), Launchpad Translations on behalf of c2c, David Cormier, Alexandre Boily, ferdinand, openerp@bazaar.camptocamp.net, Gerhard Könighofer
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - purchase
    - stock
    - product
    - base
    - process
    - web
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - account
    - analytic
    - board
    - edi
    - email_template
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Purchase Landed Costs
=====================

This module adds the possibility to include estimated landed costs to the
average price computation. To define those landed costs, create products
for every landed costs and affect them a distribution type. Don't forget to
as well assign them a specific financial account (the one which will record
the real cost) in order to compare at the end of the year the estimation
with real accounting entries (see stock valuation). The landed costs is
defined in purchase orders. These costs will be distributed according to
the distribution type defined in landed cost:

 * value - example custom fees
 * quantity - example freight

Note : Products used to define landed cost must have a default "Distribution
Type" set (Value/Quantity).

For each landed cost position (=line) define in a PO, a draft invoice can be
pre-created at PO validation (an option need to be checked). Doing so will
allow you to see those invoices using the view invoice button directly from
the PO. You can define landed cost relative to a whole PO or by PO line (or
both) and the system will distribute them to each line according to the
chosen distribution type.

Note that the landed cost is always expressed in company currency.

Find all landed cost here : Reporting -> Purchase -> Landed costs

Stock valuation:
----------------
As the average price is also used for the stock valuation and because the
computation is based on estimation of landed cost in the PO (done at
incoming shipment reception), you will have a  difference with the actual
accounting bookings of landed cost.  Stock valuation will have to be
adjusted with a manual journal entry. In order to correct that amount, make
a sum of estimated landed cost (landed cost position) by account and
compare with the real account chart value. You can access those
informations through this menu: Reporting -> Purchase -> Landed costs

Warning:
--------

 * Average price will be computed based on the estimation made on the PO - not
   from real cost. This is due to the way OpenERP compute average stock: it
   stores the updated value at every input, no history, so no way to redefine
   the value afterwards.

   i.e.
    - incomming 01: 100 product A at 50.- AVG = 50.-, stock = 100
    - incomming 02: 100 product A at 60.- AVG = 55.-, stock = 200
    - delivery 01: 50 product A AVG = 55.-, stock = 150
    - Receive the real landed cost of 10.- for incomming 01
  => cannot compute back because no historical price was store for every
  transaction. Moreover, in OpenERP I can even
  set another average price for a product using the update wizard.


 * As the price type of OpenERP is not really well handled, we need to be sure
   that price type of cost price in product form is the same as the company
   one. Otherwise, when computing the AVG price, it make the convertion in
   company currency from the price type currency. This is not related to this
   module, but from the core of OpenERP. If you use this module in
   multi-company and different currency between company, you'll have to not
   share the product between them, even if product are the same (bug:
   https://bugs.launchpad.net/ocb-addons/+bug/1238525).

TODO/Ideas:
-----------
 * Manage multi-currencies landed costs in PO
 * Have the shipped date in landed cost instead of PO date for a better
   analysis
 * Compute a average purchase price per products while keep cost price as it is
   now

 Contributors:
 -------------

  * Joël Grand-Guillaume <joel.grand-guillaume@camptocamp.com>
  * Ferdinand Gasauer <ferdinand.gasauer@camptocamp.com>

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
c2c_landed_cost_form c2clanded.cost.form landed.cost.position form New
c2c_landed_cost_tree c2clanded.cost.tree landed.cost.position tree New
c2c_landed_cost_tree_stat c2clanded.cost.tree landed.cost.position tree New
c2c_product_landed_cost_view c2c_product.landed.cost.view product.product field Inherits product.product_normal_form_view
c2c_purchase_order_landed_cost_view c2c_purchase.order.landed.cost.form.view purchase.order data Inherits purchase.purchase_order_form
landed_cost_position_graph landed.cost.position.graph landed.cost.position graph New
purchase_oder_line_landed_cost_view purchase.oder.line.landed.cost.view purchase.order.line notebook Inherits purchase.purchase_order_line_form
view_landed_cost_search landed.cost.position.search landed.cost.position search New
view_order_form_editable_list purchase.order.landed.cost.form.view.form purchase.order xpath Inherits purchase.purchase_order_form
Models touched (8)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • create(self, cr, uid, vals, context=None)
    Add the purchase_order_id if only linked to a line
  • onchange_product_id(self, cr, uid, ids, product_id, purchase_order_id=False, context=None)
    Give the default value for the distribution type depending on the setting of the product and the use case: line or order position.
  • write(self, cr, uid, ids, vals, context=None)
    Add the purchase_order_id if only linked to a line

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • wkf_approve_order(self, cr, uid, ids, context=None)
    On PO approval, generate all invoices for all landed cost position. Remember that only landed cost position with the checkbox generate_invoice ticked are generated.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/6.1/purchase_landed_costs
VERSION
VERSION 0.8
CATEGORY
CATEGORYWarehouse Management
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSAlexandre Fayolle, mikel, Launchpad Translations on behalf of purchase-core-editors
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:04:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - purchase
    - stock
    - product
    - base
    - process
    - decimal_precision
    - account
    - base_setup
    - analytic
    - board
    - edi
    - email_template
    - mail
    - base_tools
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
    This module add the possibility to include 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
    

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
c2c_landed_cost_form c2clanded.cost.form landed.cost.position form New
c2c_landed_cost_tree c2clanded.cost.tree landed.cost.position tree New
c2c_product_landed_cost_view c2c_product.landed.cost.view product.product field Inherits product.product_normal_form_view
c2c_purchase_order_landed_cost_view c2c_purchase.order.landed.cost.form.view purchase.order notebook Inherits purchase.purchase_order_form
c2c_stock_picking_landed_cost_view c2c_stock.picking.landed.cost.form.view stock.picking page Inherits stock.view_picking_in_form
ic2c_stock_picking_landed_cost_line_view move.line.landed.cost.line.view stock.picking xpath Inherits stock.view_picking_in_form
purchase_oder_line_landed_cost_view purchase.oder.line.landed.cost.view purchase.order.line notebook Inherits purchase.purchase_order_line_form
Models touched (8)

New fields (0)

No new fields.

Public methods (1)
  • onchange_product_id(self, cr, uid, ids, product_id, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • write(self, cr, uid, ids, values, context=None)