저는 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는"찾을 수 없다는 오류를 제공합니다 다음 코드를 파일/
보기의 완전한 XML 정의, 개체의 _name 및 서버에서 발생한 오류와 같은 자세한 정보를 제공 할 수 있습니까? –
__init__.py 파일에 py를 추가하고 openerp 서비스를 다시 시작한 후에 모듈을 업데이트 했습니까? – dccdany
모델에 오타 또는 오류가있을 수 있습니다. 오류가 발생해도 Odoo는 모델을로드하지 않지만 오류는 발생하지 않습니다 ... Btw, 새 api (models.Model) 및 필드를 선언하는 새로운 방법을 사용해야합니다 – dturcotte