[IMP] Put a default value for payment term lines, make readonly amount to pay in list view, put % symbol when selection is percentage.
bzr revid: nco@tinyerp.com-20121204065850-dw3f79n61hla9x3c
This commit is contained in:
parent
7510092f7b
commit
62d0f3931d
|
@ -114,7 +114,6 @@ class account_payment_term_line(osv.osv):
|
|||
_name = "account.payment.term.line"
|
||||
_description = "Payment Term Line"
|
||||
_columns = {
|
||||
'name': fields.char('Line Name', size=32, required=True),
|
||||
'value': fields.selection([('procent', 'Percent'),
|
||||
('balance', 'Balance'),
|
||||
('fixed', 'Fixed Amount')], 'Computation',
|
||||
|
@ -128,7 +127,8 @@ class account_payment_term_line(osv.osv):
|
|||
}
|
||||
_defaults = {
|
||||
'value': 'balance',
|
||||
'days2': 0,
|
||||
'days': 30,
|
||||
'days2': 1,
|
||||
}
|
||||
_order = "days,value"
|
||||
|
||||
|
|
|
@ -1553,10 +1553,9 @@
|
|||
<field name="name">account.payment.term.line.tree</field>
|
||||
<field name="model">account.payment.term.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Payment Term">
|
||||
<field name="name"/>
|
||||
<tree string="Payment Term" editable="bottom">
|
||||
<field name="value"/>
|
||||
<field name="value_amount"/>
|
||||
<field name="value_amount" readonly="1"/>
|
||||
<field name="days"/>
|
||||
<field name="days2"/>
|
||||
</tree>
|
||||
|
@ -1567,13 +1566,14 @@
|
|||
<field name="model">account.payment.term.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Term" version="7.0">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Amount Computation">
|
||||
<field name="value"/>
|
||||
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
|
||||
<label for="value_amount" string="Amount To Pay"/>
|
||||
<div>
|
||||
<field name="value_amount" attrs="{'readonly':[('value','=','balance')]}" class="oe_inline"/>
|
||||
<label string="%%" class="oe_inline" attrs="{'invisible':['!',('value','=','procent')]}"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Due Date Computation">
|
||||
<field name="days"/>
|
||||
|
|
Loading…
Reference in New Issue