odoomrp / odoomrp-wip

WIP of OdooMRP
http://www.odoomrp.com
GNU Affero General Public License v3.0
117 stars 247 forks source link

[8.0][BUG] Costing Method: Average Price. Cost Price is bad calculated #1052

Open JavierIniesta opened 9 years ago

JavierIniesta commented 9 years ago

When the warehouse is valued by method of the Average Weighted Price, this algorithm should be applied:

Average Price (Pm) = (Si * Pma) + (E * PC) / (Sf + E).

Where: Si = initial Stock (Before the movement of Entry). Pma = average Price before the entry. Sf = End Stock (After movement of Entry). E: units of Entry (purchase or manufacture). PC = Cost price of the Entry (It Will Be Purchase price or Cost price of Production.).

JavierIniesta commented 9 years ago

cc @rafaelbn @JMODaERP