Browse Source

[IMP] Add help texts

pull/255/head
Laurent Mignon (ACSONE) 9 years ago
parent
commit
644e18b926
  1. 9
      partner_identification/models/res_partner_id_category.py
  2. 36
      partner_identification/models/res_partner_id_number.py

9
partner_identification/models/res_partner_id_category.py

@ -28,8 +28,13 @@ class ResPartnerIdCategory(models.Model):
"browse_record\n"
"# - id_number: browse_record of ID number to validate")
code = fields.Char(string="Code", size=16, required=True)
name = fields.Char(string="ID name", required=True, translate=True)
code = fields.Char(
string="Code", size=16, required=True,
help="Abbreviation or acronym of this ID type. For example, "
"'driver_license'")
name = fields.Char(
string="ID name", required=True, translate=True,
help="Name of this ID type. For example, 'Driver License'")
active = fields.Boolean(string="Active", default=True)
validation_code = fields.Text(
'Python validation code',

36
partner_identification/models/res_partner_id_number.py

@ -20,17 +20,35 @@ class ResPartnerIdNumber(models.Model):
def validate_id_number(self):
self.category_id.validate_id_number(self)
name = fields.Char(string="ID Number", required=True)
category_id = fields.Many2one(string="Category", required=True,
comodel_name='res.partner.id_category')
name = fields.Char(
string="ID Number", required=True,
help="The ID itself. For example, Driver License number of this "
"person")
category_id = fields.Many2one(
string="Category", required=True,
comodel_name='res.partner.id_category',
help="ID type defined in configuration. For example, Driver License")
partner_id = fields.Many2one(string="Partner", required=True,
comodel_name='res.partner')
partner_issued_id = fields.Many2one(string="Issued by",
comodel_name='res.partner')
place_issuance = fields.Char(string="Place of Issuance")
date_issued = fields.Date(string="Issued on")
valid_from = fields.Date(string="Valid from")
valid_until = fields.Date(string="Valid until")
partner_issued_id = fields.Many2one(
string="Issued by", comodel_name='res.partner',
help="Another partner, who issued this ID. For example, Traffic "
"National Institution")
place_issuance = fields.Char(
string="Place of Issuance",
help="The place where the ID has been issued. For example the country "
"for passports and visa")
date_issued = fields.Date(
string="Issued on",
help="Issued date. For example, date when person approved his driving "
"exam, 21/10/2009")
valid_from = fields.Date(
string="Valid from",
help="Validation period stating date.")
valid_until = fields.Date(
string="Valid until",
help="Expiration date. For example, date when person needs to renew "
"his driver license, 21/10/2019")
comment = fields.Text(string="Notes")
status = fields.Selection(
[('draft', 'New'),

Loading…
Cancel
Save