Go to file
Olivier Dony da12f2b809 [FIX] product: pricelist: multiple corrections in UoM-related conversions
Pricelist computations need to consider 2 different Units
of Measure:
 - The default product UoM (product.uom_id), used as reference
   for the various quantities and amounts specified in each
   pricelist rules.
 - The `context UoM` is the UoM in which the result is requested,
   that is the list price UoM.

For example the 'price_min_margin' amount is meant for the unit
price of 1 x default UoM. When the context UoM is not the default
product UoM, it can be any UoM of the same UoM Category, and the
various quantities and amounts specified on the rule need to
be adapted accordingly:
  - min_quantity (expressed in terms of the default UoM)
  - price_surcharge (specified for 1 x default UoM)
  - price_min_margin (specified for 1 x default UoM)
  - price_max_margin (specified for 1 x default UoM)

The UoM corrections were not done consistently and resulted in
wrong prices when computing the price using a non-default UoM.
The cases were a conversion was needed or not were not properly
identified within the _price_rule_get_multi().

After this commit, the various code branches in _price_rule_get_multi
always ensures that:
 - price requested for: `qty` of `qty_uom_id`
 - `qty_in_product_uom` is the requested `qty` converted to default UoM
 - current (intermediary) price: `price` for  `price_uom_id`

Therefore `price` and `price_uom_id` are always in sync, and `price_uom_id`
can always be compared with `qty_uom_id' in order to know whether
a conversion is still needed.

This patch also corrects and extends the regression tests
introduced at revision 79ebe10.
2014-12-09 17:30:47 +01:00
addons [FIX] product: pricelist: multiple corrections in UoM-related conversions 2014-12-09 17:30:47 +01:00
debian [FIX] Packaging: Debian: ignore root Makefile 2014-11-10 11:49:02 +01:00
doc [FIX] doc: remaining instances of ruby-style interpolation in templates 2014-12-03 14:21:00 +01:00
openerp [IMP] models.py: increase logging level for columns that can't be casted automatically when upgrading a module. 2014-12-09 15:39:12 +01:00
setup [ADD] Packaging: Debian and CentOS Dockerfiles for nightly builds tests 2014-12-09 12:33:56 +01:00
.gitignore [MERGE] forward port of branch saas-3 up to 8c4a7cb 2014-11-04 12:30:01 +01:00
CONTRIBUTING.md [FIX] CONTRIBUTING: dead link 2014-10-13 11:09:08 +02:00
LICENSE cleanup repo root 2014-05-15 10:43:02 +02:00
MANIFEST.in [FIX] Packaging: MANIFEST.in: include relevant files 2014-11-28 16:40:56 +01:00
Makefile [IMP] *: one Makefile to rules them all. 2014-11-05 19:30:28 +01:00
README.md updated deb-repository URL 2014-11-23 21:08:36 +01:00
odoo.py [FIX] odoo.py windows compatibility 2014-10-02 16:12:19 +02:00
openerp-gevent restore the original gevent detection 2013-09-10 01:19:46 +02:00
openerp-server openerp apps main moved to cli ready for new commands 2012-11-27 01:55:13 +01:00
openerp-wsgi.py [FIX] wsgi deployement with openerp-wsgi.py 2014-03-07 21:00:55 +01:00
requirements.txt [REM] duplicated package in requirements, sort 2014-11-19 17:07:28 +01:00
setup.cfg [FIX] Packaging: RedHat: dependencies management 2014-11-28 16:40:55 +01:00
setup.py [FIX] Packaging: lib name from openerp to odoo 2014-11-28 16:40:56 +01:00

README.md

Build Status

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo development

If you are a developer type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python

Then follow the developer tutorial

Packages, tarballs and installers

  • Debian packages

    Add this apt repository to your /etc/apt/sources.list file

      deb http://nightly.odoo.com/8.0/nightly/deb/ ./
    

    Then type:

      $ sudo apt-get update
      $ sudo apt-get install odoo
    

    If you plan to use Odoo with a local database, please make sure to install PostgreSQL before installing the Odoo Debian package.

  • Source tarballs

  • Windows installer

  • RPM package

For Odoo employees

To add the odoo-dev remote use this command:

$ ./odoo.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./odoo.py setup_git_review