Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3152 Vizualizări

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
mai 25
2082
2
mar. 24
3101
0
sept. 22
3771
0
sept. 22
1862
1
nov. 22
2198