내 오류가 어디에서 보이지 않습니다. 내 제품 페이지에서 만들거나 브랜드를 선택하는 드롭 다운을 볼 수 있지만 값은 다음과 같습니다. clicshopping.manufacturer, 1 예를 들어 Asusodoo, id 및 nt 이름을 드롭 다운에 표시합니다.
내 브랜드 페이지를 보면 asus가 만들어져 모든 것이 맞음을 알 수 있습니다.
내 제품에 xml 템플릿 일부가 있습니다.
아이디어가 있으십니까?
당신은_rec_name
attribute를 사용하여 개체 이름에 사용되는 필드 선언 할 필요가
from openerp.osv import orm, fields
from openerp.tools.translate import _
class clicshopping_manufacturer(orm.Model):
_name = 'clicshopping.manufacturer'
_columns = {
'clicshopping_manufacturers_id': fields.char('Brand manufacturer Id', size=5, help="Id manufacturer Brand table of ClicShopping must be unique"),
'clicshopping_manufacturers_name': fields.char('Brand Name', size=70, help='Name of brand manufacturer.'),
'clicshopping_manufacturers_url': fields.char('Brand Url', translate=True, size=70, help='Url of brand manufacturer.'),
'clicshopping_partner_id': fields.many2one('res.partner','Partner', help='Select a partner for this brand if it exists.', ondelete='restrict'),
'clicshopping_manufacturers_image': fields.binary('brand logo'),
'clicshopping_manufacturers_status': fields.boolean('Brand Manufacturer Status', default='1', help="If a manufacturer brand is not active, it will not be displayed in the catalog"),
'clicshopping_manufacturer_description': fields.text('Description', translate=True),
'clicshopping_manufacturer_seo_title': fields.char('Brand manufacturer Seo title', translate=True, size=70, help="If it empty, default in ClicSshopping will be taken"),
'clicshopping_manufacturer_seo_description': fields.char('Brand manufacturer Seo Description', translate=True, size=150, help="If it empty, default in ClicSshopping will be taken"),
'clicshopping_manufacturer_seo_keyword': fields.text('Brand manufacturer Seo Keywords', translate=True, help="If it empty, default in ClicSshopping will be taken"),
}
class product_template(orm.Model):
_inherit = 'product.template'
_columns = {
'clicshopping_product_manufacturer_id': fields.many2one('clicshopping.manufacturer','Brand', help='Select a brand for this product.')
}