diff --git a/CHANGELOG b/CHANGELOG index ac649ee2e9..904e369bfb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Updating cost price must update stock accounting + Version 2.4.0 - 2012-04-23 * Bug fixes (see mercurial logs for details) * Create move also from supplier to customer diff --git a/account.py b/account.py index 3ebcaa91ac..4d677fad21 100644 --- a/account.py +++ b/account.py @@ -1,7 +1,7 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from trytond.model import Model, fields -from trytond.pyson import Eval, Bool +from trytond.pyson import Eval, Bool, Get class Configuration(Model): @@ -12,5 +12,9 @@ class Configuration(Model): states={ 'required': Bool(Eval('context', {}).get('company')), })) + cost_price_counterpart_account = fields.Property(fields.Many2One( + 'account.account', 'Cost Price Counterpart Account', domain=[ + ('company', 'in', [Get(Eval('context', {}), 'company'), None]), + ])) Configuration() diff --git a/account.xml b/account.xml index 3817036ab0..1482cee775 100644 --- a/account.xml +++ b/account.xml @@ -15,6 +15,8 @@ this repository contains the full copyright notices and license terms. -->