콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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 {}
 
아바타
취소
관련 게시물 답글 화면 활동
2
5월 24
1559
0
8월 22
2254
2
7월 25
25856
2
3월 15
7456
1
5월 21
2814