Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4470 มุมมอง

Hello everyone. I have a problem with adding country code to the customer tree view(in the accounting). Have browsed the forum and found this topic:
https://www.odoo.com/forum/help-1/question/how-to-add-vat-field-to-sales-order-model-134398

After putting my code I get:

 field = target._fields[name]
KeyError: 'country_id'

Class from my Python file (data folder):


from openerp import models, fields
class CountryCodeInvoice(models.Model):
# where to place new fields
    _inherit = 'account.invoice'
# getting country code to the accounting model
    code = fields.Char(string='Country Code', related='partner_id.code')
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 15
7609
3
พ.ค. 25
1609
1
เม.ย. 25
1216
1
ธ.ค. 24
5980
one2one relational field แก้ไขแล้ว
3
ก.ย. 24
14069