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

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

아바타
취소
작성자 베스트 답변

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
아바타
취소
관련 게시물 답글 화면 활동
0
5월 25
2300
2
3월 24
3282
0
9월 22
4098
0
9월 22
2049
1
11월 22
2479