You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
743 B

{% extends "header.template" %}
{% block body %}
from openerp import models, fields
from openerp.tools.translate import _
class {{ name }}(models.Model):
_inherit = "{{ inherit }}"
{% if description -%}_description = "{{ description }}"{% endif %}
{% for field in fields -%}
{% if field.notes -%}# {{ field.notes }}{% endif %}
{{ field.name }} = fields.{{ field.ttype|capitalize }}(
string=_("{{ field.field_description }}"),
required={{ field.required }},
translate={{ field.translate }},
readonly={{ field.readonly }},
{% if field.size -%}size={{ field.size }},{% endif %}
{% if field.helper -%}help=_("{{ field.helper }}"),{% endif %}
){% endfor %}
{% endblock %}