2014-12-22 4 views
1

저는 Odoo 8을 사용하고 있으며 실제로 존재하는 필드가 발견되지 않습니다. 내 XML에서 '왜 필드가 할 수있는 내가 볼 수없는 sale.py에서이Odoo 필드를 찾을 수 없습니다.

_columns = { 
    'xx_delivery_date': fields.date(string='Delivery date'), 
    'xx_payment_method': fields.many2one('xx.payment.method', 
             string='Payment method'), 
    'xx_warranty_period': fields.many2one('xx.warranty.period', 
              string='Warranty period'), 
    'xx_delivery_method': fields.many2one('xx.delivery.method', 
              string='Delivery method'), 
    'delivery_cost': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Delivery cost', 
     store={ 
      'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line', 'xx_delivery_method'], 10), 
     }, 
     multi='sums', help="The delivery cost.", track_visibility='always'), 
    'amount_untaxed': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Untaxed Amount', 
     store={ 
      'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10), 
      'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10), 
     }, 
     multi='sums', help="The amount without tax.", track_visibility='always'), 
    'amount_tax': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Taxes', 
     store={ 
      'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10), 
      'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10), 
     }, 
     multi='sums', help="The tax amount."), 
    'amount_total': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Total', 
     store={ 
      'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line', 'xx_delivery_method'], 10), 
      'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10), 
     }, 
     multi='sums', help="The total amount.") 

존재하지만

  <field name="amount_tax" position="after"> 
       <field name="delivery_cost" 
        options="{'currency_field': 'currency_id'}" 
        readonly="1" widget="monetary"/> 
      </field> 

는 "delivery_cost는"찾을 수 없다는 오류를 제공합니다 다음 코드를 파일/

+1

보기의 완전한 XML 정의, 개체의 _name 및 서버에서 발생한 오류와 같은 자세한 정보를 제공 할 수 있습니까? –

+0

__init__.py 파일에 py를 추가하고 openerp 서비스를 다시 시작한 후에 모듈을 업데이트 했습니까? – dccdany

+0

모델에 오타 또는 오류가있을 수 있습니다. 오류가 발생해도 Odoo는 모델을로드하지 않지만 오류는 발생하지 않습니다 ... Btw, 새 api (models.Model) 및 필드를 선언하는 새로운 방법을 사용해야합니다 – dturcotte

답변

1

모델/뷰를 변경 한 후에 서버를 다시 시작한 다음 모듈을 업그레이드했는지 확인하십시오.

2

코드 필드 필드를 재정의하십시오. 그것을 컬럼 블록에 넣지 마십시오. 당신은 당신이 필드 다음에 쉼표 (,)를 제거보다이 문제를 한 후 완전히 odoo 8.0 이상을 사용할 수 있습니다

0

경우 문제가 해결 될 수도 기능 field.It에 대해 별도의 함수를 만들

예 : 이름 = name.Char

after you can not enter (comma)(,) 
관련 문제