Add check to mark accounts as debt
issue10164 review357341003
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add check to mark types as debt
|
||||
* Add relate from party to general ledger accounts
|
||||
* Accumulate start balance on general ledger line
|
||||
* Print general journal from moves
|
||||
|
||||
+15
-1
@@ -93,6 +93,19 @@ def TypeMixin(template=False):
|
||||
},
|
||||
depends=['statement', 'assets'])
|
||||
|
||||
debt = fields.Boolean(
|
||||
"Debt",
|
||||
domain=[
|
||||
If(Eval('statement') != 'balance',
|
||||
('debt', '=', False), ()),
|
||||
],
|
||||
states={
|
||||
'invisible': ((Eval('statement') != 'balance')
|
||||
| Eval('assets', False)),
|
||||
},
|
||||
depends=['statement', 'assets'],
|
||||
help="Check to allow booking debt via supplier invoice.")
|
||||
|
||||
revenue = fields.Boolean(
|
||||
"Revenue",
|
||||
domain=[
|
||||
@@ -166,7 +179,8 @@ class TypeTemplate(
|
||||
if not type or type.assets != self.assets:
|
||||
res['assets'] = self.assets
|
||||
for boolean in [
|
||||
'receivable', 'stock', 'payable', 'revenue', 'expense']:
|
||||
'receivable', 'stock', 'payable', 'revenue', 'expense',
|
||||
'debt']:
|
||||
if not type or getattr(type, boolean) != getattr(self, boolean):
|
||||
res[boolean] = getattr(self, boolean)
|
||||
if not type or type.template != self:
|
||||
|
||||
@@ -25,6 +25,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="stock" xexpand="0" width="25"/>
|
||||
<label name="payable"/>
|
||||
<field name="payable" xexpand="0" width="25"/>
|
||||
<label name="debt"/>
|
||||
<field name="debt" xexpand="0" width="25"/>
|
||||
<label name="revenue"/>
|
||||
<field name="revenue" xexpand="0" width="25"/>
|
||||
<label name="expense"/>
|
||||
|
||||
@@ -21,6 +21,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="stock" xexpand="0" width="25"/>
|
||||
<label name="payable"/>
|
||||
<field name="payable" xexpand="0" width="25"/>
|
||||
<label name="debt"/>
|
||||
<field name="debt" xexpand="0" width="25"/>
|
||||
<label name="revenue"/>
|
||||
<field name="revenue" xexpand="0" width="25"/>
|
||||
<label name="expense"/>
|
||||
|
||||
Reference in New Issue
Block a user