تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3195 أدوات العرض

I modify the create method for product.product and I want to retrieve 'ean13' and 'name_template' fields right after product has been created.

I do this:

new_product = super(EanAuto, self).create(vals)  # This invokes create method of product.product

print new_product      # This outputs: product.product(44,) 

product_fields = new_product.read(['name_template','ean13'])

print product_fields    # This outputs: [{'ean13': False, 'id': 44, 'name_template': u'TestProduct1'}]


So name_template is being retrieved, but ean13 is not being retrieved (it is properly populated during the create and its value can be seen in the GUI),

any tips on what could be wrong here?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 15
3130
1
مايو 21
4315
4
أكتوبر 19
10095
1
يناير 18
9473
0
نوفمبر 17
3410