Reviewers: ced, tryton-dev_googlegroups.com,
Message:
analytic_account/account.py
Please review this at http://codereview.appspot.com/4149041/
Affected files:
M account.py
Index: account.py
===================================================================
--- a/account.py
+++ b/account.py
@@ -173,7 +173,7 @@
round=True)
res[account_id] = currency_obj.round(to_currency,
res[account_id])
if id2account[account_id].display_balance == 'credit-debit':
- res[account_id] = - res[account_id]
+ res[account_id] = -res[account_id]
return res
def get_credit_debit(self, ids, name):
@@ -281,7 +281,9 @@
name = 'analytic_account_' + str(account.id)
if name in fields_names or not fields_names:
res[name] = field.copy()
- res[name]['required'] = account.mandatory
+ if account.mandatory:
+ res[name]['states'] =
PYSONEncoder().encode({'required':Equal(Eval('type'), 'line')})
+ else: res[name]['required'] = False
res[name]['string'] = account.name
res[name]['relation'] = self._name
res[name]['domain'] = PYSONEncoder().encode([
--
[email protected] mailing list