Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
5401 Переглядів

I have to develop a wizard that let manipulate the Selection field values for the final user, I all ready have the wizards and models, but the methods doesn't work, what can I do for success the objective?

This is my model code:

PROPERTY_TYPES = [("A", "Apartamento"), ("B", "Bodega"), ("C", "Casa"), ("S", "Consultorio"),
("F", "Finca"), ("L", "Local"), ("T", "Lote"), ("P", "Parqueadero"), ("O", "Oficina")]
class Property(models.Model):
    place_type = fields.Selection(PROPERTY_TYPES,"Tipo de sitio")

And this is my wizard code:

from ..models.models import *



class PropertyTypesWizard(models.TransientModel):

    _name = "product.property_types.wizard"

    type_ref = fields.Char(string="Property type internal ref")
    type_name = fields.Char(string="Property type name")
 
    @api.multi
    def add_property_type(self):
        PROPERTY_TYPES.append((self.type_ref, self.type_name))
        return {}
 
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
трав. 24
1542
0
серп. 22
2226
2
лип. 25
25843
2
бер. 15
7435
1
трав. 21
2807