[IMP]remove sequece field and improve payment term form view

bzr revid: pja@tinyerp.com-20121204041610-vpqx0zf3rneokugx
This commit is contained in:
Jalpesh Patel (OpenERP) 2012-12-04 09:46:10 +05:30
parent 772a721d85
commit 7b6d5f0e93
2 changed files with 3 additions and 23 deletions

View File

@ -101,10 +101,9 @@ class account_payment_term_line(osv.osv):
_description = "Payment Term Line"
_columns = {
'name': fields.char('Line Name', size=32, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the payment term lines from the lowest sequences to the higher ones"),
'value': fields.selection([('procent', 'Percent'),
('balance', 'Balance'),
('fixed', 'Fixed Amount')], 'Valuation',
('fixed', 'Fixed Amount')], 'Computation',
required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be treated."""),
'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Payment Term'), help="For percent enter a ratio between 0-1."),
@ -115,10 +114,9 @@ class account_payment_term_line(osv.osv):
}
_defaults = {
'value': 'balance',
'sequence': 5,
'days2': 0,
}
_order = "sequence"
_order = "days,value"
def _check_percent(self, cr, uid, ids, context=None):
obj = self.browse(cr, uid, ids[0], context=context)

View File

@ -1554,7 +1554,6 @@
<field name="model">account.payment.term.line</field>
<field name="arch" type="xml">
<tree string="Payment Term">
<field name="sequence"/>
<field name="name"/>
<field name="value"/>
<field name="value_amount"/>
@ -1570,7 +1569,6 @@
<form string="Payment Term" version="7.0">
<group>
<field name="name"/>
<field name="sequence"/>
</group>
<group>
<group string="Amount Computation">
@ -1583,22 +1581,6 @@
</group>
</group>
<separator string="Example"/>
<label string="At 14 net days 2 percent, remaining amount at 30 days end of month."/>
<group>
<label string="Line 1:" colspan="2"/>
<label string=" Valuation: Percent"/>
<label string=" Number of Days: 14"/>
<label string=" Value amount: 0.02"/>
<label string=" Day of the Month: 0"/>
</group>
<group>
<label string="Line 2:" colspan="2"/>
<label string=" Valuation: Balance"/>
<label string=" Number of Days: 30"/>
<label string=" Value amount: n.a"/>
<label string=" Day of the Month= -1"/>
</group>
</form>
</field>
</record>
@ -1621,7 +1603,7 @@
<field name="name"/>
<field name="active"/>
</group>
<field name="note" placeholder="Note for the invoice..."/>
<field name="note" placeholder="Payment term explanation for the customer..."/>
<separator string="Computation"/>
<field name="line_ids"/>
</form>