Reviewers: ,


Please review this at http://codereview.tryton.org/451001/

Affected files:
  M product.py


Index: product.py
===================================================================
--- a/product.py
+++ b/product.py
@@ -70,7 +70,8 @@
                 ],
             states={
                 'invisible': (~Eval('context', {}).get('company')
-                    | Eval('account_category')),
+                    | Eval('account_category')
+                    | (Eval('type') != 'goods')),
                 'required': ((Eval('type') == 'goods')
                     & Eval('context', {}).get('company')
                     & ~Eval('account_category')),
@@ -85,7 +86,8 @@
                 ],
             states={
                 'invisible': (~Eval('context', {}).get('company')
-                    | Eval('account_category')),
+                    | Eval('account_category')
+                    | (Eval('type') != 'goods')),
                 'required': ((Eval('type') == 'goods')
                     & Eval('context', {}).get('company')
                     & ~Eval('account_category')),
@@ -100,7 +102,8 @@
                 ],
             states={
                 'invisible': (~Eval('context', {}).get('company')
-                    | Eval('account_category')),
+                    | Eval('account_category')
+                    | (Eval('type') != 'goods')),
                 'required': ((Eval('type') == 'goods')
                     & Eval('context', {}).get('company')
                     & ~Eval('account_category')),
@@ -115,7 +118,8 @@
                 ],
             states={
                 'invisible': (~Eval('context', {}).get('company')
-                    | Eval('account_category')),
+                    | Eval('account_category')
+                    | (Eval('type') != 'goods')),
                 'required': ((Eval('type') == 'goods')
                     & Eval('context', {}).get('company')
                     & ~Eval('account_category')),


--
[email protected] mailing list

Reply via email to