İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3135 Görünümler

How to migrate/import hundreds of Gift Cards from another system to Odoo using existing gift cards codes?

Avatar
Vazgeç
Üretici En İyi Yanıt

Since codes for new gift cards are automatically created in a read-only field, the only way to import codes is to 

1) remove the read-only functionality with a customization.

from odoo import models, fields, api

class GiftCard(models.Model):
_inherit = "gift.card"

code = fields.Char(default=lambda x: x._generate_code(), required=True, readonly=False, copy=False)

2) import
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
May 25
2063
2
Mar 24
3092
0
Eyl 22
3736
0
Eyl 22
1839
1
Kas 22
2175