Skip to content
Health
55/100
fair
  • Security25/25
    No findings
  • Activity0/25
    Last human commit 50 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 5 Odoo series since 6.1

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.01 MB
Module directory on disk
Code analysis 6 migration notes 2 models 2 views 0 HTTP endpoints

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

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

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…