Skip to Content
Menú
This question has been flagged

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 {}
 
Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 24
1575
0
d’ag. 22
2264
2
de jul. 25
25861
2
de març 15
7464
1
de maig 21
2814