*tax views improvement

*replaced some spaces by tabs
*typo corrected

bzr revid: qdp@tinyerp.com-20080717120217-vhtgkmzc2lxikru4
This commit is contained in:
qdp 2008-07-17 14:02:17 +02:00
parent 3ea6305a32
commit 040e82d5e6
2 changed files with 66 additions and 69 deletions

View File

@ -1053,7 +1053,7 @@ class account_tax(osv.osv):
_name = 'account.tax'
_description = 'Tax'
_columns = {
'name': fields.char('Tax Name', size=64, required=True),
'name': fields.char('Tax Name', size=64, required=True, help="This name will be used to be displayed on reports"),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from the lowest sequences to the higher ones. The order is important if you have a tax that have several tax childs. In this case, the evaluation order is important."),
'amount': fields.float('Amount', required=True, digits=(14,4)),
'active': fields.boolean('Active'),
@ -1086,15 +1086,14 @@ class account_tax(osv.osv):
'ref_tax_sign': fields.float('Tax Code Sign', help="Usualy 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes"),
'company_id': fields.many2one('res.company', 'Company', required=True),
'description': fields.char('Description', size=128),
'description': fields.char('Internal Name', 32),
}
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['description','name'], context)
res = []
for record in reads:
for record in self.read(cr, uid, ids, ['description','name'], context):
name = record['description'] and record['description'] or record['name']
res.append((record['id'],name ))
return res
@ -1382,7 +1381,7 @@ class account_model(osv.osv):
}
_defaults = {
'legend':lambda *a:'''You can specify year,month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date) : Current Date\n\ne.g. My model on %(date)s''',
'legend':lambda *a:'''You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s : To Specify Year \n%(month)s : To Specify Month \n%(date)s : Current Date\n\ne.g. My model on %(date)s''',
}
account_model()
@ -1562,7 +1561,6 @@ class account_config_fiscalyear(osv.osv_memory):
'res_model': 'ir.module.module.configuration.wizard',
'type': 'ir.actions.act_window',
'target':'new',
}
account_config_fiscalyear()
@ -1725,16 +1723,15 @@ class account_tax_template(osv.osv):
# 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
# 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
# 'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."),
'description': fields.char('Description', size=128, required=True),
'description': fields.char('Internal Name', size=32),
}
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['description'], context)
res = []
for record in reads:
name = record['description']
for record in self.read(cr, uid, ids, ['description','name'], context):
name = record['description'] and record['description'] or record['name']
res.append((record['id'],name ))
return res

View File

@ -559,8 +559,8 @@
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Account Tax">
<!--<field name="name"/>-->
<field name="description" string="Name"/>
<field name="name"/>
<field name="description"/>
</tree>
</field>
</record>