Files
odoo_source/addons/sale_stock_margin/__init__.py
T
Debauche Stéphane f21b696c6e [IMP] sale_stock_margin: improve the margin computation
Before
======
The margin stay unchanged after the validation of the delivery.

After
=====
The margin is updated when the delivery is validated.
To compute the margin for FIFO products, we use the value in the stock valuation layer as ``standard_price``.

e.g.:
    IN 1 product @ 10
    IN 2 product @ 20
    SO 4 products @ 40

    After delivery validation (after stock move creation), the margin is
    (40 * 4 - 10 - 20 - 20 - 20)

Task #2038418

closes odoo/odoo#41381

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-10 16:13:29 +00:00

5 lines
121 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models