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

Hello guys, my problem is that I'd like add a department field in res.partners for group by deparment in calendar module, I added the following lines (dept_prueba is the field that I added):

class res_partner(osv.Model):

    _inherit = 'res.partner'

    _columns = {

        'calendar_last_notif_ack': fields.datetime('Last notification marked as read from base Calendar'),

        'dept_prueba': fields.many2one('hr.department'),

    }

But in Odoo I got this error 

ProgrammingError: column res_partner.dept_prueba does not exist
LINE 1: ...mployee","res_partner"."birthdate" as "birthdate","res_partn...

Could someone help me? Thanks!
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I use Odoo 9 , but my problem is that I can't update the module, because when I try enter in "Apps" I get the error

อวตาร
ละทิ้ง

There is a solution to perform an update |

1. Change the name of the model folder

2. Then go Apps to and update

3. Return the filename

คำตอบที่ดีที่สุด

Hi Jorge 

The problem can be two-sided
 1 - Did you add the module to ( 'depends':) in a file __openerp__? 

 2- Can be overwritten by mistake 

fields.many2one(
        'other.object.name',
        'Field Name',
        optional parameters)

Any version  of odoo you use



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Make a  calendar module update to add those new fields to base model 'res.partner' .

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ต.ค. 20
9942
1
พ.ค. 23
3129
2
มี.ค. 18
5100
auto incrementing on new field แก้ไขแล้ว
3
พ.ย. 20
14799
2
ก.พ. 17
7825