Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.0
Category
Generic Modules/Projects & Services
Folder size
0.01 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-08-07 07:17:43
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
Pedro M. Baeza, Denis Roussel
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
In OpenERP, product prices (cost, list) are expressed in the currency of
the price_type (by default the same than your company currency).

The idea here is to have the same products between compagnies (with each one
their own currency through different price_type and different costs) but
only one pricelist for all. For that purpose, we add a company_id on price_type
object and a rule to separate them for each company. This way,
the price computation of pricelist will take the right price_type currency as
based price.

Concretely, to have a different cost price for a second company, you have to :
 - Create a new standard price on product.template
 - Create a new 'Price Type' on this new field, with the desired currency and
   assigned to the new currency
 - Assign the existing 'Cost Price' to your main company
 - On the setup of each company, in the 'Configuration''s Tab, select
   the product field used for the cost

The Price Type used is the first one found for the cost field configured on
the company. To ensure the right Price Type
is selected, you have to put the company on the Price Types, and according to
the security rule created, you will have access
only to the right Price Type.

Example:

I create a product A. it has 2 fields for cost prices : Cost Price and
Cost Price CH

Price type Sale company A : Cost Price / EUR
Price type Sale company B : Cost Price CH / CHF

Cost Price of Product A, company A: 60
Cost Price CH of Product A, company B: 70

Product A in company A: The cost price is 60 * currency rate
Product A in company B: The cost price is 70 * currency rate


Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
company_form_price_fields res.company.form.inherit res.company form Inherits base.view_company_form
product_price_type_view product.price.type.form product.price.type form Inherits product.product_price_type_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (0)

No new fields.

Public methods (1)
  • search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False)
    Inherit the default search of price types to replace search of list_price and standard_price by another field according to company This is useful to create a field on the product, for example list_price_company_x, which is the price of the product for the company_x. In the configuration of the company, choose to use this field instead of the list_price, this method will now return the good list_price according to the setup

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…