Browse Source

[FIX][module_prototyper][8.0] model state - _name vs. _inherit

Swap the if else case to decide whether a class
'_inherit's the model or '_name's the model.
pull/484/head
Peter Alabaster 8 years ago
parent
commit
3122367a0e
  1. 2
      module_prototyper/templates/8.0/models/model_name.py.template

2
module_prototyper/templates/8.0/models/model_name.py.template

@ -6,7 +6,7 @@ from openerp.tools.translate import _
class {{ unprefix(name) }}(models.Model):
{% if model.state == 'base' %}
{% if model.state == 'manual' %}
_name = "{{ model.model }}"
{% else %}
_inherit = "{{ model.model }}"

Loading…
Cancel
Save