From 367144420bc7ccc4d9d4e461757a8a62c21deb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 12 Mar 2012 22:42:38 +0100 Subject: [PATCH] Allow to use the accounts and taxes of parent category issue1602 review269002 --- product.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/product.py b/product.py index f640874485..8b9ecd71f2 100644 --- a/product.py +++ b/product.py @@ -13,8 +13,12 @@ class Category(ModelSQL, ModelView): ('company', '=', Eval('context', {}).get('company', 0)), ], states={ - 'invisible': ~Eval('context', {}, ).get('company'), - })) + 'invisible': (~Eval('context', {}, ).get('company') + | Eval('account_parent')), + }, + depends=['account_parent'])) + account_cogs_used = fields.Function(fields.Many2One('account.account', + 'Account Cost of Goods Sold Used'), 'get_account') Category()