Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3220 Ansichten

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

Avatar
Verwerfen
Autor Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Mai 25
2147
2
März 24
3140
0
Sept. 22
3913
0
Sept. 22
1909
1
Nov. 22
2306