Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5394 มุมมอง

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
1540
0
ส.ค. 22
2223
2
ก.ค. 25
25841
2
มี.ค. 15
7430
1
พ.ค. 21
2805